/* ============================
   FINAL NAVBAR CSS – STICKY ON TOP
   ============================ */

/* Navbar base */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background-color: #fff;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    height: 45px;
    box-sizing: border-box;
}

/* Logo */
.logo {
    font-size: 12px;
    font-weight: bold;
    user-select: none;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 38px;
    width: auto;
    display: block;
    max-height: 40px;
}

/* User section */
.user-section {
    display: flex;
    align-items: center;
}

/* Navbar button */
.navbar-btn {
    background-color: #fff;
    color: #000;
    padding: 0 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid #e5e5e5;
    cursor: pointer;
    font-weight: 700;
    transition: background-color 0.3s ease;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-btn:hover {
    background-color: #f2f2f2;
}

/* Profile dropdown */
.profile-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #555;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    background-color: #fff;
    min-width: 180px;
    border-radius: 6px;
    z-index: 2000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    overflow: hidden;
    position: absolute;
    right: 0;
    top: 48px;
}

.dropdown-content a,
.dropdown-content label {
    display: block;
    padding: 10px 15px;
    color: #000;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.25s ease;
    cursor: pointer;
}

.dropdown-content a:hover,
.dropdown-content label:hover {
    background-color: #f2f2f2;
}

.admin-btn {
    display: block;
    padding: 10px 12px;
    color: #000;
    background-color: #f2f2f2;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 8px;
    font-weight: bold;
    text-align: center;
}

.admin-btn:hover {
    background-color: #ddd;
}

.desktop-only {
    display: inline-block;
}

/* ============================================
   FIX: LOGO POSITION STABLE ON ALL PAGES
   ============================================ */

/* Top fixed area - ensures consistent spacing */
.top-fixed-area {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: var(--bg, #fff);
}

/* Banner spacer - forces consistent height on all pages */
.top-ad-banner {
    height: 120px;
    background: transparent;
    line-height: 0;
}

/* Navbar sticky fix */
.navbar {
    position: sticky;
    top: 0;
    margin-top: 0 !important;
}

/* Remove any extra body margin that could cause shifting */
body {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Page wrapper margin reset */
.page-wrapper {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* First child margin reset */
.page-wrapper > :first-child,
body > :first-child {
    margin-top: 0 !important;
}



/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .top-ad-banner {
        height: 80px;
    }
}

@media (max-width: 640px) {
    .navbar {
        height: 45px;
    }
}

@media (max-width: 400px) {
    .navbar-btn {
        font-size: 11px;
        padding: 0 8px;
        height: 28px;
        line-height: 28px;
    }
    .logo-img {
        height: 28px;
    }
    .top-ad-banner {
        height: 60px;
    }
}

/* Force all toolbar buttons visible (for other tools) */
.redact-page .redact-toolbar button,
.redact-page .redact-toolbar .tool-btn,
.redact-page .redact-toolbar .master-save {
    opacity: 1 !important;
    visibility: visible !important;
}