.gc-chat-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000000;
    font-family: inherit;
    --gc-chat-primary: var(--primary-color, #0b5cff);
    --gc-chat-primary-dark: var(--secondary-color, #073a9b);
    --gc-chat-primary-soft: color-mix(in srgb, var(--gc-chat-primary) 10%, white);
    --gc-chat-primary-soft-strong: color-mix(in srgb, var(--gc-chat-primary) 16%, white);
}

.gc-chat-widget__toggle {
    width: 62px;
    height: 62px;
    border: 0;
    border-radius: 999px;
    background: var(--gc-chat-primary);
    color: #fff;
    box-shadow: 0 14px 34px rgba(7, 58, 155, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
}

.gc-chat-widget__panel {
    position: relative;
    width: min(400px, calc(100vw - 24px));
    height: 640px;
    max-height: calc(100vh - 100px);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(16, 24, 40, 0.22);
    overflow: hidden;
    display: none;
    margin-bottom: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.gc-chat-widget.is-open .gc-chat-widget__panel {
    display: flex;
    flex-direction: column;
}

.gc-chat-widget.is-open .gc-chat-widget__toggle {
    display: none;
}

.gc-chat-widget__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px 10px;
    background: var(--gc-chat-primary);
    color: #fff;
}

.gc-chat-widget__header-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.gc-chat-widget__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.gc-chat-widget__subtitle {
    margin: 3px 0 0;
    font-size: 12px;
    opacity: 0.92;
    line-height: 1.3;
}

.gc-chat-widget__close {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.gc-chat-widget__close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.gc-chat-widget__messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 14px 10px;
    background: #f6f8fc;
}

.gc-chat-widget__empty {
    color: #64748b;
    font-size: 14px;
}

.gc-chat-widget__bubble {
    max-width: 86%;
    margin-bottom: 12px;
    padding: 11px 12px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.45;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.gc-chat-widget__bubble--customer {
    margin-left: auto;
    background: var(--gc-chat-primary);
    color: #fff;
    border-bottom-right-radius: 6px;
}

.gc-chat-widget__bubble--system,
.gc-chat-widget__bubble--agent,
.gc-chat-widget__bubble--bot {
    background: #fff;
    color: #101828;
    border-bottom-left-radius: 6px;
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.gc-chat-widget__meta {
    margin-top: 6px;
    font-size: 11px;
    opacity: 0.66;
}

.gc-chat-widget__meta--inline {
    margin-top: 0;
    margin-bottom: 6px;
    opacity: 0.75;
}

.gc-chat-widget__message-copy {
    margin-bottom: 8px;
}

.gc-chat-widget__image-link {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2);
}

.gc-chat-widget__image {
    display: block;
    width: 100%;
    max-width: 220px;
    max-height: 260px;
    object-fit: cover;
    background: #eef2f7;
}

.gc-chat-widget__image-caption {
    margin-top: 8px;
}

.gc-chat-widget__card-group {
    display: grid;
    gap: 10px;
}

.gc-chat-widget__card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    overflow: hidden;
}

.gc-chat-widget__card--product {
    background: #ffffff;
}

.gc-chat-widget__product-table-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.gc-chat-widget__card-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    background: #eef2f7;
}

.gc-chat-widget__card-image--product-row {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    margin: 12px 0 12px 12px;
}

.gc-chat-widget__card-image--placeholder {
    background: #e2e8f0;
}

.gc-chat-widget__card-body {
    padding: 12px;
}

.gc-chat-widget__card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.gc-chat-widget__card-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
}

.gc-chat-widget__card-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--gc-chat-primary);
}

.gc-chat-widget__card-old-price {
    margin-left: 8px;
    color: #6b7280;
    font-weight: 500;
    text-decoration: line-through;
    font-size: 12px;
}

.gc-chat-widget__product-table-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.gc-chat-widget__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.gc-chat-widget__badge--success {
    background: #dcfce7;
    color: #15803d;
}

.gc-chat-widget__badge--muted {
    background: #e5e7eb;
    color: #475569;
}

.gc-chat-widget__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.gc-chat-widget__actions--product-row {
    margin-top: 8px;
}

.gc-chat-widget__button,
.gc-chat-widget__actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 0;
    background: var(--gc-chat-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.gc-chat-widget__button[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
}

.gc-chat-widget__button--secondary {
    background: var(--gc-chat-primary-soft);
    color: var(--gc-chat-primary);
}

.gc-chat-widget__prompt {
    display: grid;
    gap: 10px;
    margin-top: 4px;
}

.gc-chat-widget__prompt .gc-chat-widget__actions {
    margin-top: 0;
}

.gc-chat-widget__prompt .gc-chat-widget__button {
    min-height: 40px;
}

.gc-chat-widget__prompt-input-wrap {
    display: flex;
    gap: 8px;
    align-items: stretch;
    position: relative;
    flex-wrap: wrap;
}

.gc-chat-widget__prompt-input {
    flex: 1;
    min-width: 0;
    height: 42px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 14px;
    padding: 0 14px;
    font-size: 14px;
    background: #fff;
}

.gc-chat-widget__prompt-input--textarea {
    min-height: 78px;
    height: auto;
    padding: 12px 14px;
    resize: vertical;
}

.gc-chat-widget__prompt-suggestions {
    display: none;
    width: 100%;
    margin-top: 2px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.gc-chat-widget__prompt-suggestions.is-open {
    display: block;
}

.gc-chat-widget__prompt-suggestion-item {
    width: 100%;
    border: 0;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    text-align: left;
}

.gc-chat-widget__prompt-suggestion-item + .gc-chat-widget__prompt-suggestion-item {
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.gc-chat-widget__prompt-suggestion-item:hover {
    background: #f8fbff;
}

.gc-chat-widget__prompt-suggestion-image {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    background: #eef2f7;
    flex-shrink: 0;
}

.gc-chat-widget__prompt-suggestion-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.gc-chat-widget__prompt-suggestion-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gc-chat-widget__prompt-suggestion-meta {
    font-size: 11px;
    color: #64748b;
}

.gc-chat-widget__prompt-suggestion-action {
    border: 0;
    min-width: 58px;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--gc-chat-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}

.gc-chat-widget__prompt-tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--gc-chat-primary-soft);
    color: var(--gc-chat-primary-dark);
    font-size: 11px;
    font-weight: 700;
}

.gc-chat-widget__summary {
    display: grid;
    gap: 8px;
    margin-top: 2px;
    padding: 12px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.gc-chat-widget__summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gc-chat-widget__summary-title {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
}

.gc-chat-widget__field-chip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.gc-chat-widget__field-chip {
    display: grid;
    gap: 3px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    font-size: 11px;
    color: #64748b;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.gc-chat-widget__field-chip strong {
    font-size: 12px;
    color: #0f172a;
}

.gc-chat-widget__field-chip.is-filled {
    border-color: color-mix(in srgb, var(--gc-chat-primary) 18%, transparent);
    background: #f8fbff;
}

.gc-chat-widget__field-chip.is-empty {
    border-color: rgba(245, 158, 11, 0.18);
    background: #fffaf0;
}

.gc-chat-widget__summary-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #0f172a;
    font-size: 13px;
}

.gc-chat-widget__summary-total {
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px dashed rgba(15, 23, 42, 0.12);
    font-weight: 700;
}

.gc-chat-widget__summary-address {
    font-size: 13px;
    color: #334155;
    margin-bottom: 4px;
}

.gc-chat-widget__summary-missing {
    display: grid;
    gap: 8px;
    font-size: 12px;
    color: #b45309;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    padding: 8px 10px;
}

.gc-chat-widget__summary-missing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gc-chat-widget__summary-missing-btn {
    min-height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: #ffedd5;
    color: #c2410c;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.gc-chat-widget__saved-address-grid {
    display: grid;
    gap: 8px;
}

.gc-chat-widget__saved-address-card {
    width: 100%;
    text-align: left;
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--gc-chat-primary) 16%, transparent);
    background: #ffffff;
}

.gc-chat-widget__saved-address-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.gc-chat-widget__saved-address-meta {
    font-size: 11px;
    color: var(--gc-chat-primary);
    font-weight: 700;
}

.gc-chat-widget__saved-address-copy {
    font-size: 12px;
    color: #475569;
    line-height: 1.45;
}

.gc-chat-widget__dynamic-control {
    display: grid;
    gap: 8px;
    margin-top: 6px;
}

.gc-chat-widget__select-head {
    display: flex;
    justify-content: flex-start;
}

.gc-chat-widget__select-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.gc-chat-widget__select {
    flex: 1;
    min-width: 0;
    height: 40px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    padding: 0 12px;
    background: #fff;
    color: #0f172a;
}

.gc-chat-widget__composer {
    position: relative;
    padding: 10px 12px 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
}

.gc-chat-widget__form {
    display: grid;
    gap: 8px;
    position: relative;
}

.gc-chat-widget__composer-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.gc-chat-widget__tool-btn {
    width: 42px;
    min-width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 0;
    background: var(--gc-chat-primary-soft);
    color: var(--gc-chat-primary);
    font-size: 18px;
    cursor: pointer;
}

.gc-chat-widget__input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    height: 46px;
    padding: 0 16px;
    font-size: 14px;
}

.gc-chat-widget__submit {
    width: 46px;
    min-width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 0;
    background: var(--gc-chat-primary);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.gc-chat-widget__file-input {
    display: none;
}

.gc-chat-widget__emoji-picker {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    width: 100%;
    display: none;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.18);
}

.gc-chat-widget__emoji-picker.is-open {
    display: grid;
}

.gc-chat-widget__emoji-btn {
    border: 0;
    height: 40px;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 20px;
    cursor: pointer;
}

.gc-chat-widget__attachment-preview {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.gc-chat-widget__attachment-preview.is-visible {
    display: flex;
}

.gc-chat-widget__attachment-preview-image {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 12px;
    background: #eef2f7;
    flex-shrink: 0;
}

.gc-chat-widget__attachment-preview-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    font-size: 12px;
    color: #344054;
}

.gc-chat-widget__attachment-preview-copy span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gc-chat-widget__remove-attachment {
    border: 0;
    background: transparent;
    color: #dc2626;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.gc-chat-widget__status {
    display: none;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.gc-chat-widget__status.is-visible {
    display: block;
}

.gc-chat-widget__status.is-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.gc-chat-widget__status.is-success {
    background: #ecfdf3;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.gc-chat-widget__otp-modal {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 30;
}

.gc-chat-widget__otp-modal.is-open {
    display: flex;
}

.gc-chat-widget__otp-card {
    width: 100%;
    max-width: 344px;
    background: #fff;
    border-radius: 22px;
    padding: 18px 18px 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.24);
    display: grid;
    gap: 14px;
}

.gc-chat-widget__otp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.gc-chat-widget__otp-head h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.gc-chat-widget__otp-close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    background: var(--gc-chat-primary-soft);
    color: var(--gc-chat-primary);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.gc-chat-widget__otp-copy {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
}

.gc-chat-widget__otp-actions,
.gc-chat-widget__otp-row {
    display: flex;
    gap: 8px;
}

.gc-chat-widget__input--otp {
    height: 42px;
    border-radius: 14px;
}

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

    .gc-chat-widget__panel {
        width: calc(100vw - 24px);
        height: min(78vh, 640px);
    }

    .gc-chat-widget__otp-modal {
        align-items: flex-end;
        padding: 12px;
    }

    .gc-chat-widget__otp-card {
        max-width: none;
        border-radius: 20px;
    }

    .gc-chat-widget__select-row {
        flex-direction: column;
        align-items: stretch;
    }

    .gc-chat-widget__otp-actions,
    .gc-chat-widget__otp-row {
        flex-direction: column;
    }

    .gc-chat-widget__prompt-input-wrap {
        flex-direction: column;
    }

    .gc-chat-widget__field-chip-grid {
        grid-template-columns: 1fr;
    }

    .gc-chat-widget__product-table-row {
        grid-template-columns: 60px minmax(0, 1fr);
        gap: 8px;
    }

    .gc-chat-widget__card-image--product-row {
        width: 60px;
        height: 60px;
        margin: 10px 0 10px 10px;
    }

    .gc-chat-widget__button,
    .gc-chat-widget__actions a {
        width: 100%;
    }
}

.gc-chat-widget__summary-item {
    display: grid;
    gap: 8px;
    padding: 10px 0;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.gc-chat-widget__summary-item-head,
.gc-chat-widget__summary-item-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.gc-chat-widget__summary-item-name {
    font-weight: 600;
    color: #0f172a;
}

.gc-chat-widget__qty-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border-radius: 999px;
    background: var(--gc-chat-primary-soft);
}

.gc-chat-widget__qty-btn {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: var(--gc-chat-primary);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.gc-chat-widget__qty-btn[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
}

.gc-chat-widget__qty-value {
    min-width: 18px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.gc-chat-widget__card--success {
    background: #ffffff;
    border: 1px solid rgba(34, 197, 94, 0.22);
    box-shadow: 0 14px 34px rgba(34, 197, 94, 0.10);
}

.gc-chat-widget__success-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 14px;
    background: #f0fdf4;
}

.gc-chat-widget__success-icon {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.gc-chat-widget__success-title {
    font-size: 15px;
    font-weight: 800;
    color: #166534;
    line-height: 1.3;
}

.gc-chat-widget__success-subtitle {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.5;
    color: #3f6212;
}
