/* ==========================================
   ACREduca - Selector de vistas
   Compartido entre web pública y portal
   ========================================== */

.acreduca-view-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    padding: 4px;

    background-color: var(--bs-tertiary-bg, #f1f5f9);
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 12px;

    white-space: nowrap;
}

/* Opciones */

.acreduca-view-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 36px;
    padding: 7px 13px;

    border-radius: 9px;
    border: 0;

    color: var(--bs-secondary-color, #64748b);
    background: transparent;

    text-decoration: none;
    text-transform: none;

    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.3;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

/* Íconos */

.acreduca-view-option i {
    font-size: 0.95rem;
    line-height: 1;
}

/* Opción disponible */

a.acreduca-view-option:hover {
    background-color: var(--bs-secondary-bg, #e2e8f0);
    color: var(--bs-emphasis-color, #111827);
    text-decoration: none;
}

a.acreduca-view-option:focus-visible {
    outline: 2px solid #ff7a00;
    outline-offset: 2px;
}

/* Vista actual */

.acreduca-view-option.is-active {
    background-color: #181e6d;
    color: #ffffff;
    font-weight: 600;

    cursor: default;
    user-select: none;

    box-shadow: 0 2px 5px rgba(24, 30, 109, 0.15);
}

.acreduca-view-option.is-active i,
.acreduca-view-option.is-active span {
    color: #ffffff;
}

/* Tema oscuro */

[data-bs-theme="dark"] .acreduca-view-switcher {
    background-color: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] a.acreduca-view-option {
    color: #cbd5e1;
}

[data-bs-theme="dark"] a.acreduca-view-option:hover {
    background-color: #334155;
    color: #ffffff;
}

[data-bs-theme="dark"] .acreduca-view-option.is-active {
    background-color: #3446a7;
    color: #ffffff;
}

/* Adaptación a pantallas pequeñas */

@media (max-width: 575.98px) {

    .acreduca-view-switcher {
        padding: 3px;
        gap: 2px;
    }

    .acreduca-view-option {
        min-width: 36px;
        min-height: 34px;
        padding: 7px 9px;
    }

    .acreduca-view-option .view-label {
        display: none;
    }

}

/* =========================================
   SELECTOR DE VISTAS - HEADER PÚBLICO
   ========================================= */

.acreduca-top-header .acreduca-view-switcher-top {
    background-color: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    padding: 3px;
}

/* Opción disponible */
.acreduca-top-header .acreduca-view-switcher-top
a.acreduca-view-option {
    color: #ffffff;
}

.acreduca-top-header .acreduca-view-switcher-top
a.acreduca-view-option:hover {
    background-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

/* Vista activa */
.acreduca-top-header .acreduca-view-switcher-top
.acreduca-view-option.is-active {
    background-color: #ffffff;
    color: #181e6d;
    box-shadow: none;
}

.acreduca-top-header .acreduca-view-switcher-top
.acreduca-view-option.is-active i,
.acreduca-top-header .acreduca-view-switcher-top
.acreduca-view-option.is-active span {
    color: #181e6d;
}

/* Ajuste de altura para barra superior */
.acreduca-top-header .acreduca-view-option {
    min-height: 30px;
    padding: 5px 11px;
    font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 575.98px) {
    .acreduca-top-header .acreduca-view-option {
        min-width: 32px;
        padding: 6px 8px;
    }

    .acreduca-top-header .acreduca-view-switcher-top {
        flex-shrink: 0;
    }
}