/* MAIN PAGE */
/* Main background and font settings */
body {
    background-color: #e7edf4;
    font-family: 'Inter', sans-serif;
}

.omb-page-container {
    margin-left: 4.8rem;
    z-index: 997;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.omb-page-content {
    flex-grow: 1;
    overflow-y: auto;
}

/**************************************/
/* Header */
.omb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    width: 100%;
    height: 5rem;
    z-index: 998;
}

.omb-title-container {
    position: absolute; 
    left: 50%; 
    transform: translateX(-50%); 
}

.omb-page-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: bold;
    color: #3a577d;
}

/* Container for the dropdown and login/logout icon aligned to the right */
.omb-right-elements {
    display: flex; 
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
    width: 20%;
}

.omb-login-icon {
    display: flex;
    align-items: center;
    height: 3rem;
    cursor: pointer;
}

/**************************************/
/* Footer */
.omb-footer {
    position: relative;
    left: 0;
    width: 100%;
    background-color: #3a577d;
    color: white;
    font-size: 0.8rem;
    text-align: center;
    padding: 1.5rem;
    z-index: 997;
    margin-top: auto;
}

/**************************************/
/* Dropdown */
.omb-dropdown-container {
    display: inline-block;
    width: 100%;
}

.omb-dropdown, .omb-dropdown-title {
    font-size: 0.8rem;
    font-weight: 500;
    text-align: left;
    color: #333;
}

.omb-dropdown-title {
    color: #092e5d;
    font-weight: 600;
}

/**************************************/
/* Buttons */
.omb-reset-button {
    background-color: #1f4981;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    width: auto;
}

.omb-reset-button:hover {
    background-color: #092e5d;
    color: #fff;
}


/* Seccion  optimización*/
.custom-button {
    background-color: white;
    border: 1px solid #ccc;
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 1rem;
    font-size: 14px;
    transition: background-color 0.2s;
}

.custom-button:hover {
    background-color: #7663ad; /* lila claro al pasar el cursor */
    color: white;
}

.custom-button.selected {
    background-color: #7663ad; /* lila un poco más intenso cuando está seleccionado */
    color: white;
}

/* Seccion  optimización*/
.custom-button-info {
    background-color: white;
    border: 1px solid #ccc;
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.custom-button-info:hover {
    background-color: #7663ad; /* lila claro al pasar el cursor */
    color: white;
}

.custom-button-info.selected {
    background-color: #7663ad; /* lila un poco más intenso cuando está seleccionado */
    color: white;
}

/**************************************/
/* Parameters bar */
.omb-param-bar {
    display: flex;
    align-items: flex-end;
    gap: 2rem;
    margin: 0.6rem 0;
    height: 4rem;
    width: 100%;
}

/**************************************/
/* Sidebar */
.omb-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4.5rem;
    padding: 0 0.5rem;
    background-color: #fff;
    z-index: 998;
    transition: width 0.3s ease-in-out;
    overflow-x: hidden;
    border-radius: 0.5rem;
    margin: 0.3rem;
}

.omb-sidebar-expanded {
    width: 15rem;
}

.omb-sidebar:not(.omb-sidebar-expanded):hover {
    width: fit-content;
}

.omb-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.omb-sidebar-logo {
    width: 100%;
    width: 1.8rem;
    margin: 0.5rem auto;
    display: block;
    transition: initial 0.1s ease;
}

.omb-sidebar:hover .omb-sidebar-logo,
.omb-sidebar-expanded .omb-sidebar-logo {
    content: url('GEOIA-logo.png');
    width: 10rem;
}

.omb-page-container.expanded {
    margin-left: 15.3rem;
}

.omb-sidebar-toggle-btn {
    background: none;
    border: none;
    font-size: 1rem;
    margin-left: 1rem;
    display: none;
    cursor: pointer;
    color: #686869;
    transition: width 0.3s ease;
}

/* Show toggle button on hover OR when expanded */
.omb-sidebar:hover .omb-sidebar-toggle-btn,
.omb-sidebar.omb-sidebar-expanded .omb-sidebar-toggle-btn {
    display: block;
}

/* Sidebar items */
.nav-link {
    color: #092e5d;
    justify-self: center;
}

.nav-link:hover {
    color: #43b293;
    background-color: #D5D0E6;
}

.nav-pills .nav-link.active, .nav-pills .show>.nav-link {
    background-color: #43b293;
}

/* Por defecto, cuando el sidebar está colapsado */
.omb-sidebar:not(.omb-sidebar-expanded):not(:hover) .nav-link {
    width: 3rem; /* o el valor que quieras, menor que el 100% */
    margin-left: auto;
    margin-right: auto;
    border-radius: 0.5rem;
}

/* Cuando está expandido o en hover, que ocupe el 100% */
.omb-sidebar.omb-sidebar-expanded .nav-link,
.omb-sidebar:hover .nav-link {
    width: 100%;
    border-radius: 0.5rem;
}

/* fix the width of the icons */
.omb-sidebar .nav-link i {
    width: 1rem;
}

/* hide the navlink labels by default */
.omb-sidebar .nav-link span {
    visibility: hidden;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.omb-sidebar:hover .nav-link span,
.omb-sidebar.omb-sidebar-expanded .nav-link span {
    visibility: visible;
    opacity: 1;
    color: #000;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
}

/* Por defecto, ocultamos el texto dentro del summary */
.omb-sidebar .omb-sidebar-summary .menu-text {
    display: none;
    transition: opacity 0.3s ease-in-out;
}

/* Cuando el sidebar está expandido o está en hover, mostramos el texto */
.omb-sidebar.omb-sidebar-expanded .omb-sidebar-summary .menu-text,
.omb-sidebar:hover .omb-sidebar-summary .menu-text {
    display: inline;
}

/* Ocultar texto completamente cuando sidebar está colapsado */
.omb-sidebar:not(.omb-sidebar-expanded) .nav-link .menu-text {
    display: none;
    width: 8rem;
}

/* Mostrar texto cuando sidebar está expandido o en hover */
.omb-sidebar.omb-sidebar-expanded .nav-link .menu-text,
.omb-sidebar:hover .nav-link .menu-text {
    display: inline;
}

/* Si un NavLink dentro del details está activo, pinta el summary (padre) */
.omb-sidebar-details:has(.nav-link.active) > summary {
    background-color: #43b293; /* mismo verde que los links activos */
    color: black; /* o el color que quieras */
    border-radius: 0.5rem;
}

.omb-sidebar-summary {
    min-height: 2rem; /* Más alto que el nav-link */
    padding: 0.5rem;
    cursor: pointer;
    user-select: none;
}

/* Ajusta el tamaño de la flecha nativa (Chromium/Safari) */
summary::-webkit-details-marker {
    font-size: 0.7em; /* Reduce el tamaño, puedes ajustar el valor */
}

/* Ajusta el tamaño de la flecha nativa (Firefox y otros) */
summary::marker {
    font-size: 0.7em; /* Ajusta a tu gusto */
}

/* Añadir sangría a los hijos (NavLinks dentro del div) */
.omb-sidebar-details > div {
    padding-left: 0.5rem; /* o el valor que quieras para la tabulación */
}

/* Margen inferior para el summary (padre) */
.omb-sidebar-summary {
    margin-bottom: 0.25rem;  /* separa del siguiente div */
    margin-top: 0.25rem;
}

/* Margen superior para los hijos NavLink */
.omb-sidebar-details > div > .nav-link {
    margin-top: 0.25rem;  /* separa los hijos entre sí */
}

/* Para separar cada NavLink hijo verticalmente */
.omb-sidebar-details > div > .nav-link + .nav-link {
    margin-top: 0.25rem;
}

.omb-sidebar-summary:hover {
    background-color: #d5d0e6; /* El color que quieras para el resaltado */
    cursor: pointer; /* Para que se vea como clicable */
    border-radius: 0.5rem;
}

/* Separación vertical entre links que NO tienen hijos */
.omb-sidebar > .nav > .nav-link {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}


/**************************************/
/* Home page */
.omb-home-map-description-container {
    padding: 1rem;
    height: 50%;
    display: flex;
    gap: 1rem;
    width: 100%;
}

.omb-home-map {
    flex-grow: 1;
    width: 50%;
}

.omb-home-description-box {
    flex-grow: 1;
    width: 50%;
    background: linear-gradient(to right, #7663ad , #43b293);
    color: #fff;
    border-radius: 0.3rem;
    padding: 1rem;
    font-size: 1rem;
    justify-content: center;
    align-items: center;
    display: flex;
    opacity: 0.9;
    flex-direction: column;
}

/**************************************/
/* Login page */
.omb-login-page {
    align-items: center;
    justify-content: center;
    display: flex;
}

.omb-login-container {
    width: 600px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0px 4px 12px #e3e1ea;
}

.omb-login-logo {
    width: 200px; 
    margin-bottom: 20px;
}

.omb-login-input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
}

.omb-wrong-password-alert {
    width: 100%; 
    margin: 0px auto; 
    margin-bottom: 20px;
    text-align: left;
}

.omb-login-btn {
    padding: 12px;
    width: 40%;
    font-size: 16px;
    border-radius: 5px;
    background-color: #8673be;
    border-color: #7663ad;
    color: #fff;
    display: block;
    margin: 0 auto;
}

.omb-login-btn:hover {
    background-color: #6753a2;
    border-color: #7663ad;
}

/**************************************/
/* Graphs */
.omb-loading-style {
    visibility: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    height: 100%;
    width: 100%;
}

/**************************************/
/* KPI Box */
.omb-kpi-box {
    border-radius: 0.1rem;
    width: fit-content;
}

/**************************************/
/* Tabs */
.omb-tabs-container {
    display: flex;
    padding: 0.5rem;
    border-bottom: 2px solid #ddd;
    height: 3.8rem;
    width: 100%;
    justify-content: space-evenly;
}

.omb-tab {
    flex-grow: 1;
    padding: 0.4rem;
    text-align: center;
    font-size: 1.1rem;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 0.5rem 0.5rem 0 0;
    transition: all 0.3s ease;
    background-color: #f4f4f9;
    color: #092e5d;
}

.omb-tab:hover {
    background-color: #f0f0f0;
    color: #092e5d;
}

/* Active Tab */
.omb-tab-selected {
    font-weight: bold;
    color: #fff;
    background-color: #7663ad;
    border-bottom: 2px solid #43b293;
}

.omb-tab-content-item {
    display: none;
    text-align: center;
}

.omb-tab-selected-content {
    display: block;
    text-align: center;
}

/**************************************/
