/* Website design tokens & shared styles */
:root {
    --site-primary: #f8862d;
    --site-secondary: #e14156;
    --site-secondary-dark: #c12e45;
    --site-primary-light: #102544;
    --site-primary-lighter: #f3f3f3;
    --site-primary-dark: #040b14;
    --site-accent: #e14156;
    --site-bg: #ffffff;
    /* Soft background for sections like "Shop by Categories" */
    --site-section-bg-light: #f5faff;
    --site-section-bg-dark: #020617;
    --site-section-bg: var(--site-section-bg-light);
    --site-card-radius: 1rem;
    --site-card-shadow: 0 12px 28px rgba(15, 23, 42, 0.15);
}

/* Dark mode overrides */
[data-theme="dark"] {
    color-scheme: dark;
    --site-primary: #09162a; /* sky-400 */
    --site-primary-light: #0f172a;
    --site-primary-dark: #040b14;
    --site-secondary: #f8862d;
    --site-accent: #e14156;
    --site-bg: #020617; /* slate-950 */
}

.chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    z-index: 10001;
}
.chat-filter-tags {
    padding: 10px;
}

.chat-widget__toggle {
    border: none;
    border-radius: 999px;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        135deg,
        var(--site-primary-dark),
        var(--site-primary)
    );
    color: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.chat-widget__preview {
    position: absolute;
    bottom: 50px;
    left: 0;
    right: 0;
    width: 100%;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px;
    transform-origin: bottom center;
    transition:
        opacity 220ms ease,
        transform 220ms ease;
    opacity: 0;
}

.chat-widget__preview.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.chat-widget__preview.is-hidden {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
    pointer-events: none;
}

/* Ensure horizontal layout for quick-question preview across all screen sizes */
.chat-widget .chat-widget__preview {
    display: flex !important; /* Enforce flex layout */
    flex-direction: row !important; /* Force horizontal layout */
    justify-content: center !important; /* Center content */
    align-items: center !important; /* Align items vertically */
    gap: 12px; /* Add spacing between items */
}

.chat-widget .chat-widget__preview-bubble {
    display: flex !important; /* Enforce flex layout */
    flex-direction: row !important; /* Force horizontal layout */
    justify-content: center !important; /* Center content */
    align-items: center !important; /* Align items vertically */
    max-width: 100%; /* Ensure bubbles fit within the container */
}

.chat-widget__preview-bubble {
    background: linear-gradient(
        135deg,
        rgba(var(--primary-rgb, 3, 102, 214), 0.08),
        rgba(255, 255, 255, 0.02)
    );
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 12px 18px;
    color: #f8fafc;
    font-weight: 600;
    font-size: 15px;
    max-width: 820px;
    width: 100%;
    box-shadow: 0 12px 36px rgba(2, 6, 23, 0.6);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    transition:
        opacity 260ms ease,
        transform 260ms ease;
}

.chat-widget__preview-bubble .avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 30px;
}

.chat-widget__preview-bubble .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-widget__preview-bubble .text {
    font-size: 14px;
    line-height: 1.2;
    color: inherit;
    white-space: nowrap;
}

.chat-widget__preview-bubble.fade-out {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
}

.chat-widget__caret {
    display: inline-block;
    margin-left: 6px;
    opacity: 1;
    animation: blinkCaret 1s steps(1) infinite;
}

@keyframes blinkCaret {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Mobile: make bubble horizontally centered and text larger */
@media (max-width: 640px) {
    .chat-widget {
        right: 0;
        left: 0;
    }
    .chat-widget__preview {
        right: 0;
        left: 0;
        bottom: 92px;
        align-items: center;
        padding: 0 12px;
        width: 100%;
    }
    .chat-widget__preview-bubble {
        max-width: 100%;
        border-radius: 12px;
        padding: 14px 18px;
        font-size: 16px;
        justify-content: center;
    }
    .chat-widget__preview-bubble .text {
        text-align: center;
        font-size: 17px;
        line-height: 1.25;
    }
}

/* Large screens: position the preview at the right, aligned with the panel */
@media (min-width: 1024px) {
    .chat-widget__preview {
        left: auto;
        right: 24px;
        bottom: 50px;
        align-items: center;
        padding: 0;
        width: min(360px, calc(100vw - 32px));
        flex-direction: row !important;
        gap: 12px;
    }
    .chat-widget__preview-bubble {
        max-width: 900px;
        padding: 14px 20px;
        font-size: 17px;
        justify-content: center;
        display: flex !important;
        flex-direction: row !important;
    }
    .chat-widget__preview-bubble .text {
        text-align: center;
    }
    .chat-widget__preview {
        display: flex !important; /* Ensure flex is applied */
        flex-direction: row !important; /* Force horizontal layout */
        justify-content: center !important; /* Center content */
        align-items: center !important; /* Align items vertically */
    }
    .chat-widget__preview-bubble {
        display: flex !important; /* Ensure flex is applied */
        flex-direction: row !important; /* Force horizontal layout */
        align-items: center !important; /* Align items vertically */
    }
}

/* Strengthen large screen rules for horizontal layout */
@media (min-width: 1024px) {
    .chat-widget__preview {
        display: flex !important; /* Enforce flex layout */
        flex-direction: row !important; /* Force horizontal layout */
        justify-content: center !important; /* Center content */
        align-items: center !important; /* Align items vertically */
        gap: 12px !important; /* Add spacing between items */
    }

    .chat-widget__preview-bubble {
        display: flex !important; /* Enforce flex layout */
        flex-direction: row !important; /* Force horizontal layout */
        align-items: center !important; /* Align items vertically */
        max-width: 100% !important; /* Ensure bubbles fit within the container */
    }
}

.chat-widget__toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4);
}

.chat-widget__quick {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.chat-widget__whatsapp {
    border-radius: 999px;
    padding: 8px 12px;
    background: #25d366;
    color: #072a1a;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.12);
}

.chat-widget__quick-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 220px;
}

.chat-widget__quick-item {
    border: none;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(148, 163, 184, 0.12);
    color: #f8fafc;
    font-size: 0.8rem;
    text-align: right;
    cursor: pointer;
}

.chat-widget__toggle-icon {
    position: relative;
    width: 22px;
    height: 18px;
    border-radius: 12px;
    background: #ffffff;
}

.chat-widget__toggle-icon::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 6px;
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 0 0 8px 0;
    transform: skewX(-25deg);
}

.chat-widget__toggle-icon::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 5px;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: var(--site-primary-dark);
    box-shadow:
        6px 0 0 var(--site-primary),
        12px 0 0 var(--site-primary-dark);
}

.chat-widget__panel {
    width: min(380px, calc(100vw - 32px));
    max-height: min(80vh, calc(100vh - 120px));
    background: #ffffff; /* messenger-like light panel */
    color: #0b1220;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.18);
    overflow: hidden;
    animation: chat-widget-pop 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.chat-widget__header {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), #ffffff);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.chat-widget__title {
    font-size: 1rem;
    margin: 0;
    font-weight: 700;
    color: #0b1220;
}

.chat-widget__status,
.chat-widget__sub {
    font-size: 0.8rem;
    color: #94a3b8;
}

.chat-widget__close {
    border: none;
    background: transparent;
    color: #f8fafc;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.chat-widget__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 12px;
    overflow: hidden;
}

.chat-widget__landing {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-widget__label {
    font-size: 0.85rem;
    color: #cbd5f5;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-widget__label input,
.chat-widget__label textarea {
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.4);
    color: #f8fafc;
    padding: 10px 12px;
    font-size: 0.9rem;
}

.chat-widget__label textarea {
    resize: vertical;
}

.chat-widget__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-widget__action {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    background: var(--site-primary);
    color: #0f172a;
    transition: opacity 0.2s ease;
}

.chat-widget__action:hover {
    opacity: 0.9;
}

.chat-widget__action--outline {
    background: transparent;
    color: var(--site-primary);
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.chat-widget__messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 6px;
    min-height: 0;
}

/* Custom scrollbar for chat messages */
.chat-widget__messages::-webkit-scrollbar {
    width: 6px;
}

.chat-widget__messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.chat-widget__messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.chat-widget__messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Firefox scrollbar */
.chat-widget__messages {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.05);
}

.chat-widget__message {
    align-items: flex-end;
}

.chat-widget__message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
    flex: 0 0 36px;
}

.chat-widget__message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-widget__avatar-fallback {
    display: inline-block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e6eaf2, #dfe7f9);
    border-radius: 50%;
}

.chat-widget__message {
    display: flex;
}

.chat-widget__message--customer {
    justify-content: flex-end;
}

.chat-widget__message--staff {
    justify-content: flex-start;
}

.chat-widget__bubble {
    border-radius: 18px;
    padding: 10px 14px;
    max-width: 78%;
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.06);
}

.chat-widget__message--customer .chat-widget__bubble {
    background: linear-gradient(135deg, #0084ff, #2ea6ff);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 6px;
}

.chat-widget__message--staff .chat-widget__bubble {
    background: #f1f5f9;
    color: #0b1220;
    align-self: flex-start;
    border-bottom-left-radius: 6px;
}

/* Small tail for bubbles */
.chat-widget__message--customer .chat-widget__bubble::after,
.chat-widget__message--staff .chat-widget__bubble::after {
    content: "";
    position: relative;
    display: block;
    width: 0;
    height: 0;
}

.chat-widget__time {
    font-size: 0.72rem;
    color: var(--site-primary);
    text-align: right;
}

.chat-widget__composer {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border-top: 1px solid rgba(15, 23, 42, 0.05);
}
/* dark mode for chat widget */
[data-theme="dark"] .chat-widget__composer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #f8fafc;
}
.chat-widget-input {
    color: var(--site-primary);
}
[data-theme="dark"] .chat-widget-input {
    color: #f8fafc;
}

.chat-widget__helpers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.chat-widget__helper-btn {
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    background: rgba(148, 163, 184, 0.2);
    color: var(--site-primary);
    font-size: 0.78rem;
    cursor: pointer;
}

.chat-widget__helper-btn--outline {
    background: transparent;
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: var(--site-primary);
}

.chat-widget__composer input {
    flex: 1;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    padding: 10px 12px;
    background: #f8fafc;
    color: #0b1220;
    font-size: 0.95rem;
}

.chat-widget__send {
    border: none;
    border-radius: 999px;
    background: linear-gradient(
        135deg,
        var(--site-primary-dark),
        var(--site-primary)
    );
    color: #fff;
    padding: 8px;
    min-width: 44px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease;
}

.chat-widget__send--whatsapp {
    background: #25d366;
    color: #072a1a;
    padding: 8px;
    min-width: 44px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-widget__context-card {
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(15, 23, 42, 0.3);
}

.chat-widget__context-title {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
}

.chat-widget__context-price {
    margin: 0;
    font-size: 0.75rem;
    color: #bae6fd;
}

.chat-widget__context-link {
    font-size: 0.75rem;
    color: #38bdf8;
}

/* stronger product link styling */
.chat-widget__context-link {
    font-size: 0.85rem;
    color: var(--site-primary);
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(90deg, var(--site-primary), #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
}
.chat-widget__context-link:hover {
    opacity: 0.95;
    text-decoration: underline;
}

.chat-widget__reset {
    border: none;
    background: rgba(15, 23, 42, 0.85);
    color: #f8fafc;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    cursor: pointer;
}

.chat-widget__picker {
    position: absolute;
    inset: 0;
    background: white;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 5;
    border-radius: 12px;
}
[data-theme="dark"] .chat-widget__picker {
    background: rgba(15, 23, 42, 0.95);
    color: #f8fafc;
}

.chat-widget__picker-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.chat-widget__picker-title {
    margin: 0;
    font-weight: 600;
}

@keyframes previewFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-widget__picker-sub {
    font-size: 0.78rem;
    color: #94a3b8;
}

.chat-widget__picker-close {
    border: none;
    background: transparent;
    color: #f1f5f9;
    font-size: 1.4rem;
    cursor: pointer;
}

.chat-widget__picker-search {
    display: flex;
    gap: 8px;
}

.chat-widget__picker-search input {
    flex: 1;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.4);
    color: #f8fafc;
    padding: 10px 14px;
}

.chat-widget__picker-search button {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    background: #22d3ee;
    color: #0f172a;
    font-weight: 600;
    cursor: pointer;
}

/* refined picker search appearance */
.chat-widget__picker-search input {
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: #f8fafc;
    color: #0b1220;
}

.chat-widget__picker-search button {
    background: linear-gradient(135deg, var(--site-primary), #22d3ee);
    color: #fff;
    padding: 10px 14px;
}

@media (max-width: 640px) {
    .chat-widget__picker-search {
        flex-direction: column;
        gap: 8px;
    }
    .chat-widget__picker-search button {
        width: 100%;
    }
}

.chat-widget__picker-results {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;

    gap: 12px;
    z-index: 10001 !important;
}

.chat-widget__picker-item {
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: inherit;
    text-align: left;
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.04);
    transition:
        transform 180ms ease,
        box-shadow 180ms ease;
}
/* dark mode of chat widget */
[data-theme="dark"] .chat-widget__picker-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.85);
    color: #f8fafc;
}

.chat-widget__picker-item-title {
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-widget__picker-item-type {
    font-size: 0.7rem;
    background: var(--site-primary);
    color: #fff;
    padding: 2px 6px;
    border-radius: 999px;
    font-weight: 600;
    text-transform: uppercase;
}

.chat-widget__picker-item-description {
    margin: 4px 0 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chat-widget__picker-item-price {
    font-size: 0.85rem;
    color: var(--site-primary-dark, #0366d6);
    font-weight: 700;
}

.chat-widget__picker-item-price {
    font-size: 0.75rem;
    color: #bae6fd;
}

.chat-widget__picker-item-cta {
    font-size: 0.78rem;
    color: var(--site-primary);
    font-weight: 700;
    background: linear-gradient(135deg, var(--site-primary), #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
}

.chat-widget__picker-empty {
    font-size: 0.85rem;
    color: var(--site-primary);
    text-align: center;
    margin: 0;
}

@keyframes chat-widget-pop {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animated background + text color for preview bubble and quick question buttons */
@keyframes afm-preview-bg {
    0% {
        background: linear-gradient(
            135deg,
            rgba(3, 102, 214, 0.12),
            rgba(56, 189, 248, 0.06)
        );
        color: #f8fafc;
    }
    33% {
        background: linear-gradient(
            135deg,
            rgba(59, 130, 246, 0.14),
            rgba(14, 165, 233, 0.06)
        );
        color: #f8fafc;
    }
    66% {
        background: linear-gradient(
            135deg,
            rgba(236, 72, 153, 0.12),
            rgba(255, 159, 67, 0.06)
        );
        color: #071020;
    }
    100% {
        background: linear-gradient(
            135deg,
            rgba(3, 102, 214, 0.12),
            rgba(56, 189, 248, 0.06)
        );
        color: #f8fafc;
    }
}

.chat-widget__preview-bubble {
    animation: afm-preview-bg 8s ease-in-out infinite;
    transition: color 300ms ease;
    overflow: visible;
    display: flex;
    justify-content: center;
}

.chat-widget__preview-bubble .text {
    color: inherit; /* follow animated color */
}

/* Apply animated background + text only for preview bubble children */
.chat-widget__preview-bubble .chat-widget__quick-btn {
    animation: afm-preview-bg 10s ease-in-out infinite;
    background: transparent; /* let gradient show through */
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: inherit;
    transition:
        transform 150ms ease,
        box-shadow 150ms ease;
}
.chat-widget-search-input {
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: #f8fafc;
    color: #0b1220;
}
[data-theme="dark"] .chat-widget-search-input {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.85);
    color: #f8fafc;
}

.chat-widget__quick-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(2, 6, 23, 0.45);
}

@media (max-width: 640px) {
    .chat-widget {
        right: 12px;
        left: 12px;
        bottom: 12px;
    }

    .chat-widget__panel {
        width: 100%;
        max-height: calc(100vh - 96px);
        border-radius: 12px;
    }

    .chat-widget__quick-list {
        max-width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .chat-widget__quick-item {
        font-size: 0.75rem;
        padding: 6px 8px;
    }

    .chat-widget__picker {
        padding: 14px;
    }

    .chat-widget__picker-results {
        grid-template-columns: 1fr;
        gap: 10px;
        overflow-y: auto;
    }

    .chat-widget__picker-item {
        padding: 12px;
        align-items: flex-start;
        gap: 8px;
    }

    .chat-widget__picker-item-cta {
        background: var(--site-primary);
        color: #fff;
        padding: 6px 10px;
        border-radius: 999px;
        -webkit-background-clip: border-box;
        background-clip: border-box;
    }

    .chat-widget__composer {
        padding: 6px;
    }
}

@media (min-width: 641px) {
    .chat-widget__send-text {
        display: inline;
    }
}

/* Ensure WhatsApp icon + text align and don't get cropped */
.chat-widget__send svg {
    display: block;
    flex: 0 0 auto;
}

@media (max-width: 420px) {
    .chat-widget__panel {
        border-radius: 12px;
    }

    .chat-widget__header {
        padding: 14px;
    }

    .chat-widget__body {
        padding: 14px;
    }
}

/* Quick questions styles */
.chat-widget__quick-questions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
    animation: quick-questions-appear 0.3s ease;
}

@keyframes quick-questions-appear {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-widget__quick-btn {
    border: 1px solid rgba(var(--primary-rgb, 3, 102, 214), 0.4);
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(var(--primary-rgb, 3, 102, 214), 0.1);
    color: var(--site-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.12s ease;
}

.chat-widget__quick-btn:hover {
    background: rgba(var(--primary-rgb, 3, 102, 214), 0.2);
    border-color: rgba(var(--primary-rgb, 3, 102, 214), 0.5);
}

/* Large screens: ensure quick questions stay horizontal */
@media (min-width: 1024px) {
    .chat-widget__quick-questions {
        flex-wrap: nowrap;
    }
}

/* Preview-specific layout tweaks so all quick questions show */
/* preview-specific rules removed — preview now uses typing bubble only */

/* Emoji Picker Styles */
.chat-widget__emoji-picker {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.97);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 5;
}

.chat-widget__emoji-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.chat-widget__emoji-title {
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
    color: #f1f5f9;
}

.chat-widget__emoji-close {
    border: none;
    background: transparent;
    color: #f1f5f9;
    font-size: 1.4rem;
    cursor: pointer;
}

.chat-widget__emoji-categories {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.chat-widget__emoji-category {
    border: none;
    background: rgba(148, 163, 184, 0.2);
    color: #f8fafc;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.chat-widget__emoji-category.active,
.chat-widget__emoji-category:hover {
    background: var(--site-primary);
    color: #0f172a;
}

.chat-widget__emoji-grid {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: 8px;
    padding-right: 6px;
}

.chat-widget__emoji-item {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.chat-widget__emoji-item:hover {
    background: rgba(148, 163, 184, 0.2);
}

.chat-widget__emoji-item:active {
    background: rgba(56, 189, 248, 0.3);
}

/* Mobile adjustments for emoji picker */
@media (max-width: 640px) {
    .chat-widget__emoji-picker {
        padding: 14px;
    }

    .chat-widget__emoji-grid {
        grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
        gap: 6px;
    }

    .chat-widget__emoji-item {
        width: 32px;
        height: 32px;
        font-size: 1.3rem;
    }
}

/* RTL support for quick questions */
[dir="rtl"] .chat-widget__quick-questions {
    flex-direction: row-reverse;
}

@media (max-width: 420px) {
    .chat-widget__quick-questions {
        gap: 6px;
    }

    .chat-widget__quick-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}
