/* ─────────────────────────────────────────────────────────────
   Reviews, Feedback Slider, Toast, Chatbot
   GPU-SAFE VERSION: zero CSS transform animations, zero
   position:fixed compositor layers with animations,
   zero -webkit-box stacking contexts.
───────────────────────────────────────────────────────────── */

/* ── Review slider container ─────────────────────────────── */
.fb-slider-outer {
    background: #f8f7ff;
    border-top: 2px solid #9333ea;
    border-bottom: 2px solid #9333ea;
    overflow-x: hidden;
    overflow-y: visible;
    padding: 22px 0;
    position: relative;
    /* scrollbar hidden for JS scroll */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.fb-slider-outer::-webkit-scrollbar { display: none; }

html.dark .fb-slider-outer { background: #0e0e16; }

.fb-slider-outer::before,
.fb-slider-outer::after {
    content: '';
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}
.fb-slider-outer::before { left: 0;  background: linear-gradient(to right, #f8f7ff, transparent); }
.fb-slider-outer::after  { right: 0; background: linear-gradient(to left,  #f8f7ff, transparent); }
html.dark .fb-slider-outer::before { background: linear-gradient(to right, #0e0e16, transparent); }
html.dark .fb-slider-outer::after  { background: linear-gradient(to left,  #0e0e16, transparent); }

/* ── fb-track: NO CSS animation — JS scrollLeft drives it ── */
.fb-track {
    display: flex;
    gap: 18px;
    width: max-content;
    /* animation REMOVED — was causing GPU compositor corruption on Android */
}

/* ── Review card ─────────────────────────────────────────── */
.fb-card {
    background: #fff;
    border: 1.5px solid rgba(147,51,234,.12);
    border-radius: 16px;
    padding: 18px 20px;
    min-width: 270px;
    max-width: 290px;
    flex-shrink: 0;
    /* NO position:relative, NO overflow:hidden — prevents stacking context */
}
html.dark .fb-card { background: #141420; border-color: rgba(147,51,234,.2); }

/* Top accent line via box-shadow instead of ::before (no stacking context) */
.fb-card { box-shadow: inset 0 3px 0 0 #9333ea, 0 1px 6px rgba(0,0,0,.06); }
html.dark .fb-card { box-shadow: inset 0 3px 0 0 #9333ea; }

.fb-stars  { color: #f59e0b; font-size: .85rem; margin-bottom: 8px; letter-spacing: 1px; }

/* fb-text: NO -webkit-box — use max-height instead (no stacking context) */
.fb-text {
    font-size: .83rem;
    color: #6b7280;
    line-height: 1.65;
    margin-bottom: 12px;
    max-height: 4.95em; /* ~3 lines */
    overflow: hidden;
}
html.dark .fb-text { color: #888; }

.fb-author { display: flex; align-items: center; gap: 9px; }
.fb-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9333ea, #c084fc);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .78rem; color: #fff; flex-shrink: 0;
}
.fb-name  { font-weight: 700; font-size: .83rem; color: #111; }
html.dark .fb-name { color: #f0f0f0; }
.fb-date  { font-size: .7rem; color: #9ca3af; }
.new-badge {
    background: #9333ea; color: #fff;
    font-size: .58rem; font-weight: 700;
    padding: 2px 7px; border-radius: 100px;
    margin-left: 6px; vertical-align: middle;
}

/* ── Review form ─────────────────────────────────────────── */
.fb-form-wrap {
    background: #fff;
    border: 1.5px solid rgba(147,51,234,.12);
    border-radius: 20px;
    padding: 32px 30px;
    max-width: 600px;
    margin: 0 auto;
}
html.dark .fb-form-wrap { background: #111; border-color: rgba(147,51,234,.25); }

/* Star buttons: NO transform/filter — use color only (no GPU layer) */
.fb-star-btn {
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    color: #d1d5db;
    /* transition/filter REMOVED — caused compositor issues */
}
.fb-star-btn.lit { color: #f59e0b; }

.fb-input {
    width: 100%; box-sizing: border-box;
    border: 1.5px solid #e5e7eb; border-radius: 11px;
    padding: 11px 14px; font-family: inherit; font-size: .92rem;
    color: #111; background: #f9fafb; outline: none;
}
.fb-input:focus { border-color: #9333ea; background: #fff; }
html.dark .fb-input { background: #1a1a1a; border-color: rgba(255,255,255,.1); color: #f0f0f0; }
html.dark .fb-input:focus { background: #222; border-color: #9333ea; }
textarea.fb-input { resize: vertical; min-height: 100px; line-height: 1.6; }

/* ── Toast ───────────────────────────────────────────────── */
/* Toast uses opacity fade instead of transform (no compositor layer promotion) */
.toast-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    margin-left: -120px; /* centering without transform */
    width: 240px;
    text-align: center;
    background: #1e1e1e;
    border: 1px solid #9333ea;
    color: #f0f0f0;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: .87rem;
    z-index: 9999;
    white-space: nowrap;
    pointer-events: none;
    /* opacity transition — does NOT create compositor layer (unlike transform) */
    opacity: 0;
    visibility: hidden;
}
.toast-bar.show { opacity: 1; visibility: visible; }

/* ── pop-in: opacity only, no transform animation ────────── */
.pop-in { animation: none; }

/* ── Chatbot FAB ─────────────────────────────────────────── */
/* animation:pulse REMOVED from badge — was creating GPU compositor layer */
#chatFab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 56px; height: 56px;
    background: linear-gradient(135deg, #9333ea, #a855f7);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 24px rgba(147,51,234,.4);
    z-index: 998;
    font-size: 1.4rem;
    /* transition:all REMOVED — promoted to GPU layer on every property change */
}

#chatFab .fab-badge {
    position: absolute;
    top: -3px; right: -3px;
    width: 14px; height: 14px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid white;
    /* animation:pulse REMOVED — continuous GPU compositor layer */
}

/* ── Chatbot box ─────────────────────────────────────────── */
#chatBox {
    position: fixed;
    bottom: 96px;
    right: 28px;
    width: 360px;
    max-height: 520px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 24px 72px rgba(0,0,0,.18);
    z-index: 997;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1.5px solid rgba(147,51,234,.12);
    /* transition:all REMOVED — promoted entire box to GPU layer */
}
html.dark #chatBox { background: #111; border-color: rgba(147,51,234,.25); }
#chatBox.open { display: flex; }

.cb-header {
    background: linear-gradient(135deg, #7e22ce, #9333ea);
    padding: 16px 18px;
    display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.cb-avatar {
    width: 36px; height: 36px;
    background: rgba(255,255,255,.2); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
}
.cb-msgs {
    flex: 1; overflow-y: auto;
    padding: 14px;
    display: flex; flex-direction: column; gap: 10px;
    max-height: 320px;
}
.cb-msgs::-webkit-scrollbar { width: 4px; }
.cb-msgs::-webkit-scrollbar-thumb { background: #9333ea; border-radius: 4px; }

.cb-msg-ai {
    background: #f3f0ff;
    border: 1px solid rgba(147,51,234,.12);
    border-radius: 12px 12px 12px 3px;
    padding: 10px 13px;
    font-size: .84rem; line-height: 1.6; color: #1a1a1a;
    max-width: 88%; align-self: flex-start;
}
html.dark .cb-msg-ai { background: #1e1a2e; color: #f0f0f0; border-color: rgba(147,51,234,.2); }

.cb-msg-user {
    background: linear-gradient(135deg, #7e22ce, #9333ea);
    color: #fff;
    border-radius: 12px 12px 3px 12px;
    padding: 10px 13px;
    font-size: .84rem; line-height: 1.6;
    max-width: 88%; align-self: flex-end;
}

/* Typing dots: opacity pulse instead of transform (no GPU layer) */
.cb-typing { display: flex; gap: 5px; align-items: center; padding: 8px 12px; }
.cb-typing span {
    width: 7px; height: 7px;
    background: #9333ea; border-radius: 50%;
    animation: typingDot 1.2s infinite;
}
.cb-typing span:nth-child(2) { animation-delay: .2s; }
.cb-typing span:nth-child(3) { animation-delay: .4s; }

@keyframes typingDot {
    0%, 60%, 100% { opacity: 0.3; }
    30%            { opacity: 1;   }
    /* opacity only — no transform, no GPU layer promotion */
}

.cb-input-wrap {
    padding: 12px;
    border-top: 1px solid #f3f0ff;
    display: flex; gap: 8px; flex-shrink: 0;
}
html.dark .cb-input-wrap { border-color: rgba(147,51,234,.15); }

.cb-input {
    flex: 1;
    border: 1.5px solid #e5e7eb; border-radius: 10px;
    padding: 9px 13px;
    font-family: 'Plus Jakarta Sans', sans-serif; font-size: .84rem;
    outline: none; background: #f9fafb; color: #111;
}
html.dark .cb-input { background: #1a1a2e; border-color: rgba(147,51,234,.2); color: #f0f0f0; }
.cb-input:focus { border-color: #9333ea; }

.cb-send {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #7e22ce, #9333ea);
    border: none; border-radius: 9px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.cb-send:disabled { opacity: .4; cursor: not-allowed; }

.cb-quick { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 10px; }
.cb-qbtn {
    padding: 5px 11px; border-radius: 100px;
    border: 1.5px solid rgba(147,51,234,.25);
    background: transparent; color: #9333ea;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: .74rem; font-weight: 600;
    cursor: pointer; white-space: nowrap;
}
