/* Chatbot Container */
#wsc-chat-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Toggle Button */
#wsc-chat-toggle {
    width: 60px;
    height: 60px;
    background: #000;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

#wsc-chat-toggle:hover {
    transform: scale(1.05);
}

#wsc-chat-toggle svg {
    width: 30px;
    height: 30px;
    fill: #fff;
}

/* Chat Window */
#wsc-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
}

#wsc-chat-wrapper.open #wsc-chat-window {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* Header */
.wsc-header {
    background: #000;
    color: #fff;
    padding: 15px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wsc-close {
    cursor: pointer;
    font-size: 20px;
    opacity: 0.7;
}

.wsc-close:hover {
    opacity: 1;
}

/* Messages Area */
.wsc-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wsc-message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.wsc-message.user {
    align-self: flex-end;
    background: #000;
    color: #fff;
    border-bottom-right-radius: 2px;
}

.wsc-message.bot {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #333;
    border-bottom-left-radius: 2px;
}

.wsc-message a {
    color: #0066cc;
    text-decoration: underline;
    word-break: break-word;
}

.wsc-message a:hover {
    color: #004499;
}

.wsc-message a.wsc-product-link {
    font-weight: 600;
    color: #d97706;
}

.wsc-message a.wsc-product-link:hover {
    color: #b45309;
}

/* Cart Buttons */
.wsc-cart-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    padding: 0 15px 10px 15px;
}

.wsc-product-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #d4a574 100%);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(212, 165, 116, 0.3);
}

.wsc-product-header {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: white;
}

.wsc-product-name {
    font-weight: 600;
    font-size: 13px;
}

.wsc-toggle-form {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s;
}

.wsc-toggle-form:hover {
    background: rgba(255, 255, 255, 0.3);
}

.wsc-product-form {
    background: white;
    padding: 15px;
}

.wsc-form-row {
    margin-bottom: 12px;
}

.wsc-form-row label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.wsc-form-row input[type="number"],
.wsc-form-row select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
}

.wsc-form-row input[type="number"]:focus,
.wsc-form-row select:focus {
    outline: none;
    border-color: #667eea;
}

.wsc-submit-cart {
    width: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #d4a574 100%);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.wsc-submit-cart:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.4);
}

.wsc-submit-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wsc-submit-cart svg {
    flex-shrink: 0;
}

/* WhatsApp Button */
.wsc-whatsapp-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin: 10px 15px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.wsc-whatsapp-btn:hover {
    background: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    color: white;
}

.wsc-whatsapp-btn svg {
    flex-shrink: 0;
}

.wsc-message.loading {
    background: transparent;
    border: none;
    padding: 0;
}

/* Input Area */
.wsc-input-area {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.wsc-input-area input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    outline: none;
}

.wsc-input-area input:focus {
    border-color: #000;
}

.wsc-input-area button {
    background: #000;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wsc-input-area button:hover {
    background: #333;
}

/* Markdown Styles */
.wsc-message ul {
    margin: 5px 0 5px 20px;
    padding: 0;
}

.wsc-message p {
    margin: 0 0 5px 0;
}

.wsc-message p:last-child {
    margin: 0;
}