/**
 * View Mode Toggle Styles
 * 
 * Estilos para el toggle de cambio entre modo Admin y modo Cliente.
 * Incluye el switch animado y los indicadores visuales.
 */

/* ===== VIEW MODE TOGGLE ===== */
.view-mode-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.view-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Mode Switch Container */
.mode-switch {
    position: relative;
    width: 56px;
    height: 28px;
}

.mode-switch-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mode-switch-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

/* Icons in switch */
.mode-client, .mode-admin {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    transition: all 0.3s ease;
    z-index: 1;
}

.mode-client {
    left: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.mode-admin {
    right: 8px;
    color: rgba(255, 255, 255, 0.5);
}

/* Slider */
.mode-switch-slider {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Checked State (Admin Mode) */
.mode-switch-input:checked + .mode-switch-label {
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
}

.mode-switch-input:checked + .mode-switch-label .mode-switch-slider {
    transform: translateX(28px);
}

.mode-switch-input:checked + .mode-switch-label .mode-client {
    color: rgba(255, 255, 255, 0.5);
}

.mode-switch-input:checked + .mode-switch-label .mode-admin {
    color: rgba(255, 255, 255, 0.9);
}

/* Mode Label */
.mode-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 75px;
    text-align: center;
}

/* ===== NAVBAR MODE VARIANTS ===== */

/* Navbar Admin - Mismo estilo que cliente */
.navbar-admin {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.98) 0%, rgba(118, 75, 162, 0.98) 100%) !important;
}

.navbar-admin .version-badge.admin-badge {
    background: rgba(255, 255, 255, 0.22);
    color: white;
}

.navbar-admin .brand-icon {
    background: rgba(255, 255, 255, 0.18);
    color: white;
}

/* Avatar Admin - mismo estilo que usuario normal */
.avatar-admin, .admin-avatar {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

/* Badge Mode */
.badge-mode-sm {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

/* Switch Mode Link in Dropdown */
.switch-mode-link {
    transition: all 0.2s ease;
}

.switch-mode-link:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%) !important;
}

.text-purple {
    color: #7c3aed !important;
}

/* ===== ANIMATIONS ===== */
@keyframes modeSwitchPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(147, 51, 234, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(147, 51, 234, 0);
    }
}

.mode-switch-label:active {
    animation: modeSwitchPulse 0.5s ease;
}

/* ===== MODE INDICATOR BANNER ===== */
.mode-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: none;
}

.mode-banner.show {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mode-banner.admin-mode {
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    color: white;
}

.mode-banner.client-mode {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.mode-banner i {
    font-size: 14px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
    .view-mode-toggle {
        margin: 10px 0;
        justify-content: center;
    }
    
    .mode-label {
        min-width: auto;
    }
}

@media (max-width: 575.98px) {
    .mode-switch {
        width: 48px;
        height: 24px;
    }
    
    .mode-switch-slider {
        height: 18px;
        width: 18px;
    }
    
    .mode-switch-input:checked + .mode-switch-label .mode-switch-slider {
        transform: translateX(24px);
    }
    
    .mode-client, .mode-admin {
        font-size: 10px;
    }
    
    .mode-label {
        font-size: 10px;
        min-width: 65px;
    }
}

/* ===== DROPDOWN MODERN STYLES FOR ADMIN ===== */
.navbar-admin .modern-dropdown {
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
}

.navbar-admin .modern-dropdown .dropdown-item:hover {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
}

/* Admin dropdown active states */
.navbar-admin .nav-link-modern.active {
    background: rgba(255, 255, 255, 0.2);
}

.navbar-admin .nav-link-modern:hover {
    background: rgba(255, 255, 255, 0.15);
}
