#zila-widget-container {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#zila-toggle-btn {
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--zila-primary, #0f766e);
    color: #fff;
    border: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

#zila-toggle-btn:hover {
    transform: scale(1.06);
}

#zila-unread-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#zila-unread-badge.zila-badge-hidden {
    display: none;
}

#zila-chat-box {
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 375px;
    max-width: calc(100vw - 28px);
    height: 545px;
    max-height: calc(100vh - 105px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

#zila-chat-box.zila-hidden {
    display: none;
}

.zila-header {
    background: var(--zila-primary, #0f766e);
    color: #fff;
    padding: 13px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.zila-header strong {
    display: block;
    font-size: 15px;
}

.zila-status {
    font-size: 11.5px;
    color: #a7f3d0;
}

#zila-close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.zila-quick-actions {
    display: flex;
    gap: 6px;
    padding: 8px 10px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
    white-space: nowrap;
}

.zila-quick-actions::-webkit-scrollbar {
    display: none;
}

.zila-action-chip {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    border-radius: 14px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.zila-action-chip:hover {
    border-color: var(--zila-primary, #0f766e);
    color: var(--zila-primary, #0f766e);
}

.zila-messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.zila-msg {
    max-width: 86%;
    padding: 10px 13px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.45;
    word-wrap: break-word;
    white-space: pre-line;
}

.zila-msg-bot {
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.zila-msg-bot.zila-msg-alert {
    background: #ecfdf5;
    border-color: #10b981;
    color: #065f46;
}

.zila-msg-user {
    background: var(--zila-primary, #0f766e);
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.zila-product-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 94%;
}

.zila-product-card {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px;
    transition: border-color 0.2s;
}

.zila-product-card:hover {
    border-color: var(--zila-primary, #0f766e);
}

.zila-product-card img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.zila-product-info {
    flex: 1;
    min-width: 0;
}

.zila-product-title {
    font-size: 12.5px;
    font-weight: 600;
    color: #111827;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zila-product-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.zila-product-price {
    font-size: 12.5px;
    font-weight: 700;
    color: #dc2626;
}

.zila-product-stock {
    font-size: 11px;
    color: #059669;
    background: #ecfdf5;
    padding: 1px 6px;
    border-radius: 8px;
}

.zila-product-stock.out {
    color: #dc2626;
    background: #fef2f2;
}

.zila-order-trigger-btn {
    background: var(--zila-primary, #0f766e);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}

.zila-order-trigger-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.zila-inline-card {
    background: #ffffff;
    border: 1.5px solid var(--zila-primary, #0f766e);
    border-radius: 12px;
    padding: 11px;
    max-width: 94%;
    display: flex;
    flex-direction: column;
    gap: 7px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.zila-inline-card h4 {
    margin: 0 0 2px;
    font-size: 13.5px;
    color: var(--zila-primary, #0f766e);
}

.zila-inline-card input,
.zila-inline-card textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    padding: 6px 9px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}

.zila-inline-card input:focus,
.zila-inline-card textarea:focus {
    border-color: var(--zila-primary, #0f766e);
}

.zila-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    color: #374151;
}

.zila-qty-row input {
    width: 75px;
    text-align: center;
}

.zila-inline-actions {
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

.zila-btn-submit {
    flex: 1;
    background: var(--zila-primary, #0f766e);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.zila-btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12.5px;
    cursor: pointer;
}

.zila-input-area {
    display: flex;
    padding: 10px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    gap: 8px;
}

#zila-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13.5px;
    outline: none;
}

#zila-input:focus {
    border-color: var(--zila-primary, #0f766e);
}

#zila-send-btn {
    background: var(--zila-primary, #0f766e);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 0 16px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
}

#zila-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
