#qc-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Bubble */
#qc-bubble {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: background 0.2s, transform 0.2s;
}
#qc-bubble:hover {
    background: #1d4ed8;
    transform: scale(1.05);
}
#qc-bubble.qc-bubble-active {
    background: #6b7280;
}

/* Panel */
#qc-panel {
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 48px);
    height: 480px;
    max-height: calc(100vh - 120px);
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#qc-panel.qc-hidden {
    display: none;
}

/* Header */
#qc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}
#qc-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6b7280;
    padding: 0 4px;
    line-height: 1;
}
#qc-close:hover {
    color: #111827;
}

/* Messages */
#qc-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qc-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
}
.qc-msg-bot {
    background: #f3f4f6;
    color: #1f2937;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.qc-msg-user {
    background: #2563eb;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Options */
#qc-options {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
}

.qc-option {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    text-align: left;
    background: white;
    color: #2563eb;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.qc-option:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}
.qc-option-muted {
    color: #6b7280;
    border-color: #e5e7eb;
}
.qc-option-muted:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}
.qc-option-primary {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
    text-align: center;
    font-weight: 500;
    margin-top: 4px;
}
.qc-option-primary:hover {
    background: #1d4ed8;
}
.qc-option-primary:disabled {
    background: #9ca3af;
    border-color: #9ca3af;
    cursor: not-allowed;
}

/* Contact form */
.qc-form-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}
.qc-form-input {
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.15s;
    font-family: inherit;
    resize: vertical;
}
.qc-form-input:focus {
    border-color: #2563eb;
}

/* Mobile */
@media (max-width: 480px) {
    #qc-panel {
        width: calc(100vw - 32px);
        right: -8px;
        bottom: 68px;
        height: 70vh;
    }
    #qc-widget {
        bottom: 16px;
        right: 16px;
    }
}
