/* ═══════════════════════════════
   Vappax Quote Drawer — Frontend
═══════════════════════════════ */

/* Overlay */
.vappax-quote-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99998;
    backdrop-filter: blur(2px);
}

.vappax-quote-overlay.is-open {
    display: block;
    animation: vqFadeIn 0.2s ease;
}

/* Drawer */
.vappax-quote-drawer {
    position: fixed;
    top: 0;
    right: -520px;
    width: 100%;
    max-width: 500px;
    height: 100%;
    background: #fff;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.18);
    transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.vappax-quote-drawer.is-open {
    right: 0;
}

/* Header */
.vq-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #0f172a;
    flex-shrink: 0;
}

.vq-drawer-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.vq-drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 22px;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.vq-drawer-close:hover {
    color: #fff;
}

/* Body */
.vq-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Product Summary */
.vq-product-summary {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
}

.vq-product-thumb {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.vq-product-thumb-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 24px;
    flex-shrink: 0;
}

.vq-product-info h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.vq-product-info .vq-sku {
    font-size: 12px;
    color: #64748b;
}

.vq-product-info .vq-price {
    font-size: 14px;
    font-weight: 600;
    color: #00cbc7;
    margin-top: 4px;
}

/* Form */
.vq-form-row {
    margin-bottom: 18px;
}

.vq-form-row label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}

.vq-form-row label .required {
    color: #ef4444;
    margin-left: 2px;
}

.vq-form-row input[type="text"],
.vq-form-row input[type="email"],
.vq-form-row input[type="tel"],
.vq-form-row input[type="number"],
.vq-form-row textarea,
.vq-form-row select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: #0f172a;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}

.vq-form-row input:focus,
.vq-form-row textarea:focus,
.vq-form-row select:focus {
    border-color: #00cbc7;
    box-shadow: 0 0 0 3px rgba(0, 203, 199, 0.15);
}

.vq-form-row textarea {
    min-height: 100px;
    resize: vertical;
}

.vq-form-row.vq-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Error */
.vq-field-error {
    display: none;
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
}

.vq-form-row.has-error input,
.vq-form-row.has-error textarea {
    border-color: #ef4444;
}

.vq-form-row.has-error .vq-field-error {
    display: block;
}

/* Response message */
.vq-response {
    display: none;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 600;
}

.vq-response.success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
    display: block;
}

.vq-response.error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    display: block;
}

/* Footer */
.vq-drawer-footer {
    padding: 18px 24px;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
    background: #f8fafc;
}

.vq-submit-btn {
    width: 100%;
    padding: 14px;
    background: #00CBC7;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.vq-submit-btn:hover {
    background: #0ea5a4;
    transform: translateY(-1px);
}

.vq-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.vq-privacy-note {
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 10px;
}

/* Success state */
.vq-success-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
    text-align: center;
}

.vq-success-state .vq-success-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.vq-success-state h3 {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
}

.vq-success-state p {
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
}

/* Animations */
@keyframes vqFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Mobile */
@media (max-width: 540px) {
    .vappax-quote-drawer {
        max-width: 100%;
    }

    .vq-form-row.vq-two-col {
        grid-template-columns: 1fr;
    }

    .vq-drawer-body {
        padding: 16px;
    }
}