/* --------------------- VARIABLES --------------------- */
/* Modo CLARO - Default */
:root {
    --hover-background-color: #501E53; /* Gris muy claro para hover */
    --hover-text-color: white;
}

/* Modo OSCURO */
:root[data-theme="dark"] {
    --hover-background-color: rgba(245, 245, 245, 0.644); /* Gris muy claro para hover */
    --hover-text-color: #501E53;
}

@font-face {
    font-family: 'Roboto';
    src: url("../fonts/Roboto-VariableFont_wdth,wght.ttf")
}

.container {
    padding: 30px;
    margin: 0;
    width: 100%;
    max-width: 100%;
    position: relative;
}

/* ------------------------ Header ------------------------ */

header {
    font-family: "Roboto";
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.logo {
    display: inline;
    padding: 10px 16px;
    border-radius: 8px;
}

header h1 {
    flex-grow: 1;
    margin: 0 20px;
    font-size: 32px;
    font-weight: 400;
}

.header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.right-top {
    display: flex;
    gap: 8px;
    align-items: center;
}

.right-bottom {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: white;
}

/* ------------------------ Search ------------------------ */

.search-box {
    background-color: #463146;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;

    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;


    font-family: 'Roboto';
    font-size: 0.86rem; /* Letra un poco más chica */
    font-weight: 400;
    max-width: 400px;
    max-height: 40px;
}

.search-box input[type="text"] {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    color: #fff;
}

.search-box i {
    color: #fff; 
    font-size: 1.1rem;
}

/* ------------------------ Lang ------------------------ */

.custom-select {
    position: relative;
    font-family: 'Roboto';
    width: 75px;
}

.custom-select select {
  display: none; /*hide original SELECT element: */
}

.select-selected {
    background-color: rgba(70, 49, 70, 1);
    color: #ffffff;
    padding: 8px 16px;
    border: 1px solid rgba(172, 149, 171, 1);
    border-radius: 4px;
}

/* Style the arrow inside the select element: */
.select-selected:after {
    position: absolute;
    content: "";
    top: 14px;
    right: 10px;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-color: rgba(172, 149, 171, 1) transparent transparent transparent;
}

/* Point the arrow upwards when the select box is open (active): */
.select-selected.select-arrow-active:after {
    border-color: transparent transparent rgba(172, 149, 171, 1) transparent;
    top: 7px;
}

/* style the items (options), including the selected item: */
.select-items div {
    color: #ffffff;
    padding: 8px 16px;
    border: 1px solid rgba(172, 149, 171, 1);
    border-color: transparent transparent rgba(0, 0, 0, 0.1) transparent;
    cursor: pointer;
}

/* Style items (options): */
.select-items {
    position: absolute;
    background-color: rgba(70, 49, 70, 1);
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
}

/* Hide the items when the select box is closed: */
.select-hide {
    display: none;
}

.select-items div:hover, .same-as-selected {
    background-color: #AC95AB;
}

/* ------------------------ CheckBox ------------------------ */

 /* Customize the label (the container) */
.custom-checkbox {
    display: flex !important;
    align-items: center !important; /* Always vertically centered */
    position: relative;
    padding-top: 0 !important;
    padding-left: 0 !important;
    
    font-family: 'Roboto';
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;

    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.checkmark {
    position: relative;
    flex-shrink: 0;
    height: 20px;
    width: 20px;
    border-radius: 2px;
    border: 1px solid rgba(172, 149, 171, 1);
    background-color: rgba(28, 19, 28, 1);
}

/* Hide the browser's default checkbox */
.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* On mouse-over, add a grey background color */
.custom-checkbox:hover input ~ .checkmark {
    background-color: rgba(172, 149, 171, 1);
}

/* When the checkbox is checked, add a blue background */
.custom-checkbox input:checked ~ .checkmark {
    background-color: rgba(172, 149, 171, 1);
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */
.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

/* Style the checkmark/indicator */
.custom-checkbox .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid #281B28;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

/* ------------------------ Market ------------------------ */

.market-status {
    display: flex;
    align-items: center;
    font-family: 'Roboto';
    gap: 5px;
    font-size: 0.9rem;
}

.dot-green, .dot-red {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot-green {
    background-color: rgba(158, 255, 105, 1);
}

.dot-red {
    background-color: rgba(235, 87, 87, 1);
}

/* ------------------------ Download ------------------------ */

.download {
    background-color: rgba(70, 49, 70, 1);
    border: 1px solid rgba(172, 149, 171, 1);
    border-radius: 50%;
    height: 33px;
    width: 33px;
    color: #ffffff;
    cursor: pointer;
}

/* ------------------------ Navbar ------------------------ */

/* Fondo del contenedor */
.nav-pills.custom-nav {
    background-color: #AC95AB;
    border-radius: 0 !important;
    padding: 0.5rem;
}

/* Estado base (no seleccionado) */
.nav-pills.custom-nav .nav-link {
    background-color: #AC95AB;
    color: #281B28;
    transition: background-color 0.3s ease;
    border-radius: 50rem !important; /* estilo pill */
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.nav-pills.custom-nav .nav-link .icon {
    filter: brightness(0) saturate(100%) invert(10%) sepia(23%) saturate(846%) hue-rotate(251deg) brightness(92%) contrast(93%);
}

/* Hover y activo */
.nav-pills.custom-nav .nav-link:hover,
.nav-pills.custom-nav .nav-link.active {
    background-color: #463146;
    color: #fff;
    
}

.nav-pills.custom-nav .nav-link:hover .icon,
.nav-pills.custom-nav .nav-link.active .icon{
    filter: brightness(0) saturate(100%) invert(100%) sepia(100%) saturate(0%) hue-rotate(249deg) brightness(102%) contrast(101%);
}

/* ------------------------ body ------------------------ */

.highlight-green {
    color: #B4FF8C;
    background-color: #B4FF8C40;
    display: block;          /* span fills the cell width */    
}

.highlight-red {
    color: #EB5757;
    background-color: #EB575740;
    display: block;          /* span fills the cell width */    
}

main table {
    width: 100%;
    border-spacing: 0px;
    border: 1px solid rgba(172, 149, 171, 1);
    border-radius: 15px;
    overflow: hidden;

    width: 100%;
    border-collapse: separate;
}

main th, main td {
    font-family: 'Roboto';
    font-weight: 500;
    font-size: 14px;
    text-align: left;
    border: none;

    text-align: left;
    padding: 8px;
    border-bottom: 0px solid #ddd;
}

main thead {
    background-color: rgba(70, 49, 70, 1);
    height: 30px;
}

tbody tr:hover,
tbody tr.active-row {
    background-color: var(--hover-background-color);
    color: var(--hover-text-color);
}

/* Highlight the button inside the hovered row */
tbody tr:hover button,
tbody tr.active-row button {
    background: inherit;
    color: inherit;
}

a {
    color: inherit;
    text-decoration: inherit;
}

.expand-details {
    border-color: rgba(28, 19, 28, 1);
    background-color: #501E53;
    border: none;
    color: #ffffff;
    cursor: pointer;
}
/* ------------------------ Footer ------------------------ */

footer {
    font-family: 'Roboto';
    font-size: 16px;
    font-weight: 400;

    width: 100%;
    text-align: center;
    margin-top: 20px;
    justify-content: center;
}

.pagination-controls {
    align-items: center;
    gap: 8px;
}

/* -------------- Page select -------------- */
.pagination-controls select {
    background-color: #3a2c3a;
    color: white;
    border: none;
    padding: 4px 6px;
    border-radius: 4px;
}

.pagination-controls button {
    background-color: transparent;
    color: white;
    border: none;
    height: 56px;
    width: 56px;
    padding: 4px 6px;

    cursor: pointer;
}

/* -------------------------------- Tooltip  -------------------------------- */

.tooltip.show {
    opacity: 1;
}

/* antes: .tooltip-icon */
.tooltip .info-icon { 
    width: 20px; 
    height: 20px; 
}

/* Tooltip Bootstrap más ancho y tipografía un poco más chica */
.tooltip-inner {
    max-width: 520px;             /* más ancho que el default (~200px) */
    text-align: left; 

    font-family: 'Roboto'; 
    font-size: 12px; 
    font-weight: 400; 
    color: #fff; 

    background-color: #322F35 !important; 
    
}

.tooltip .tooltip-inner div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}