/* ═══════════════════════════════════════════════════════════════════════════
   YSP UNIVERSAL TOOLBAR
   Styles for the toolbar injected via wp_body_open on Astra-rendered pages.
   Browser pages (VAS, Home, Library, etc.) have their own toolbar CSS —
   this file only applies on posts, WP pages, and archives.
   Created: 15 Apr 2026
   ═══════════════════════════════════════════════════════════════════════════ */


/* ====================================
   LOGGED-IN: TOP NAV BAR
   (matches .ysp-top-nav from browser pages)
==================================== */

.ysp-universal-toolbar-wrap .ysp-top-nav {
    background: rgba(28, 95, 115, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ysp-universal-toolbar-wrap .nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.ysp-universal-toolbar-wrap .nav-logo {
    font-size: 18px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.15);
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ysp-universal-toolbar-wrap .nav-logo::before {
    content: '🏠';
    font-size: 16px;
}

.ysp-universal-toolbar-wrap .nav-logo:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-1px);
}

.ysp-universal-toolbar-wrap .nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ysp-universal-toolbar-wrap .nav-link,
.ysp-universal-toolbar-wrap .logout-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.ysp-universal-toolbar-wrap .nav-link:hover,
.ysp-universal-toolbar-wrap .logout-link:hover {
    background: rgba(255,255,255,0.12);
}

.ysp-universal-toolbar-wrap .logout-icon {
    width: 18px;
    height: 18px;
}


/* ====================================
   LOGGED-IN: MEMBER TOOLBAR
   (matches .ysp-member-toolbar from browser pages)
==================================== */

.ysp-universal-toolbar-wrap .ysp-member-toolbar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 0;
    position: sticky;
    top: 50px;
    z-index: 999;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.ysp-universal-toolbar-wrap .toolbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* CEFR Selector */
.ysp-universal-toolbar-wrap .toolbar-item.toolbar-cefr {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ysp-universal-toolbar-wrap .toolbar-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
}

.ysp-universal-toolbar-wrap .cefr-buttons {
    display: flex;
    gap: 4px;
}

.ysp-universal-toolbar-wrap .cefr-btn {
    padding: 4px 12px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.ysp-universal-toolbar-wrap .cefr-btn:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.ysp-universal-toolbar-wrap .cefr-btn.active {
    background: #1c5f73;
    color: white;
    border-color: #1c5f73;
}

/* Tool Links */
.ysp-universal-toolbar-wrap .toolbar-tools {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ysp-universal-toolbar-wrap .toolbar-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.ysp-universal-toolbar-wrap .toolbar-link:hover {
    background: #1c5f73;
    color: white;
    border-color: #1c5f73;
    transform: translateY(-1px);
}

.ysp-universal-toolbar-wrap .toolbar-link.active {
    background: #1c5f73;
    color: white;
    border-color: #1c5f73;
}

.ysp-universal-toolbar-wrap .toolbar-link.toolbar-current {
    background: #d1d5db;
    color: #6b7280;
    border-color: #9ca3af;
    cursor: default;
    pointer-events: none;
    opacity: 0.7;
}

.ysp-universal-toolbar-wrap .toolbar-link.toolbar-current:hover {
    transform: none;
    background: #d1d5db;
    color: #6b7280;
}

.ysp-universal-toolbar-wrap .toolbar-link.toolbar-disabled {
    background: #f3f4f6;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.5;
}

.ysp-universal-toolbar-wrap .toolbar-icon {
    font-size: 1rem;
}

.ysp-universal-toolbar-wrap .toolbar-text {
    font-weight: 500;
}


/* ====================================
   LOGGED-OUT: PUBLIC NAV BAR
==================================== */

.ysp-public-nav {
    background: rgba(28, 95, 115, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.public-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* Logo — matches logged-in nav-logo */
.public-nav-logo {
    font-size: 18px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.15);
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.public-nav-logo::before {
    content: '🏠';
    font-size: 16px;
}

.public-nav-logo:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-1px);
}

/* Nav links */
.public-nav-links {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
    justify-content: center;
}

.public-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.88rem;
    transition: background 0.2s;
}

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

.public-nav-icon {
    font-size: 1rem;
}

.public-nav-text {
    font-weight: 500;
}

/* Auth buttons */
.public-nav-auth {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.public-nav-login {
    color: white;
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.2s;
}

.public-nav-login:hover {
    background: rgba(255,255,255,0.12);
}

.public-nav-signup {
    color: #1c5f73;
    background: white;
    text-decoration: none;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s;
}

.public-nav-signup:hover {
    background: #f0fdf4;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}




/* ====================================
   ASTRA BODY SPACING FIX
   Remove any residual header spacing
==================================== */

body .site-content {
    padding-top: 0 !important;
}

.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post {
    margin-top: 0;
}


/* ====================================
   MOBILE RESPONSIVE
==================================== */

@media (max-width: 768px) {
    /* Logged-in toolbar */
    .ysp-universal-toolbar-wrap .toolbar-container {
        flex-direction: column;
        align-items: stretch;
    }

    .ysp-universal-toolbar-wrap .toolbar-tools {
        justify-content: center;
    }

    /* Logged-out nav */
    .public-nav-container {
        flex-direction: column;
        gap: 10px;
    }

    .public-nav-links {
        justify-content: center;
    }

    .public-nav-auth {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    /* Logged-in: icon-only mode */
    .ysp-universal-toolbar-wrap .toolbar-link {
        padding: 8px 10px;
    }

    .ysp-universal-toolbar-wrap .toolbar-text {
        display: none;
    }

    .ysp-universal-toolbar-wrap .toolbar-icon {
        font-size: 1.2rem;
    }

    /* Logged-out: icon-only mode */
    .public-nav-link {
        padding: 8px 10px;
    }

    .public-nav-text {
        display: none;
    }

    .public-nav-icon {
        font-size: 1.2rem;
    }
}