.chatbot-promo .sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.chatbot-promo {
    position: fixed; right: 24px; bottom: 24px; z-index: 30; width: 116px;
    padding: 0; border: 0; background: transparent; color: var(--brown-deep);
    text-align: center; animation: chatbot-enter .55s ease both;
}
.chatbot-greeting { position: absolute; right: calc(100% + 16px); top: 50%; transform: translateY(-50%); width: min(220px, calc(100vw - 180px)); margin: 0; padding: 14px 16px; border: 1px solid var(--sand); border-radius: 14px; background: var(--white); color: var(--brown-deep); box-shadow: var(--shadow); font-size: 14px; line-height: 1.4; text-align: center; }
.chatbot-greeting:not([hidden]) { animation: chatbot-greeting-enter 1s ease-in-out both; }
.chatbot-greeting.is-leaving { animation: chatbot-greeting-exit .8s ease-in-out both; }
.chatbot-greeting::after { content: ""; position: absolute; top: calc(50% - 6px); right: -7px; width: 12px; height: 12px; border-top: 1px solid var(--sand); border-right: 1px solid var(--sand); background: var(--white); transform: rotate(45deg); }
.chatbot-button { width: 116px; height: 116px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; transition: transform .25s; }
.chatbot-button:hover { transform: rotate(-4deg) scale(1.06); }
.chatbot-button img { display: block; width: 88%; height: 88%; margin: auto; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(89,62,46,.24)); }

.chatbot-panel {
    position: absolute;
    right: 18px;
    bottom: calc(100% + 14px);
    z-index: 1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    width: min(380px, calc(100vw - 40px));
    height: min(570px, calc(100dvh - 150px));
    min-height: 390px;
    overflow: hidden;
    border: 1px solid rgba(139, 98, 70, .32);
    border-radius: 22px;
    background: #fff;
    color: var(--brown-deep);
    box-shadow: 0 22px 60px rgba(63, 40, 27, .24);
    transform-origin: right bottom;
}

.chatbot-panel[hidden] { display: none; }
.chatbot-panel.is-opening { animation: chatbot-panel-in .24s cubic-bezier(.2, .8, .2, 1) both; }
.chatbot-panel.is-closing { animation: chatbot-panel-out .18s ease-in both; }

.chatbot-panel__header {
    display: flex;
    min-height: 76px;
    padding: 14px 14px 14px 16px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--brown-deep);
    color: #fff;
}

.chatbot-panel__identity { display: flex; min-width: 0; align-items: center; gap: 11px; }
.chatbot-panel__identity h2 { margin: 0 0 4px; color: inherit; font-size: 16px; line-height: 1.1; }
.chatbot-panel__identity p { display: flex; margin: 0; align-items: center; gap: 6px; color: #f3e8df; font-size: 11px; }
.chatbot-panel__mark,
.chatbot-empty-state__icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 50%;
    background: var(--sand);
    color: var(--brown-deep);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -.04em;
}
.chatbot-panel__status-dot { width: 7px; height: 7px; border-radius: 50%; background: #e7b66d; box-shadow: 0 0 0 3px rgba(231, 182, 109, .18); }
.chatbot-panel__status-dot.is-online { background: #77c48f; box-shadow: 0 0 0 3px rgba(119, 196, 143, .18); }
.chatbot-panel__close {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 27px;
    line-height: 1;
}
.chatbot-panel__close:hover { background: rgba(255, 255, 255, .12); }

.chatbot-messages {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 20px 16px;
    background: linear-gradient(180deg, #fbf8f5 0%, #fff 55%);
    scrollbar-color: var(--sand) transparent;
}
.chatbot-empty-state { display: flex; align-items: flex-start; gap: 10px; }
.chatbot-empty-state__icon { width: 34px; height: 34px; border-color: var(--sand); font-size: 9px; }
.chatbot-empty-state p,
.chatbot-message {
    max-width: 82%;
    margin: 0;
    padding: 11px 13px;
    border-radius: 6px 16px 16px 16px;
    background: #f0e5dc;
    color: var(--brown-deep);
    font-size: 13px;
    line-height: 1.48;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}
.chatbot-message { margin-top: 12px; }
.chatbot-message--user { margin-left: auto; border-radius: 16px 6px 16px 16px; background: var(--brown); color: #fff; }
.chatbot-message--system { border: 1px solid #dcc3ae; background: #fff9f3; }
.chatbot-products { display: grid; gap: 8px; margin-top: 9px; }
.chatbot-product { display: flex; min-height: 68px; overflow: hidden; border: 1px solid #e2d2c7; border-radius: 12px; background: #fff; color: var(--brown-deep); text-decoration: none; }
.chatbot-product:hover { border-color: var(--brown); box-shadow: 0 4px 12px rgba(63, 40, 27, .1); }
.chatbot-product img { width: 72px; object-fit: cover; background: #f4ece6; }
.chatbot-product__body { display: flex; min-width: 0; padding: 9px 10px; flex-direction: column; justify-content: center; gap: 2px; font-size: 11px; }
.chatbot-product__body strong { font-size: 12px; overflow-wrap: anywhere; }
.chatbot-product__price { color: var(--brown); font-weight: 800; }
.chatbot-product__body small { color: #756358; }
.chatbot-actions { display: flex; margin-top: 9px; flex-wrap: wrap; gap: 7px; }
.chatbot-action { display: inline-flex; min-height: 38px; padding: 8px 12px; align-items: center; gap: 7px; border: 1px solid var(--brown); border-radius: 999px; background: #fff; color: var(--brown-deep); text-decoration: none; font-size: 12px; font-weight: 700; line-height: 1.2; }
.chatbot-action:hover { background: #f5ebe3; box-shadow: 0 3px 9px rgba(63, 40, 27, .1); }
.chatbot-action:focus-visible { outline: 3px solid #e4ad65; outline-offset: 2px; }
.chatbot-action__icon { width: 15px; height: 15px; flex: 0 0 auto; border: 1.5px solid currentColor; border-radius: 4px; }
.chatbot-action__icon--cart { border-radius: 2px 2px 6px 6px; transform: rotate(-4deg); }
.chatbot-action__icon--account { border-radius: 50%; }
.chatbot-action__icon--location { border-radius: 50% 50% 50% 0; transform: rotate(-45deg) scale(.82); }
.chatbot-action__icon--search { border-radius: 50%; }

.chatbot-typing { display: flex; height: 24px; padding: 4px 18px; align-items: center; gap: 4px; background: #fff; }
.chatbot-typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--brown); animation: chatbot-dot 1s infinite ease-in-out; }
.chatbot-typing i:nth-of-type(2) { animation-delay: .12s; }
.chatbot-typing i:nth-of-type(3) { animation-delay: .24s; }
.chatbot-error { margin: 0; padding: 7px 16px; background: #fff0ed; color: #8b271e; font-size: 12px; }

.chatbot-composer {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 9px;
    padding: 12px 13px 25px;
    align-items: end;
    border-top: 1px solid #eadfd8;
    background: #fff;
}
.chatbot-composer textarea {
    width: 100%;
    min-height: 42px;
    max-height: 110px;
    resize: none;
    overflow-y: auto;
    padding: 10px 12px;
    border: 1px solid #cdb6a5;
    border-radius: 14px;
    background: #fff;
    color: var(--brown-deep);
    font: inherit;
    font-size: 13px;
    line-height: 20px;
}
.chatbot-composer textarea::placeholder { color: #8c7a6f; }
.chatbot-send {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--brown);
    color: #fff;
    cursor: pointer;
    font-size: 17px;
}
.chatbot-send:disabled { cursor: not-allowed; opacity: .42; }
.chatbot-character-count { position: absolute; right: 66px; bottom: 7px; color: #806d61; font-size: 9px; }
.chatbot-button:focus-visible,
.chatbot-panel button:focus-visible,
.chatbot-panel textarea:focus-visible,
.chatbot-messages:focus-visible { outline: 3px solid #e4ad65; outline-offset: 3px; }
body.chatbot-open { overflow: auto; }

@keyframes chatbot-panel-in { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes chatbot-panel-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes chatbot-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-3px); opacity: 1; } }
@keyframes chatbot-greeting-enter { from { opacity: 0; transform: translateY(calc(-50% + var(--greeting-enter-offset, -20px))); } to { opacity: 1; transform: translateY(-50%); } }
@keyframes chatbot-greeting-exit { from { opacity: 1; transform: translateY(-50%); } to { opacity: 0; transform: translateY(calc(-50% + var(--greeting-exit-offset, 12px))); } }
@keyframes chatbot-enter { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) {
    .chatbot-promo { right: 12px; bottom: 12px; width: 66px; }
    .chatbot-greeting { width: min(220px, calc(100vw - 106px)); padding: 12px; font-size: 12px; }
    .chatbot-button { width: 66px; height: 66px; }
    .chatbot-panel {
        position: fixed;
        inset: auto max(10px, env(safe-area-inset-right)) max(88px, calc(76px + env(safe-area-inset-bottom))) max(10px, env(safe-area-inset-left));
        width: auto;
        height: min(600px, calc(100dvh - 110px - env(safe-area-inset-top)));
        min-height: min(390px, calc(100dvh - 110px));
        border-radius: 20px;
        transform-origin: right bottom;
    }
    .chatbot-panel__header { padding-top: max(12px, env(safe-area-inset-top)); }
    .chatbot-messages { padding: 16px 13px; }
    .chatbot-empty-state p, .chatbot-message { max-width: 88%; font-size: 12.5px; }
    body.chatbot-open { overflow: hidden; }
}

@media (max-height: 560px) and (orientation: landscape) {
    .chatbot-panel { bottom: 10px; height: calc(100dvh - 20px); min-height: 0; }
    .chatbot-panel__header { min-height: 62px; padding-block: 9px; }
}

@media (prefers-reduced-motion: reduce) {
    .chatbot-panel, .chatbot-typing i { animation: none !important; }
    .chatbot-greeting { --greeting-enter-offset: 0px; --greeting-exit-offset: 0px; }
}
