/**
 * Navbar CSS - Stili Comuni
 * File dedicato per garantire identità visiva tra dashboard e parte pubblica
 * Override specifici per navbar indipendente dai temi
 */

/* ========================================
   NAVBAR BASE STYLES
   ======================================== */
.navbar {
    background-color: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    z-index: 1030;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 0;
}

.navbar-dark {
    background-color: #000000 !important;
}

/* ========================================
   NAVBAR BRAND (Logo) - OVERRIDE FORTE
   ======================================== */
.navbar-brand {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 1.25rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* Override font del tema mg2025 */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    /* Rimuovi sfondo nero */
    background: transparent !important;
    background-color: transparent !important;
}

.navbar-brand:hover {
    color: #ffffff !important;
    text-decoration: none;
    background: transparent !important;
    background-color: transparent !important;
}

.navbar-brand svg {
    width: 24px;
    height: 24px;
    fill: #ffffff !important; /* Forza bianco per l'icona */
    background: transparent !important;
    background-color: transparent !important;
}

/* OVERRIDE SPECIFICO PER TEMA MG2025 */
.navbar-brand,
.navbar-brand *,
.navbar-brand svg,
.navbar-brand span {
    color: #ffffff !important;
    fill: #ffffff !important;
    background: transparent !important;
    background-color: transparent !important;
    /* Forza font standard */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Override per tutti i link nella navbar (incluso logo) */
.navbar a,
.navbar a:hover,
.navbar a:focus,
.navbar a:visited {
    color: #ffffff !important;
    background: transparent !important;
    background-color: transparent !important;
}

.navbar a svg {
    fill: #ffffff !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* ========================================
   NAVBAR NAVIGATION LINKS
   ======================================== */
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-nav .nav-link {
    color: #ffffff !important;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-nav .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.navbar-nav .nav-link.active {
    color: #ffffff !important;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.15);
}

.navbar-nav .nav-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ========================================
   NAVBAR BUTTONS (solo nella navbar superiore)
   ======================================== */
#navbar_main .btn {
    padding: 0 !important;
}

.navbar .btn-outline-light {
    color: #ffffff !important;
    border: none !important;
    background-color: transparent;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border: none !important;
}

.navbar .btn-outline-light svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ========================================
   NAVBAR TOGGLER (Mobile)
   ======================================== */
.navbar-toggler {
    border: 1px solid #ffffff;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.5em;
    height: 1.5em;
}

/* ========================================
   MOBILE NAV ICONS (solo nella navbar superiore)
   ======================================== */
.navbar .mobile-nav-icons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar .mobile-nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: none;
}

.navbar .mobile-nav-settings-btn,
.navbar .mobile-nav-upload-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    border: none !important;
    background-color: transparent;
}

.navbar .mobile-nav-settings-btn svg,
.navbar .mobile-nav-upload-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ========================================
   DROPDOWN MENU
   ======================================== */
.dropdown-menu {
    border: 0;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    background-color: #ffffff;
    padding: 0.5rem 0;
    min-width: 200px;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #212529;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #212529;
}

.dropdown-divider {
    border-top: 1px solid #dee2e6;
    margin: 0.5rem 0;
}

.dropdown-header {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========================================
   BADGE NOTIFICATIONS
   ======================================== */
.badge {
    font-size: 0.65rem;
    padding: 0.25em 0.4em;
    border-radius: 0.375rem;
    font-weight: 600;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
    color: #ffffff;
}

/* ========================================
   USER AVATAR (solo nella navbar superiore)
   ======================================== */
.navbar .rounded-circle {
    border: none;
    transition: opacity 0.2s ease;
}

.navbar .rounded-circle:hover {
    opacity: 0.8;
}

/* ========================================
   ADMIN PANEL BUTTON (solo nella navbar superiore)
   ======================================== */
.navbar .btn[style*="color: red"] {
    color: #dc3545 !important;
    border: none !important;
    background-color: transparent;
}

.navbar .btn[style*="color: red"]:hover {
    background-color: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545 !important;
    border: none !important;
}

/* ========================================
   RESPONSIVE BEHAVIOR
   ======================================== */
@media (max-width: 991.98px) {
    .navbar-nav {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem 0;
    }
    
    .navbar-nav .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 0.75rem 1rem;
    }
    
    .mobile-nav-icons {
        display: flex;
        gap: 0.5rem;
    }
}

@media (min-width: 992px) {
    .mobile-nav-icons {
        display: none;
    }
    
    .navbar-toggler {
        display: none;
    }
}

/* ========================================
   OVERRIDE SPECIFICI PER GARANTIRE IDENTITÀ
   ======================================== */
/* Forza stili navbar indipendentemente da altri CSS */
.navbar,
.navbar.fixed-top,
header.navbar {
    background-color: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.navbar * {
    color: inherit;
}

.navbar-brand,
.navbar-brand:hover,
.navbar-brand:focus {
    color: #ffffff !important;
    text-decoration: none;
}

.navbar-nav .nav-link,
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
    color: #ffffff !important;
    text-decoration: none;
}

/* ========================================
   OVERRIDE ULTRA-SPECIFICO PER TEMA MG2025
   ======================================== */
/* Vince contro mg2025-override.css che forza a { color: #000000 !important; } */
.navbar a.navbar-brand,
.navbar a.navbar-brand:hover,
.navbar a.navbar-brand:focus,
.navbar a.navbar-brand:visited,
.navbar a.navbar-brand:active {
    color: #ffffff !important;
    fill: #ffffff !important;
}

.navbar a.navbar-brand svg,
.navbar a.navbar-brand svg:hover,
.navbar a.navbar-brand svg:focus {
    fill: #ffffff !important;
}

/* Override per tutti gli elementi del logo */
.navbar-brand,
.navbar-brand *,
.navbar-brand svg,
.navbar-brand span,
.navbar-brand div {
    color: #ffffff !important;
    fill: #ffffff !important;
}

/* Forza override per tema mg2025 */
body .navbar a,
body .navbar a:hover,
body .navbar a:focus,
body .navbar a:visited {
    color: #ffffff !important;
    background: transparent !important;
    background-color: transparent !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

body .navbar a svg {
    fill: #ffffff !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* OVERRIDE ULTRA-SPECIFICO PER VINCERE CONTRO TUTTI I CSS DEL TEMA */
.navbar .navbar-brand,
.navbar .navbar-brand *,
.navbar .navbar-brand svg,
.navbar .navbar-brand span,
.navbar .navbar-brand div {
    color: #ffffff !important;
    fill: #ffffff !important;
    background: transparent !important;
    background-color: transparent !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 600 !important;
}

/* Override per rimuovere qualsiasi sfondo nero dal logo */
.navbar-brand,
.navbar-brand:hover,
.navbar-brand:focus,
.navbar-brand:active,
.navbar-brand:visited {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* ========================================
   UTILITY CLASSES (solo nella navbar superiore)
   ======================================== */
.navbar .d-flex {
    display: flex !important;
}

.navbar .align-items-center {
    align-items: center !important;
}

.navbar .justify-content-between {
    justify-content: space-between !important;
}

.navbar .ms-auto {
    margin-left: auto !important;
}

.navbar .me-2 {
    margin-right: 0.5rem !important;
}

.navbar .gap-2 {
    gap: 0.5rem !important;
}

/* ========================================
   Z-INDEX MANAGEMENT
   ======================================== */
.navbar {
    z-index: 1030 !important;
}

.dropdown-menu {
    z-index: 1040 !important;
}

/* ========================================
   ANIMATIONS
   ======================================== */
.navbar-nav .nav-link,
.btn-outline-light,
.dropdown-item {
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover,
.btn-outline-light:hover {
    transform: translateY(-1px);
}

/* ========================================
   FOCUS STATES
   ======================================== */
.navbar-nav .nav-link:focus,
.btn-outline-light:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* ========================================
   MOBILE SPECIFIC - Hide camera icon
   ======================================== */
@media (max-width: 767px) {
    .navbar .navbar-brand svg,
    .navbar-brand svg,
    a.navbar-brand svg {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Mobile nav icons links - no padding */
    .mobile-nav-icons a {
        padding: 0 !important;
    }
    
    /* Hide all action buttons on mobile (now in bottom nav) */
    .mobile-nav-icons {
        display: none !important;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .navbar {
        display: none !important;
    }
}
