/* -------------------------------------------------
   Header / Topbar Overrides
   (Loaded AFTER main.css so we can override theme)
-------------------------------------------------- */
.main-header .topbar {
    font-size: 14px;
    z-index: 1030;
    background: #0a2d5e;
    color: #fff;
    padding: 8px 0;
    display: block !important; /* CRITICAL: theme hides topbar on mobile */
    position: relative;
    width: 100%;
}

/* Inner flex wrapper so we don't depend on Bootstrap grid */
.main-header .topbar .topbar-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between; /* left text / right buttons */
    gap: 1rem;
    flex-wrap: nowrap;
}

.main-header .topbar .topbar-left {
    flex: 1 1 auto;
    text-align: left;
    line-height: 1.2;
}

.main-header .topbar .topbar-left p {
    margin: 0;
    color: #fff;
    font-weight: 500;
    font-size: 14px;
}

/* Right-aligned actions (desktop default) */
.main-header .topbar .topbar-right {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Buttons wrapper */
.main-header .topbar .topbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* Fallback button styling (if Bootstrap not present) */
.main-header .topbar .topbar-actions .btn {
    display: inline-block;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    line-height: 1.2;
    color: #fff;
}
.main-header .topbar .topbar-actions .btn-primary { background-color: #007bff; }
.main-header .topbar .topbar-actions .btn-success { background-color: #28a745; }
.main-header .topbar .topbar-actions .btn:hover   { opacity: 0.9; }

/* -------------------------------------------------
   Nav / Dropdown / Overlay
-------------------------------------------------- */
.main-header .navbar {
    z-index: 1020;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding-left: 1rem;
    padding-right: 1rem;
}

.dropdown-menu {
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.05);
}

/* Overlay that appears on mobile menu open */
.body-overlay {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 9998;
    display: none;
    transition: opacity 0.3s ease;
}

.body-overlay.active {
    display: block;
    opacity: 1;
}

/* -------------------------------------------------
   Mobile Nav
-------------------------------------------------- */
.mobile-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 9999;
    display: none;
    border-top: 1px solid #ddd;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav ul li {
    border-bottom: 1px solid #eee;
}

.mobile-nav ul li a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
}

.mobile-nav ul li a:hover {
    background-color: #f5f5f5;
}

/* Put the mobile action buttons in a padded row */
.mobile-nav .mobile-actions {
    padding: 12px 0;
    border-bottom: none;
}

/* Reuse button fallback */
.mobile-nav .mobile-actions .btn {
    padding: 6px 14px;
    font-size: 14px;
    margin-bottom: 4px;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}

.mobile-nav .mobile-actions .btn-primary { background-color: #007bff; }
.mobile-nav .mobile-actions .btn-success { background-color: #28a745; }
.mobile-nav .mobile-actions .btn:hover   { opacity: 0.9; }

/* -------------------------------------------------
   Responsive
-------------------------------------------------- */
@media (max-width: 575.98px) {
    /* Add any mobile-specific overrides here */
    /* For example, adjust topbar layout if needed */
}