#llobregatbot-root {
    --bot-ink: #282828;
    --bot-red: #d83533;
    --bot-yellow: #ffc300;
    --bot-teal: #63b6b6;
    --bot-blue: #279ed9;
    --bot-cream: #faf3e0;
    --bot-cookie-offset: 0px;
    color: var(--bot-ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.5;
}

#llobregatbot-root *,
#llobregatbot-root *::before,
#llobregatbot-root *::after {
    box-sizing: border-box;
}

#llobregatbot-root button {
    min-width: 0 !important;
    min-height: 0 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

#llobregatbot-root .llobregatbot-panel button,
#llobregatbot-root .llobregatbot-panel textarea {
    font: inherit;
}

#llobregatbot-root .llobregatbot-fab {
    position: fixed;
    right: 22px;
    bottom: calc(18px + var(--bot-cookie-offset));
    z-index: 9999;
    display: flex;
    width: 60px;
    height: 60px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: var(--bot-red);
    color: #fff;
    box-shadow: 0 8px 24px rgba(40, 40, 40, .24);
    cursor: pointer;
    padding: 0 !important;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease, visibility .18s ease;
}

#llobregatbot-root .llobregatbot-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 11px 28px rgba(40, 40, 40, .3);
}

#llobregatbot-root .llobregatbot-fab:focus-visible,
#llobregatbot-root .llobregatbot-close:focus-visible,
#llobregatbot-root .llobregatbot-send:focus-visible,
#llobregatbot-root .llobregatbot-shortcut:focus-visible {
    outline: 3px solid var(--bot-yellow);
    outline-offset: 3px;
}

#llobregatbot-root .llobregatbot-fab svg,
#llobregatbot-root .llobregatbot-header-avatar svg,
#llobregatbot-root .llobregatbot-close svg,
#llobregatbot-root .llobregatbot-send svg {
    display: block;
}

#llobregatbot-root .llobregatbot-fab .llobregatbot-fab-close {
    display: none;
}

#llobregatbot-root .llobregatbot-fab.llobregatbot-open {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

#llobregatbot-root .llobregatbot-panel {
    position: fixed;
    right: 22px;
    bottom: calc(82px + var(--bot-cookie-offset));
    z-index: 9998;
    display: flex;
    width: min(500px, calc(var(--bot-viewport-width, 100vw) - 32px));
    height: min(660px, calc(100dvh - var(--bot-cookie-offset) - 112px));
    max-width: calc(var(--bot-viewport-width, 100vw) - 32px);
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e8e2d7;
    border-radius: 20px;
    background: #fffdf9;
    isolation: isolate;
    box-shadow: 0 18px 56px rgba(40, 40, 40, .22), 0 3px 12px rgba(40, 40, 40, .08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(14px) scale(.985);
    transform-origin: bottom right;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

#llobregatbot-root .llobregatbot-panel.llobregatbot-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.llobregatbot-header {
    position: relative;
    display: flex;
    min-height: 78px;
    align-items: center;
    gap: 13px;
    padding: 14px 18px;
    background: var(--bot-ink);
    color: #fff;
    flex: 0 0 auto;
}

.llobregatbot-header::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bot-red) 0 72%, var(--bot-yellow) 72% 100%);
    content: "";
}

.llobregatbot-header-avatar {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border-radius: 14px;
    background: var(--bot-red);
    color: #fff;
}

.llobregatbot-header-text {
    min-width: 0;
    flex: 1;
}

.llobregatbot-title {
    color: #fff;
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.2;
}

.llobregatbot-status {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 4px;
    color: rgba(255, 255, 255, .76);
    font-size: 12px;
    letter-spacing: .01em;
}

.llobregatbot-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #73c899;
    box-shadow: 0 0 0 3px rgba(115, 200, 153, .16);
}

#llobregatbot-root .llobregatbot-close {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    padding: 0 !important;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease;
}

#llobregatbot-root .llobregatbot-close:hover {
    border-color: rgba(255, 255, 255, .36);
    background: rgba(255, 255, 255, .1);
}

.llobregatbot-shortcuts {
    padding: 14px 16px 13px;
    border-bottom: 1px solid #eee9df;
    background: #fffdf9;
    flex: 0 0 auto;
}

.llobregatbot-shortcuts[hidden] {
    display: none;
}

.llobregatbot-shortcuts-label {
    margin-bottom: 9px;
    color: #77736b;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .025em;
}

.llobregatbot-shortcut-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

#llobregatbot-root .llobregatbot-shortcut {
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid #e5ded1;
    border-radius: 999px;
    background: #fff;
    color: #393733;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: none !important;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

#llobregatbot-root .llobregatbot-shortcut:hover {
    border-color: var(--bot-red);
    background: #fff7f5;
    color: #a92524;
}

.llobregatbot-messages {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 13px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 18px 16px;
    background: #f7f5ef;
    overscroll-behavior: contain;
    scrollbar-color: #c9c2b5 transparent;
    scrollbar-width: thin;
}

.llobregatbot-messages::-webkit-scrollbar {
    width: 7px;
}

.llobregatbot-messages::-webkit-scrollbar-thumb {
    border: 2px solid #f7f5ef;
    border-radius: 8px;
    background: #c9c2b5;
}

.llobregatbot-msg {
    display: flex;
    max-width: 88%;
    animation: llobregatbot-msg-in .18s ease both;
}

.llobregatbot-msg-bot {
    width: 100%;
    max-width: 100%;
    align-self: flex-start;
}

.llobregatbot-msg-user {
    align-self: flex-end;
}

@keyframes llobregatbot-msg-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.llobregatbot-msg-content {
    min-width: 0;
    padding: 13px 15px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.62;
    overflow-wrap: anywhere;
    word-break: normal;
}

.llobregatbot-msg-bot .llobregatbot-msg-content {
    width: 100%;
    border: 1px solid #eae5db;
    border-top-left-radius: 5px;
    background: #fff;
    color: #34322e;
    box-shadow: 0 2px 7px rgba(40, 40, 40, .035);
}

.llobregatbot-msg-user .llobregatbot-msg-content {
    border: 1px solid #b92d2b;
    border-top-right-radius: 5px;
    background: var(--bot-red);
    color: #fff;
}

.llobregatbot-msg-content p {
    margin: 0 0 9px;
}

.llobregatbot-msg-content p:last-child {
    margin-bottom: 0;
}

.llobregatbot-msg-content strong {
    color: var(--bot-ink);
    font-weight: 700;
}

.llobregatbot-msg-user .llobregatbot-msg-content strong {
    color: #fff;
}

.llobregatbot-msg-content em {
    font-style: italic;
}

.llobregatbot-msg-content a {
    color: #167ba9;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    overflow-wrap: anywhere;
}

.llobregatbot-msg-content a:hover {
    color: #105e80;
}

.llobregatbot-msg-user .llobregatbot-msg-content a {
    color: #fff;
}

.llobregatbot-msg-content code {
    padding: 1px 5px;
    border: 1px solid #e8e2d7;
    border-radius: 5px;
    background: #f6f3ed;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: .9em;
}

.llobregatbot-msg-content h3,
.llobregatbot-msg-content h4,
.llobregatbot-msg-content h5 {
    margin: 11px 0 6px;
    color: #9f2927;
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    line-height: 1.3;
}

.llobregatbot-msg-content h3 { font-size: 17px; }
.llobregatbot-msg-content h4 { font-size: 16px; }
.llobregatbot-msg-content h5 { font-size: 15px; }

.llobregatbot-msg-content ul,
.llobregatbot-msg-content ol {
    margin: 7px 0 10px;
    padding-left: 22px;
}

.llobregatbot-msg-content li {
    margin: 0 0 5px;
    padding-left: 2px;
}

.llobregatbot-msg-content li:last-child {
    margin-bottom: 0;
}

.llobregatbot-msg-content ul li::marker,
.llobregatbot-msg-content ol li::marker {
    color: var(--bot-red);
}

.llobregatbot-table-wrap {
    max-width: 100%;
    margin: 10px 0;
    overflow-x: auto;
    border: 1px solid #e8e2d7;
    border-radius: 11px;
    background: #fff;
    scrollbar-width: thin;
}

.llobregatbot-table {
    width: 100%;
    min-width: 320px;
    border-collapse: collapse;
    font-size: 12.5px;
    line-height: 1.45;
}

.llobregatbot-table th {
    padding: 10px 11px;
    background: var(--bot-ink);
    color: #fff;
    font-weight: 650;
    text-align: left;
    vertical-align: top;
}

.llobregatbot-table td {
    padding: 9px 11px;
    border-top: 1px solid #eee9df;
    color: #383631;
    text-align: left;
    vertical-align: top;
}

.llobregatbot-table tr:nth-child(even) td {
    background: #fbf9f4;
}

.llobregatbot-products {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 9px;
    align-self: flex-start;
}

.llobregatbot-product {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 13px 15px;
    border: 1px solid #e8e2d7;
    border-left: 3px solid var(--bot-teal);
    border-radius: 13px;
    background: #fff;
    color: var(--bot-ink);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.llobregatbot-product:hover {
    transform: translateY(-1px);
    border-color: #d9cfc0;
    border-left-color: var(--bot-red);
    box-shadow: 0 5px 16px rgba(40, 40, 40, .08);
}

.llobregatbot-product-badge {
    position: absolute;
    top: 11px;
    right: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.llobregatbot-product-badge.in {
    background: #e8f4ee;
    color: #28734c;
}

.llobregatbot-product-badge.out {
    background: #f5ece9;
    color: #94523e;
}

.llobregatbot-product-name {
    padding-right: 82px;
    color: #35332f;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.llobregatbot-product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
}

.llobregatbot-product-price {
    color: #a72c2a;
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: 17px;
    font-weight: 700;
}

.llobregatbot-product-arrow {
    color: var(--bot-blue);
    font-size: 18px;
    font-weight: 700;
}

.llobregatbot-input {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    padding: 12px 14px 8px;
    border-top: 1px solid #e8e2d7;
    background: #fffdf9;
    flex: 0 0 auto;
}

#llobregatbot-root .llobregatbot-input textarea {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    max-height: 118px;
    flex: 1 1 auto;
    resize: none;
    padding: 11px 13px;
    border: 1px solid #d9d3c8;
    border-radius: 13px;
    outline: none;
    background: #fff;
    color: #282828;
    font-size: 14px;
    line-height: 1.45;
    text-transform: none !important;
    transition: border-color .15s ease, box-shadow .15s ease;
}

#llobregatbot-root .llobregatbot-input textarea::placeholder {
    color: #77736b;
    opacity: 1;
}

#llobregatbot-root .llobregatbot-input textarea:focus {
    border-color: var(--bot-blue);
    box-shadow: 0 0 0 3px rgba(39, 158, 217, .13);
}

#llobregatbot-root .llobregatbot-send {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    padding: 0 !important;
    border: 0;
    border-radius: 13px;
    background: var(--bot-red);
    color: #fff;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease, opacity .15s ease;
}

#llobregatbot-root .llobregatbot-send:hover {
    transform: translateY(-1px);
    background: #b72d2b;
}

#llobregatbot-root .llobregatbot-send:disabled {
    opacity: .52;
    cursor: wait;
    transform: none;
}

.llobregatbot-input-hint {
    padding: 0 16px 10px;
    background: #fffdf9;
    color: #817c72;
    font-size: 10.5px;
    text-align: right;
    flex: 0 0 auto;
}

.llobregatbot-typing {
    display: inline-flex;
    gap: 5px;
    padding: 5px 2px;
}

.llobregatbot-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #aaa397;
    animation: llobregatbot-bounce 1.15s infinite;
}

.llobregatbot-typing span:nth-child(2) { animation-delay: .14s; }
.llobregatbot-typing span:nth-child(3) { animation-delay: .28s; }

@keyframes llobregatbot-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

@media (max-width: 540px) {
    #llobregatbot-root .llobregatbot-fab {
        right: max(14px, calc((100vw - var(--bot-viewport-width, 100vw)) + 14px));
        bottom: calc(14px + var(--bot-cookie-offset));
        width: 56px;
        height: 56px;
    }

    #llobregatbot-root .llobregatbot-panel {
        right: max(8px, calc((100vw - var(--bot-viewport-width, 100vw)) + 8px));
        bottom: calc(76px + var(--bot-cookie-offset));
        left: 8px;
        width: calc(var(--bot-viewport-width, 100vw) - 16px);
        max-width: calc(var(--bot-viewport-width, 100vw) - 16px);
        height: min(680px, calc(100dvh - var(--bot-cookie-offset) - 96px));
        min-height: 0;
        border-radius: 17px;
        transform-origin: bottom center;
    }

    .llobregatbot-header {
        min-height: 72px;
        padding: 12px 14px;
    }

    .llobregatbot-shortcuts {
        padding: 11px 12px;
    }

    .llobregatbot-shortcut-list {
        gap: 6px;
    }

    .llobregatbot-shortcut {
        min-height: 32px;
        padding: 7px 9px;
        font-size: 11.5px;
    }

    .llobregatbot-messages {
        padding: 13px 11px;
    }

    .llobregatbot-msg-user {
        max-width: 92%;
    }

    .llobregatbot-msg-content {
        padding: 11px 12px;
        font-size: 13.5px;
    }

    .llobregatbot-input {
        padding: 10px 10px 6px;
    }

    .llobregatbot-input-hint {
        padding-right: 12px;
    }
}

@media (max-width: 540px) and (max-height: 760px) {
    #llobregatbot-root.llobregatbot-cookie-overlay .llobregatbot-panel {
        top: 10px;
        bottom: 10px;
        height: calc(100dvh - 20px);
        max-height: calc(100dvh - 20px);
    }

    #llobregatbot-root.llobregatbot-cookie-overlay .llobregatbot-fab {
        bottom: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #llobregatbot-root *,
    #llobregatbot-root *::before,
    #llobregatbot-root *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
