/* ============================================================
   Smart Suggestions Bar — Premium Floating Pill
   ============================================================
   Desktop: Centered floating pill at bottom
   Mobile:  Compact bottom pill with side margins
   ============================================================ */

/* ── Base: Desktop ────────────────────────────────────────── */
.smart-suggestion-bar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 16px 12px 20px;
    border-radius: var(--radius-full, 9999px);
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow:
        0 10px 40px -10px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition:
        transform 250ms cubic-bezier(0.16, 1, 0.3, 1),
        opacity 250ms ease-out,
        visibility 250ms ease-out;
    width: max-content;
    max-width: 90vw;
    will-change: transform, opacity;
}

body.light-theme .smart-suggestion-bar {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(17, 24, 39, 0.06);
    box-shadow:
        0 10px 40px -10px rgba(0, 0, 0, 0.14),
        0 0 0 1px rgba(17, 24, 39, 0.04);
}

/* ── Show State ───────────────────────────────────────────── */
.smart-suggestion-bar.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

/* ── Content Layout ───────────────────────────────────────── */
.suggestion-content {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0; /* allow flex children to shrink */
}

.suggestion-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-neon, #6FFBFF);
}

.suggestion-icon i,
.suggestion-icon svg {
    width: 18px;
    height: 18px;
}

body.light-theme .suggestion-icon {
    color: var(--primary-neon, #6f6be8);
}

.suggestion-message {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.92rem;
    font-weight: 500;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

body.light-theme .suggestion-message {
    color: #1e293b;
}

/* ── CTA Button ───────────────────────────────────────────── */
.suggestion-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-neon, #6FFBFF);
    color: #0f172a;
    border: none;
    padding: 7px 16px;
    border-radius: var(--radius-full, 9999px);
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 250ms ease-in-out;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

body.light-theme .suggestion-cta {
    background: var(--primary-neon, #6f6be8);
    color: white;
}

.suggestion-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-neon-glow, rgba(111, 251, 255, 0.35));
}

body.light-theme .suggestion-cta:hover {
    box-shadow: 0 4px 12px rgba(111, 107, 232, 0.3);
}

.suggestion-cta i,
.suggestion-cta svg {
    width: 14px;
    height: 14px;
}

/* ── Close Button ─────────────────────────────────────────── */
.suggestion-close {
    background: transparent;
    border: none;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-full, 9999px);
    transition: all 250ms ease-in-out;
    margin-left: -4px;
    flex-shrink: 0;
}

.suggestion-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

body.light-theme .suggestion-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #0f172a;
}

.suggestion-close i,
.suggestion-close svg {
    width: 16px;
    height: 16px;
}

/* ── Swipe Dismiss (JS adds inline transform during drag) ── */
.smart-suggestion-bar.swiping {
    transition: none !important; /* Disable transition during active drag */
}

/* ═══════════════════════════════════════════════════════════
   MOBILE — Compact bottom floating pill
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .smart-suggestion-bar {
        /* Position: above chatbot toggler with safe-area */
        bottom: calc(96px + env(safe-area-inset-bottom, 0px));
        left: 16px;
        right: 16px;
        width: auto;
        max-width: none;
        transform: translateX(0) translateY(80px);

        /* Compact layout */
        padding: 10px 12px 10px 16px;
        gap: 10px;
        border-radius: var(--radius-xl, 24px);

        /* Single row — no wrapping */
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .smart-suggestion-bar.show {
        transform: translateX(0) translateY(0);
    }

    .suggestion-content {
        gap: 8px;
        flex: 1;
        min-width: 0;
    }

    .suggestion-icon {
        display: none; /* Hide icon to save space on mobile */
    }

    .suggestion-message {
        font-size: 0.82rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: none;
        text-align: left;
        flex: 1;
        min-width: 0;
    }

    .suggestion-cta {
        padding: 6px 12px;
        font-size: 0.78rem;
        flex-shrink: 0;
    }

    .suggestion-close {
        margin-left: 0;
    }
}

/* ── Reduced Motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .smart-suggestion-bar {
        transition-duration: 0.01ms !important;
    }

    .suggestion-cta {
        transition-duration: 0.01ms !important;
    }
}
