/* =====================================================
   JOBSITE NEXUS CUSTOM STYLES
   UI/UX Improvements - November 2025
   ===================================================== */

/* =====================================================
   ACCESSIBILITY - Skip Navigation
   ===================================================== */
.skip-nav {
    position: absolute;
    top: -40px;
    left: 0;
    background: #007bff;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 9999;
    font-weight: 600;
    border-radius: 0 0 4px 0;
}

.skip-nav:focus {
    top: 0;
    outline: 3px solid #ffc107;
}

/* =====================================================
   NAVIGATION - Active Page Indicator
   ===================================================== */
.navbar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom: 3px solid #007bff;
    font-weight: 600;
    border-radius: 4px 4px 0 0;
}

.navbar .nav-link {
    transition: all 0.2s ease-in-out;
}

.navbar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

/* =====================================================
   PROJECT SELECTOR - Enhanced Visibility
   ===================================================== */
.project-selector-highlight {
    background-color: rgba(0, 123, 255, 0.15);
    border-left: 3px solid #007bff;
    border-right: 3px solid #007bff;
    margin: 0 8px;
    border-radius: 4px;
}

.project-selector-link {
    color: #58a6ff !important;
}

.project-selector-link:hover {
    color: #79b8ff !important;
    background-color: rgba(0, 123, 255, 0.2) !important;
}

.project-selector-highlight .dropdown-toggle::after {
    color: #58a6ff;
}

/* =====================================================
   BADGES - WCAG AA Compliant Color Contrast
   ===================================================== */
.navbar .badge-warning,
.navbar .badge.bg-warning {
    background-color: #ff9800 !important;
    color: #000 !important;
    font-weight: 700;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.navbar .badge-danger,
.navbar .badge.bg-danger {
    background-color: #dc3545 !important;
    color: #fff !important;
    font-weight: 700;
}

.navbar .badge-success,
.navbar .badge.bg-success {
    background-color: #28a745 !important;
    color: #fff !important;
    font-weight: 700;
}

/* Ensure badges are visible and properly sized */
.navbar .badge {
    font-size: 0.75rem;
    padding: 0.25em 0.5em;
    vertical-align: middle;
}

/* =====================================================
   DROPDOWN MENUS - Improved Styling
   ===================================================== */
.navbar .dropdown-menu {
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
}

.navbar .dropdown-header {
    color: #6c757d;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
}

.navbar .dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease-in-out;
}

.navbar .dropdown-item:hover {
    background-color: #f8f9fa;
    padding-left: 1.25rem;
}

.navbar .dropdown-item.active {
    background-color: #007bff;
    color: white;
}

.navbar .dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
}

/* =====================================================
   SETTINGS DROPDOWN - Admin Navigation
   ===================================================== */
#settingsDropdown {
    color: #ffc107 !important;
}

#settingsDropdown:hover {
    color: #ffcd39 !important;
}

#settingsDropdown i {
    animation: rotate 2s linear infinite paused;
}

#settingsDropdown:hover i {
    animation-play-state: running;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* =====================================================
   RESPONSIVE IMPROVEMENTS
   ===================================================== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: rgba(37, 45, 51, 0.98);
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 4px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar .nav-link.active {
        border-bottom: none;
        border-left: 3px solid #007bff;
        padding-left: 1rem;
    }

    .project-selector-highlight {
        border-left: none;
        border-right: none;
        border-top: 2px solid #007bff;
        border-bottom: 2px solid #007bff;
        margin: 0.5rem 0;
    }
}

/* =====================================================
   NAVBAR COMPACT HEIGHT
   ===================================================== */
.navbar {
    min-height: 60px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.navbar-brand img {
    transition: all 0.2s ease-in-out;
}

.navbar-brand img:hover {
    transform: scale(1.05);
}

/* =====================================================
   NOTIFICATION BADGE
   ===================================================== */
#notification-badge {
    font-size: 0.65rem;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.nav-item-large {
    min-height: 60px;
    display: flex;
    align-items: center;
}

/* Text utility for better readability */
.text-readable {
    line-height: 1.6;
    letter-spacing: 0.02em;
}

/* Focus states for better keyboard navigation */
.navbar .nav-link:focus,
.navbar .dropdown-toggle:focus {
    outline: 3px solid #ffc107;
    outline-offset: 2px;
}

/* =====================================================
   MAIN CONTENT AREA
   ===================================================== */
#main-content {
    min-height: calc(100vh - 100px);
}

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {
    .navbar,
    .skip-nav,
    #django-messages {
        display: none;
    }

    #main-content {
        margin-top: 0 !important;
    }
}
