.ddcb-widget-shell {
    position: fixed;
    right: var(--ddcb-desktop-h, 24px);
    bottom: var(--ddcb-desktop-v, 24px);
    z-index: 99999;
    font-family: "Outfit", BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ddcb-widget-shell.is-left {
    right: auto;
    left: var(--ddcb-desktop-h, 24px);
}

.ddcb-widget-shell.is-embedded {
    position: relative;
    right: auto;
    left: auto;
    bottom: auto;
    max-width: 420px;
}

.ddcb-welcome-bubble {
    margin: 0 0 10px;
    max-width: 270px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #fff;
    color: #1f2937;
    border: 1px solid rgba(0, 115, 238, 0.14);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    font-size: 14px;
    line-height: 1.5;
}

.ddcb-widget-shell.is-left .ddcb-welcome-bubble {
    margin-left: auto;
}

.ddcb-launcher {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--ddcb-button-color, #0073ee) 0%, var(--ddcb-primary-color, #005bb5) 100%);
    color: #fff;
    box-shadow: 0 16px 32px rgba(0, 91, 181, 0.25);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
}

.ddcb-launcher-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #8ef0b2;
}

.ddcb-panel {
    width: min(var(--ddcb-popup-width, 390px), calc(100vw - 32px));
    margin-top: 14px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.22);
    overflow: hidden;
    border: 1px solid rgba(0, 115, 238, 0.14);
}

.ddcb-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(135deg, var(--ddcb-primary-color, #0073ee) 0%, var(--ddcb-button-color, #005bb5) 100%);
    color: #fff;
}

.ddcb-avatar {
    width: var(--ddcb-avatar-size, 34px);
    height: var(--ddcb-avatar-size, 34px);
    border-radius: 999px;
    object-fit: cover;
    flex-shrink: 0;
}

.ddcb-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    font-size: 13px;
    font-weight: 700;
    width: var(--ddcb-avatar-size, 34px);
    height: var(--ddcb-avatar-size, 34px);
}

.ddcb-header-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ddcb-header-copy strong {
    font-size: 15px;
}

.ddcb-header-copy span {
    font-size: 12px;
    opacity: 0.88;
}

.ddcb-close {
    margin-left: auto;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.ddcb-theme-toggle {
    border: none;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.ddcb-panel-body {
    padding: 16px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.ddcb-terms-notice,
.ddcb-powered-by {
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.5;
    color: #667085;
}

.ddcb-powered-by {
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid #e5eef8;
}

.ddcb-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(var(--ddcb-popup-height, 560px) - 250px);
    overflow-y: auto;
    margin-bottom: 14px;
}

.ddcb-message {
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.ddcb-message.is-user {
    background: var(--ddcb-primary-color, #0073ee);
    color: #fff;
    margin-left: 26px;
}

.ddcb-message.is-assistant {
    background: #fff;
    color: #1f2937;
    border: 1px solid #dbe7f3;
    margin-right: 26px;
}

.ddcb-typing-dots {
    display: inline-flex;
    gap: 5px;
    margin-right: 8px;
    vertical-align: middle;
}

.ddcb-typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #7b8794;
    animation: ddcb-bounce 1s infinite ease-in-out;
}

.ddcb-typing-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.ddcb-typing-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes ddcb-bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
    40% { transform: translateY(-4px); opacity: 1; }
}

.ddcb-quick-actions {
    margin: 0 0 14px;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.ddcb-quick-actions.is-hidden {
    opacity: 0;
    transform: translateY(-4px);
}

.ddcb-block-title {
    margin: 0 0 10px;
    color: #526173;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ddcb-quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ddcb-quick-button {
    border: 1px solid color-mix(in srgb, var(--ddcb-quick-color, var(--ddcb-primary-color, #0073ee)) 25%, #ffffff);
    background: color-mix(in srgb, var(--ddcb-quick-color, var(--ddcb-primary-color, #0073ee)) 10%, #ffffff);
    color: var(--ddcb-quick-color, var(--ddcb-primary-color, #0073ee));
    border-radius: 999px;
    padding: 9px 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.ddcb-pre-chat[hidden],
.ddcb-contact-overlay[hidden] {
    display: none !important;
}

.ddcb-pre-chat,
.ddcb-contact-overlay {
    margin: 0 0 14px;
}

.ddcb-overlay-card {
    border: 1px solid #dbe7f3;
    background: #fff;
    border-radius: 14px;
    padding: 14px;
}

.ddcb-overlay-title {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
}

.ddcb-overlay-form {
    display: grid;
    gap: 10px;
}

.ddcb-overlay-field {
    display: grid;
    gap: 6px;
    font-size: 13px;
    color: #344054;
}

.ddcb-overlay-field input,
.ddcb-overlay-field textarea {
    width: 100%;
    border: 1px solid #d0dbe8;
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    color: #0f172a;
    background: #fff;
}

.ddcb-overlay-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.ddcb-products-block {
    margin: 6px 26px 0 0;
    border: 1px solid #dbe7f3;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
    overflow: hidden;
}

.ddcb-products-toggle {
    width: 100%;
    border: none;
    background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    font: inherit;
    cursor: pointer;
    text-align: left;
}

.ddcb-products-toggle-action {
    flex: 0 0 auto;
    color: var(--ddcb-primary-color, #0073ee);
    font-size: 12px;
    font-weight: 700;
}

.ddcb-product-list {
    display: grid;
    gap: 10px;
    padding: 10px;
}

.ddcb-products-block.is-collapsed .ddcb-product-list {
    display: none;
}

.ddcb-category-links {
    margin: 4px 26px 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.ddcb-category-links-title {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.ddcb-category-link {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 6px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--ddcb-primary-color, #0073ee);
    border: 1px solid #dbeafe;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.ddcb-product-card {
    display: grid;
    grid-template-columns: var(--ddcb-product-image-width, 72px) minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #dbe7f3;
}

.ddcb-widget-shell.hide-product-images .ddcb-product-card {
    grid-template-columns: minmax(0, 1fr);
}

.ddcb-product-media {
    width: var(--ddcb-product-image-width, 72px);
    height: var(--ddcb-product-image-height, 72px);
    border-radius: 12px;
    background: #edf5ff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #0073ee;
    font-weight: 700;
}

.ddcb-product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ddcb-product-body {
    min-width: 0;
}

.ddcb-product-title {
    display: inline-block;
    margin: 0 0 8px;
    color: #101828;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.ddcb-product-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.ddcb-product-price {
    color: #0f172a;
    font-weight: 700;
}

.ddcb-product-stock {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.ddcb-product-sku {
    color: #526173;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ddcb-product-stock.is-instock {
    background: #dcfce7;
    color: #166534;
}

.ddcb-product-stock.is-outofstock {
    background: #fee2e2;
    color: #991b1b;
}

.ddcb-product-description {
    margin: 0 0 10px;
    color: #526173;
    font-size: 13px;
    line-height: 1.5;
}

.ddcb-product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ddcb-widget-shell.header-solid .ddcb-panel-header {
    background: var(--ddcb-primary-color, #0073ee);
}

.ddcb-widget-shell.header-minimal .ddcb-panel-header {
    background: #ffffff;
    color: #101828;
    border-bottom: 1px solid #e5eef8;
}

.ddcb-widget-shell.header-minimal .ddcb-close,
.ddcb-widget-shell.header-minimal .ddcb-theme-toggle {
    color: #101828;
    background: #f2f6fb;
}

.ddcb-widget-shell.scheme-dark .ddcb-panel {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.08);
}

.ddcb-widget-shell.scheme-dark .ddcb-panel-body {
    background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
}

.ddcb-widget-shell.scheme-dark .ddcb-welcome-bubble,
.ddcb-widget-shell.scheme-dark .ddcb-message.is-assistant,
.ddcb-widget-shell.scheme-dark .ddcb-product-card {
    background: #1f2937;
    color: #e5e7eb;
    border-color: rgba(255, 255, 255, 0.08);
}

.ddcb-widget-shell.scheme-dark .ddcb-block-title,
.ddcb-widget-shell.scheme-dark .ddcb-product-description,
.ddcb-widget-shell.scheme-dark .ddcb-powered-by,
.ddcb-widget-shell.scheme-dark .ddcb-terms-notice,
.ddcb-widget-shell.scheme-dark .ddcb-header-copy span {
    color: #cbd5e1;
}

.ddcb-widget-shell.scheme-dark .ddcb-products-block {
    background: #1f2937;
    border-color: rgba(255, 255, 255, 0.08);
}

.ddcb-widget-shell.scheme-dark .ddcb-products-toggle {
    background: #111827;
    color: #e5e7eb;
}

.ddcb-widget-shell.scheme-dark .ddcb-category-links-title {
    color: #cbd5e1;
}

.ddcb-widget-shell.scheme-dark .ddcb-product-title,
.ddcb-widget-shell.scheme-dark .ddcb-header-copy strong {
    color: #ffffff;
}

.ddcb-widget-shell.scheme-dark .ddcb-input {
    background: #0f172a;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.12);
}

.ddcb-widget-shell.scheme-dark .ddcb-submit,
.ddcb-widget-shell.scheme-dark .ddcb-product-button,
.ddcb-widget-shell.scheme-dark .ddcb-product-link {
    box-shadow: none;
}

.ddcb-product-link,
.ddcb-product-button {
    border-radius: 999px;
    padding: 9px 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.ddcb-product-link {
    color: var(--ddcb-primary-color, #0073ee);
    background: #eff6ff;
}

.ddcb-product-button {
    border: none;
    background: var(--ddcb-primary-color, #0073ee);
    color: #fff;
    cursor: pointer;
}

.ddcb-product-button.is-options {
    background: #0f172a;
}

.ddcb-product-button.is-added {
    background: #15803d;
}

.ddcb-product-button[disabled] {
    opacity: 0.7;
    cursor: default;
}

.ddcb-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ddcb-input {
    width: 100%;
    min-height: 88px;
    resize: vertical;
    padding: 12px 14px;
    border: 1px solid #c8d7eb;
    border-radius: 14px;
    font: inherit;
    color: #111827;
    background: #fff;
}

.ddcb-submit {
    align-self: flex-end;
    border: none;
    border-radius: 999px;
    padding: 11px 18px;
    background: var(--ddcb-primary-color, #0f172a);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.ddcb-widget-shell.scheme-dark .ddcb-panel {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.2);
}

.ddcb-widget-shell.scheme-dark .ddcb-panel-body {
    background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
}

.ddcb-widget-shell.scheme-dark .ddcb-message.is-assistant,
.ddcb-widget-shell.scheme-dark .ddcb-product-card {
    background: #111827;
    color: #e5e7eb;
    border-color: #1f2937;
}

.ddcb-widget-shell.scheme-dark .ddcb-product-title,
.ddcb-widget-shell.scheme-dark .ddcb-product-price {
    color: #f8fafc;
}

.ddcb-widget-shell.scheme-dark .ddcb-product-description,
.ddcb-widget-shell.scheme-dark .ddcb-block-title {
    color: #cbd5e1;
}

.ddcb-widget-shell.scheme-dark .ddcb-input {
    background: #0b1220;
    color: #e5e7eb;
    border-color: #334155;
}

@media (prefers-color-scheme: dark) {
    .ddcb-widget-shell.scheme-auto .ddcb-panel {
        background: #0f172a;
        border-color: rgba(148, 163, 184, 0.2);
    }

    .ddcb-widget-shell.scheme-auto .ddcb-panel-body {
        background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
    }

    .ddcb-widget-shell.scheme-auto .ddcb-message.is-assistant,
    .ddcb-widget-shell.scheme-auto .ddcb-product-card {
        background: #111827;
        color: #e5e7eb;
        border-color: #1f2937;
    }

    .ddcb-widget-shell.scheme-auto .ddcb-product-title,
    .ddcb-widget-shell.scheme-auto .ddcb-product-price {
        color: #f8fafc;
    }

    .ddcb-widget-shell.scheme-auto .ddcb-product-description,
    .ddcb-widget-shell.scheme-auto .ddcb-block-title {
        color: #cbd5e1;
    }

    .ddcb-widget-shell.scheme-auto .ddcb-products-block {
        background: #111827;
        border-color: #1f2937;
    }

    .ddcb-widget-shell.scheme-auto .ddcb-products-toggle {
        background: #0b1220;
        color: #e5e7eb;
    }

    .ddcb-widget-shell.scheme-auto .ddcb-category-links-title {
        color: #cbd5e1;
    }

    .ddcb-widget-shell.scheme-auto .ddcb-input {
        background: #0b1220;
        color: #e5e7eb;
        border-color: #334155;
    }
}

@media (max-width: 640px) {
    .ddcb-widget-shell {
        right: var(--ddcb-mobile-h, 12px);
        bottom: var(--ddcb-mobile-v, 12px);
    }

    .ddcb-widget-shell.is-left {
        right: auto;
        left: var(--ddcb-mobile-h, 12px);
    }

    .ddcb-launcher {
        padding: 12px 15px;
    }

    .ddcb-product-card {
        grid-template-columns: min(60px, var(--ddcb-product-image-width, 60px)) minmax(0, 1fr);
    }

    .ddcb-product-media {
        width: min(60px, var(--ddcb-product-image-width, 60px));
        height: min(60px, var(--ddcb-product-image-height, 60px));
    }
}
