/* ============================================================
   Request a Quote — Frontend Styles
   ============================================================ */

/* Button */
.raq-open-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 12px 24px;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.15s ease;
    text-decoration: none;
    letter-spacing: 0.3px;
    width: 100%;
    text-align: center;
}
.raq-open-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    color: #fff !important;
}
.raq-open-btn:active {
    transform: translateY(0);
}

/* Overlay */
.raq-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.raq-overlay.raq-open {
    display: flex;
    animation: raqFadeIn 0.22s ease;
}

@keyframes raqFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Modal */
.raq-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    padding: 36px 32px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: raqSlideUp 0.25s ease;
    direction: ltr; /* keep form LTR even on RTL sites */
}

@keyframes raqSlideUp {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Close button */
.raq-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
    z-index: 1;
}
.raq-close:hover { color: #333; }

/* Header */
.raq-modal-header {
    margin-bottom: 24px;
}
.raq-modal-header h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}
.raq-product-label {
    margin: 0;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Form fields */
.raq-field {
    margin-bottom: 18px;
}
.raq-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.raq-required {
    color: #e74c3c;
    margin-left: 2px;
}
.raq-field input,
.raq-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
    outline: none;
}
.raq-field input:focus,
.raq-field textarea:focus {
    border-color: #4a90e2;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.12);
}
.raq-field input.raq-invalid,
.raq-field textarea.raq-invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}
.raq-field textarea {
    resize: vertical;
    min-height: 100px;
}
.raq-field .raq-error {
    display: block;
    font-size: 12px;
    color: #e74c3c;
    margin-top: 4px;
    min-height: 16px;
}

/* Submit button */
.raq-submit-btn {
    display: block;
    width: 100%;
    padding: 13px 20px;
    background: #e74c3c;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    margin-top: 8px;
    letter-spacing: 0.3px;
}
.raq-submit-btn:hover:not(:disabled) {
    background: #c0392b;
    transform: translateY(-1px);
}
.raq-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Success / Error messages */
.raq-success {
    background: #e8f8f0;
    border: 1px solid #2ecc71;
    border-radius: 6px;
    padding: 14px 16px;
    color: #1a7a45;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    text-align: center;
}
.raq-error-box {
    background: #fdf0ef;
    border: 1px solid #e74c3c;
    border-radius: 6px;
    padding: 12px 16px;
    color: #c0392b;
    font-size: 13px;
    margin-bottom: 14px;
}

/* RTL sites — flip form text direction */
html[dir="rtl"] .raq-modal {
    direction: ltr; /* keep form fields LTR regardless */
}
html[dir="rtl"] .raq-modal-header h2,
html[dir="rtl"] .raq-product-label,
html[dir="rtl"] .raq-field label {
    direction: rtl;
    text-align: right;
}
html[dir="rtl"] .raq-field input,
html[dir="rtl"] .raq-field textarea {
    direction: rtl;
    text-align: right;
}
html[dir="rtl"] .raq-close {
    right: auto;
    left: 18px;
}

/* Mobile */
@media (max-width: 480px) {
    .raq-modal {
        padding: 28px 20px 24px;
        border-radius: 10px;
    }
    .raq-modal-header h2 {
        font-size: 18px;
    }
}

/* Prevent body scroll when modal open */
body.raq-no-scroll {
    overflow: hidden;
}
