/* =========================================
   Floating Sidebar — Design Tokens
   ========================================= */
:root {
    /* Core neutrals */
    --anps-cta-dark: #0B1020;
    --anps-cta-border: rgba(255, 255, 255, 0.08);
    --anps-cta-text: #F8FAFC;
    --anps-cta-text-secondary: #CBD5E1;
    --anps-cta-radius: 8px;
    --anps-cta-transition: all 0.22s ease;

    /* View Demos — calm neutral discovery */
    --anps-cta-demos-bg: #0F172A;
    --anps-cta-demos-hover: #162033;
    --anps-cta-demos-active: #0B1220;
    --anps-cta-demos-icon: #CBD5E1;

    /* Buy Theme — strongest blue conversion */
    --anps-cta-buy-bg: #2563EB;
    --anps-cta-buy-hover: #1D4ED8;
    --anps-cta-buy-active: #1E40AF;
    --anps-cta-buy-glow: rgba(37, 99, 235, 0.22);

    /* Launch It For Me — premium concierge */
    --anps-cta-launch-bg: #111827;
    --anps-cta-launch-hover: #182133;
    --anps-cta-launch-active: #0E1625;
    --anps-cta-launch-accent: #C9A45C;
    --anps-cta-launch-border: rgba(201, 164, 92, 0.22);
    --anps-cta-launch-glow: rgba(201, 164, 92, 0.12);

    /* Shadows */
    --anps-cta-shadow-default: 0 10px 30px rgba(2, 8, 23, 0.18);
    --anps-cta-shadow-hover: 0 16px 36px rgba(2, 8, 23, 0.24);
}

/* =========================================
   Floating Sidebar — Container
   ========================================= */
.anps-demo-sidebar {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    border-radius: var(--anps-cta-radius) 0 0 var(--anps-cta-radius);
    overflow: hidden;
    box-shadow: var(--anps-cta-shadow-default);
}

/* =========================================
   Floating Sidebar — Base Button
   ========================================= */
.anps-demo-sidebar-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 13px 18px;
    color: var(--anps-cta-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.2;
    outline: none;
    writing-mode: horizontal-tb;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: var(--anps-cta-transition);
}

/* Separator between stacked buttons */
.anps-demo-sidebar-btn + .anps-demo-sidebar-btn {
    border-top: 1px solid var(--anps-cta-border);
}

/* Icon base */
.anps-demo-sidebar-btn svg {
    flex-shrink: 0;
    transition: var(--anps-cta-transition);
}

/* Shared hover */
.anps-demo-sidebar-btn:hover {
    transform: translateX(-3px);
    color: var(--anps-cta-text);
    text-decoration: none;
}

/* Shared active — press-in */
.anps-demo-sidebar-btn:active {
    transform: translateX(-1px);
    transition-duration: 0.08s;
}

/* Focus-visible — accessible & elegant */
.anps-demo-sidebar-btn:focus-visible {
    outline: 2px solid rgba(248, 250, 252, 0.7);
    outline-offset: -3px;
    z-index: 1;
}

/* =========================================
   View Demos — Calm Neutral
   ========================================= */
.anps-demo-sidebar-btn--demos {
    background: var(--anps-cta-demos-bg);
}

.anps-demo-sidebar-btn--demos svg {
    color: var(--anps-cta-demos-icon);
}

.anps-demo-sidebar-btn--demos:hover {
    background: var(--anps-cta-demos-hover);
    box-shadow: var(--anps-cta-shadow-hover);
}

.anps-demo-sidebar-btn--demos:active {
    background: var(--anps-cta-demos-active);
    box-shadow: var(--anps-cta-shadow-default);
}

/* =========================================
   Buy Theme — Strongest Conversion
   ========================================= */
.anps-demo-sidebar-btn--buy {
    background: var(--anps-cta-buy-bg);
    color: #fff;
}

.anps-demo-sidebar-btn--buy svg {
    color: #fff;
}

.anps-demo-sidebar-btn--buy:hover {
    background: var(--anps-cta-buy-hover);
    color: #fff;
    box-shadow: 0 12px 28px var(--anps-cta-buy-glow);
}

.anps-demo-sidebar-btn--buy:active {
    background: var(--anps-cta-buy-active);
    box-shadow: 0 6px 14px var(--anps-cta-buy-glow);
}

.anps-demo-sidebar-btn--buy:focus-visible {
    outline-color: rgba(255, 255, 255, 0.85);
}

/* =========================================
   Launch It For Me — Premium Concierge
   ========================================= */
.anps-demo-sidebar-btn--launch {
    background: var(--anps-cta-launch-bg);
    border-top: 1px solid var(--anps-cta-launch-border);
    border-bottom: 1px solid var(--anps-cta-launch-border);
    padding: 14px 18px;
}

.anps-demo-sidebar-btn--launch svg {
    color: var(--anps-cta-launch-accent);
}

.anps-demo-sidebar-btn--launch:hover {
    background: var(--anps-cta-launch-hover);
    box-shadow: 0 12px 28px var(--anps-cta-launch-glow);
}

.anps-demo-sidebar-btn--launch:active {
    background: var(--anps-cta-launch-active);
    box-shadow: 0 6px 14px var(--anps-cta-launch-glow);
}

.anps-demo-sidebar-btn--launch:focus-visible {
    outline-color: var(--anps-cta-launch-accent);
}

/* =========================================
   Modal Overlay
   ========================================= */
.anps-demo-modal {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.anps-demo-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.anps-demo-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.anps-demo-modal-content {
    position: relative;
    z-index: 1;
    background: #FAFBFC;
    border-radius: 18px;
    width: 92vw;
    max-width: 1100px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 40px 100px rgba(2, 6, 23, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.anps-demo-modal.is-open .anps-demo-modal-content {
    transform: translateY(0) scale(1);
}

/* =========================================
   Modal Header
   ========================================= */
.anps-demo-modal-header {
    text-align: center;
    padding: 32px 56px 24px;
    border-bottom: 1px solid #EAECF0;
    flex-shrink: 0;
    background: #fff;
    border-radius: 18px 18px 0 0;
}

.anps-demo-modal-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2563EB;
    margin-bottom: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.anps-demo-modal-header h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 800;
    color: #0F172A;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    letter-spacing: -0.025em;
    line-height: 1.25;
}

.anps-demo-modal-subtitle {
    margin: 0 auto 16px;
    font-size: 14px;
    font-weight: 400;
    color: #64748B;
    line-height: 1.55;
    max-width: 460px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.anps-demo-modal-pills {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.anps-demo-modal-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    background: #F1F5F9;
    padding: 5px 12px;
    border-radius: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.anps-demo-modal-pill svg {
    color: #22C55E;
    flex-shrink: 0;
}

.anps-demo-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    background: rgba(241, 245, 249, 0.9);
    border: 1px solid #E2E8F0;
    cursor: pointer;
    color: #64748B;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 10px;
    transition: all 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anps-demo-modal-close:hover {
    background: #E2E8F0;
    color: #0F172A;
    border-color: #CBD5E1;
}

.anps-demo-modal-close:focus-visible {
    outline: 2px solid #2563EB;
    outline-offset: 2px;
}

/* =========================================
   Scrollable area (grid + footer)
   ========================================= */
.anps-demo-modal-scroll {
    overflow-y: auto;
    flex: 1;
    overscroll-behavior: contain;
}

/* Custom scrollbar */
.anps-demo-modal-scroll::-webkit-scrollbar {
    width: 5px;
}

.anps-demo-modal-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.anps-demo-modal-scroll::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 3px;
}

.anps-demo-modal-scroll::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* =========================================
   Demo Grid
   ========================================= */
.anps-demo-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 24px 32px 24px;
}

/* =========================================
   Demo Card
   ========================================= */
.anps-demo-card {
    text-decoration: none;
    color: #1E293B;
    border-radius: 12px;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.anps-demo-card:hover {
    box-shadow:
        0 8px 24px rgba(2, 8, 23, 0.10),
        0 2px 8px rgba(2, 8, 23, 0.04);
    transform: translateY(-3px);
    border-color: #CBD5E1;
    color: #1E293B;
    text-decoration: none;
}

.anps-demo-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #F1F5F9;
    border-radius: 11px 11px 0 0;
}

.anps-demo-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top center;
}

.anps-demo-card:hover .anps-demo-card-image img {
    transform: scale(1.03);
}

.anps-demo-card-placeholder {
    width: 100%;
    height: 100%;
    background: #E2E8F0;
}

.anps-demo-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #2563EB;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    line-height: 1.4;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.anps-demo-card-body {
    padding: 14px 16px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.anps-demo-card-name {
    font-size: 14px;
    font-weight: 700;
    color: #0F172A;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.3;
}

.anps-demo-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #2563EB;
    background: #EFF6FF;
    padding: 5px 12px;
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.anps-demo-card-cta svg {
    transition: transform 0.2s ease;
}

.anps-demo-card:hover .anps-demo-card-cta {
    background: #2563EB;
    color: #fff;
}

.anps-demo-card:hover .anps-demo-card-cta svg {
    transform: translateX(2px);
}

/* =========================================
   Body scroll lock
   ========================================= */
body.anps-demo-modal-open {
    overflow: hidden;
}

/* =========================================
   Modal Footer CTA
   ========================================= */
.anps-demo-modal-footer {
    text-align: center;
    padding: 24px 32px 32px;
    border-top: 1px solid #EAECF0;
    margin: 0 32px;
}

.anps-demo-modal-footer-text {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 400;
    color: #64748B;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.anps-demo-modal-footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 700;
    color: var(--anps-cta-text);
    background: #111827;
    border: 1px solid rgba(201, 164, 92, 0.22);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.22s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    box-shadow: 0 2px 8px rgba(2, 6, 23, 0.10);
}

.anps-demo-modal-footer-btn:hover {
    background: #182133;
    color: var(--anps-cta-text);
    box-shadow: 0 8px 24px rgba(201, 164, 92, 0.14);
    transform: translateY(-1px);
    text-decoration: none;
}

.anps-demo-modal-footer-btn:active {
    background: #0E1625;
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(2, 6, 23, 0.10);
}

.anps-demo-modal-footer-btn:focus-visible {
    outline: 2px solid #C9A45C;
    outline-offset: 2px;
}

.anps-demo-modal-footer-btn svg {
    color: #C9A45C;
    flex-shrink: 0;
}

/* =========================================
   Responsive
   ========================================= */
@media (min-width: 1400px) {
    .anps-demo-modal-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .anps-demo-modal-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        padding: 20px 24px 24px;
    }
}

@media (max-width: 768px) {
    .anps-demo-modal-content {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }

    .anps-demo-modal-header {
        padding: 24px 48px 18px;
        border-radius: 0;
    }

    .anps-demo-modal-header h2 {
        font-size: 20px;
    }

    .anps-demo-modal-subtitle {
        font-size: 13px;
    }

    .anps-demo-modal-pills {
        gap: 6px;
    }

    .anps-demo-modal-pill {
        font-size: 11px;
        padding: 4px 10px;
    }

    .anps-demo-modal-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 14px 16px 16px;
    }

    .anps-demo-card-body {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 12px 12px;
        gap: 8px;
    }

    .anps-demo-card-name {
        font-size: 13px;
    }

    .anps-demo-card-cta {
        justify-content: center;
        font-size: 13px;
        font-weight: 600;
        padding: 12px 16px;
        border-radius: 8px;
        min-height: 48px;
    }

    .anps-demo-card-cta svg {
        width: 16px;
        height: 16px;
    }

    .anps-demo-modal-footer {
        margin: 0 16px;
        padding: 20px 16px 24px;
    }

    .anps-demo-modal-footer-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        min-height: 50px;
    }

    /* Sidebar: hide text, show only icons */
    .anps-demo-sidebar-btn span {
        display: none;
    }

    .anps-demo-sidebar-btn {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .anps-demo-modal-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px 14px 16px;
    }

    .anps-demo-modal-header {
        padding: 20px 44px 14px;
    }

    .anps-demo-modal-eyebrow {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .anps-demo-modal-header h2 {
        font-size: 18px;
    }

    .anps-demo-card-cta {
        min-height: 50px;
        font-size: 14px;
        padding: 13px 18px;
    }
}
