/**
 * Demo Bridge CSS v2.1
 * Bridges PBS header/footer with demo page content.
 */

/* ===== FULL WIDTH OVERRIDES — Break out of GP grid-container ===== */
body.page-template-demo-showcase .site,
body.page-template-demo-showcase .site.grid-container,
body.page-template-demo-showcase .site-content,
body.page-template-demo-showcase .content-area,
body.page-template-demo-showcase .inside-article,
body.page-template-demo-showcase .entry-content,
body.page-template-demo-showcase .grid-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ===== SITE CONTAINER — Full width on demo pages ===== */
body.page-template-demo-showcase .site.grid-container {
    max-width: 100% !important;
    width: 100% !important;
}

/* ===== NAV — Full width bar, content centered like main PBS pages ===== */
body.page-template-demo-showcase .site-header {
    width: 100% !important;
    max-width: 100% !important;
    background-color: #0A0A1A !important;
    border-bottom: 1px solid rgba(108, 92, 231, 0.2) !important;
}

body.page-template-demo-showcase .inside-header {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 20px 40px !important;
}

/* Fluid nav text — larger font, responsive sizing */
body.page-template-demo-showcase .main-navigation .main-nav ul li a {
    font-size: clamp(0.95rem, 1.2vw, 1.15rem) !important;
    letter-spacing: 0.03em !important;
    padding: 10px 20px !important;
}

body.page-template-demo-showcase .site-branding .main-title a,
body.page-template-demo-showcase .site-branding .site-title a {
    font-size: clamp(1.2rem, 1.8vw, 1.6rem) !important;
    letter-spacing: -0.01em !important;
}

/* Footer full width too */
body.page-template-demo-showcase .site-footer,
body.page-template-demo-showcase .site-info {
    width: 100% !important;
    max-width: 100% !important;
}

body.page-template-demo-showcase .inside-article {
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.page-template-demo-showcase .entry-header {
    display: none !important;
}

/* Demo wrapper */
.pbs-demo-showcase {
    width: 100%;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.pbs-demo-showcase .pbs-showcase-content {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

/* Body background — inherit from demo content */
body.page-template-demo-showcase {
    background-color: #0a0a0a;
}

/* ===== CRITICAL: Reset PBS font overrides inside demo content ===== */
.pbs-demo-showcase .pbs-showcase-content h1,
.pbs-demo-showcase .pbs-showcase-content h2,
.pbs-demo-showcase .pbs-showcase-content h3,
.pbs-demo-showcase .pbs-showcase-content h4,
.pbs-demo-showcase .pbs-showcase-content h5,
.pbs-demo-showcase .pbs-showcase-content h6 {
    font-family: inherit !important;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
}

.pbs-demo-showcase .pbs-showcase-content p,
.pbs-demo-showcase .pbs-showcase-content span,
.pbs-demo-showcase .pbs-showcase-content a,
.pbs-demo-showcase .pbs-showcase-content li,
.pbs-demo-showcase .pbs-showcase-content div,
.pbs-demo-showcase .pbs-showcase-content button,
.pbs-demo-showcase .pbs-showcase-content input,
.pbs-demo-showcase .pbs-showcase-content textarea,
.pbs-demo-showcase .pbs-showcase-content label {
    font-family: inherit !important;
}

/* ===== Theme toggle — fixed top-right, under nav bar ===== */
.pbs-demo-showcase .theme-toggle-btn,
.pbs-demo-showcase [class*="theme-toggle"],
body.page-template-demo-showcase > .theme-toggle-btn,
body.page-template-demo-showcase > [class*="theme-toggle"] {
    position: fixed !important;
    top: 110px !important;
    right: 24px !important;
    bottom: auto !important;
    left: auto !important;
    width: 48px !important;
    height: 48px !important;
    font-size: 22px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 9999 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    transition: all 0.3s ease !important;
}

.pbs-demo-showcase .theme-toggle-btn:hover,
.pbs-demo-showcase [class*="theme-toggle"]:hover,
body.page-template-demo-showcase > .theme-toggle-btn:hover,
body.page-template-demo-showcase > [class*="theme-toggle"]:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5) !important;
}

/* ===== Back bar styling ===== */
.pbs-demo-back-bar {
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-bottom: 1px solid rgba(108, 92, 231, 0.2);
}

.pbs-demo-back-bar a {
    color: #A29BFE;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.pbs-demo-back-bar a:hover {
    color: #00D2FF;
}

/* ===== Protect PBS header/footer from demo theme toggle ===== */
body.page-template-demo-showcase .site-header,
body.page-template-demo-showcase .site-header *,
body.page-template-demo-showcase .site-info,
body.page-template-demo-showcase .site-info * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* Ensure header background stays consistent regardless of demo theme */
body.page-template-demo-showcase .site-header {
    background-color: #0A0A1A !important;
    border-bottom: 1px solid rgba(108, 92, 231, 0.2) !important;
}

/* ===== GP sidebar override ===== */
body.page-template-demo-showcase #right-sidebar,
body.page-template-demo-showcase #left-sidebar {
    display: none !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .pbs-demo-showcase .pbs-showcase-content {
        overflow-x: hidden;
    }
    
    body.page-template-demo-showcase .inside-header {
        padding: 15px 16px !important;
    }

    .pbs-demo-showcase .theme-toggle-btn,
    .pbs-demo-showcase [class*="theme-toggle"],
    body.page-template-demo-showcase > .theme-toggle-btn,
    body.page-template-demo-showcase > [class*="theme-toggle"] {
        top: 80px !important;
        right: 12px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }
}



/* ========== ENHANCED TIMELINE â€” Overrides inline demo CSS ========== */
.pbs-showcase-content .timeline-dot {
    width: 64px !important;
    height: 64px !important;
    background: var(--bg-card, #141414) !important;
    border: 3px solid var(--primary, #2563eb) !important;
    border-radius: 50% !important;
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.6rem !important;
    box-shadow: 0 0 20px rgba(var(--primary-rgb, 37, 99, 235), 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pbs-showcase-content .timeline-dot:hover {
    transform: translateX(-50%) scale(1.1) !important;
    box-shadow: 0 0 30px rgba(var(--primary-rgb, 37, 99, 235), 0.5);
}

.pbs-showcase-content .timeline-item {
    margin-bottom: 4rem !important;
}

.pbs-showcase-content .timeline-content {
    border: 1px solid rgba(var(--primary-rgb, 37, 99, 235), 0.2) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pbs-showcase-content .timeline-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.pbs-showcase-content .timeline::before {
    width: 3px !important;
    background: linear-gradient(to bottom, var(--primary, #2563eb), var(--accent, #0ea5e9)) !important;
}

@media (max-width: 768px) {
    .pbs-showcase-content .timeline-dot {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.2rem !important;
        left: 1rem !important;
    }
}

/* ========== DATE RANGE PICKER ========== */
.pbs-date-picker {
    max-width: 800px;
    margin: 2rem auto 0;
    background: var(--bg-card, #141414);
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    border-radius: 1rem;
    padding: 2rem;
    text-align: left;
}

.pbs-date-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.pbs-date-picker-header button {
    background: none;
    border: none;
    color: var(--primary-light, #3b82f6);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.pbs-date-picker-header button:hover {
    background: rgba(var(--primary-rgb, 37, 99, 235), 0.1);
}

.pbs-date-picker-month {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text, #f5f5f5);
}

.pbs-date-picker-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 1.5rem;
}

.pbs-date-picker-grid .day-label {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #a3a3a3);
    padding: 0.5rem 0;
    text-transform: uppercase;
}

.pbs-date-picker-grid .day-cell {
    text-align: center;
    padding: 0.6rem 0;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text, #f5f5f5);
    transition: all 0.15s ease;
    position: relative;
}

.pbs-date-picker-grid .day-cell:hover:not(.empty):not(.disabled) {
    background: rgba(var(--primary-rgb, 37, 99, 235), 0.2);
}

.pbs-date-picker-grid .day-cell.today {
    font-weight: 700;
    color: var(--primary-light, #3b82f6);
}

.pbs-date-picker-grid .day-cell.selected-start,
.pbs-date-picker-grid .day-cell.selected-end {
    background: var(--primary, #2563eb) !important;
    color: #fff !important;
    font-weight: 700;
    border-radius: 0.5rem;
}

.pbs-date-picker-grid .day-cell.in-range {
    background: rgba(var(--primary-rgb, 37, 99, 235), 0.15);
    border-radius: 0;
}

.pbs-date-picker-grid .day-cell.in-range.selected-start {
    border-radius: 0.5rem 0 0 0.5rem;
}

.pbs-date-picker-grid .day-cell.in-range.selected-end {
    border-radius: 0 0.5rem 0.5rem 0;
}

.pbs-date-picker-grid .day-cell.empty,
.pbs-date-picker-grid .day-cell.disabled {
    cursor: default;
    opacity: 0.3;
}

.pbs-date-picker-selection {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.pbs-date-picker-selection .date-field {
    flex: 1;
    min-width: 200px;
}

.pbs-date-picker-selection .date-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted, #a3a3a3);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pbs-date-picker-selection .date-field .date-value {
    background: var(--bg-dark, #0a0a0a);
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text, #f5f5f5);
    font-size: 0.95rem;
    font-weight: 500;
}

.pbs-date-picker .book-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    background: linear-gradient(135deg, var(--primary, #2563eb), var(--accent, #0ea5e9));
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    justify-content: center;
}

.pbs-date-picker .book-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--primary-rgb, 37, 99, 235), 0.4);
}

.pbs-date-picker .book-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pbs-date-picker-months {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 600px) {
    .pbs-date-picker-months {
        grid-template-columns: 1fr;
    }
}
