/* ============================================================
   JetFormBuilder — Dynamic "Request a Quote" form styling
   ------------------------------------------------------------
   The static quote forms in this theme were replaced with a
   JetFormBuilder form (ID 63), rendered via
   [jet_fb_form form_id="63"]. This stylesheet keeps the original
   look of the old static markup by re-targeting JetFormBuilder's
   own class names inside the two containers that host the form:

     .quote-form-fields  — red "Request a Quote" section (all pages)
     .concat-form        — contact page form (inside .contact-grid)

   Brand colors (same as theme): red #d90303, hover gold.
   ============================================================ */

/* ---------- Shared ---------- */

/* Original design used placeholders only -> keep labels for screen readers */
.quote-form-fields .jet-form-builder__label,
.contact-grid .concat-form .jet-form-builder__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.quote-form-fields .jet-form-builder-row {
    margin-bottom: 18px;
}

.contact-grid .concat-form .jet-form-builder-row {
    margin-bottom: 0;
}

.quote-form-fields .jet-form-builder__field-wrap,
.contact-grid .concat-form .jet-form-builder__field-wrap {
    width: 100%;
}

/* ---------- Inputs / textarea ---------- */
.quote-form-fields .jet-form-builder__field,
.contact-grid .concat-form .jet-form-builder__field {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 15px;
    margin: 0;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    font-size: 16px;
    font-family: 'Roboto Condensed', sans-serif;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.quote-form-fields .jet-form-builder__field:focus,
.contact-grid .concat-form .jet-form-builder__field:focus {
    outline: none;
    border-color: #d90303;
}

.quote-form-fields textarea.jet-form-builder__field,
.contact-grid .concat-form textarea.jet-form-builder__field {
    min-height: 140px;
    resize: vertical;
    line-height: 1.5;
}

/* Contact page keeps the original borderless white input look */
.contact-grid .concat-form .jet-form-builder__field {
    padding: 1em;
    margin: 1em 0;
    border: none;
}

/* ---------- Submit button ---------- */
.quote-form-fields .jet-form-builder__action-button,
.contact-grid .concat-form .jet-form-builder__action-button {
    display: block;
    width: 100%;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Roboto Condensed', sans-serif;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

/* Red section (.quote-form): white button, red text */
.quote-form-fields .jet-form-builder__action-button {
    background: #fff;
    color: #d90303;
}

.quote-form-fields .jet-form-builder__action-button:hover {
    background: gold;
    color: red;
}

/* Contact page: red button, white text (matches old submit input) */
.contact-grid .concat-form .jet-form-builder__action-button {
    background: #d90303;
    color: #fff;
    font-size: 1.5em;
    padding: 0.6em 1em;
}

.contact-grid .concat-form .jet-form-builder__action-button:hover {
    background: gold;
    color: red;
}

.quote-form-fields .jet-form-builder__submit-wrap,
.contact-grid .concat-form .jet-form-builder__submit-wrap {
    width: 100%;
}

/* ---------- Messages (success / error) ---------- */
.quote-form-fields .jet-form-builder-messages-wrap,
.contact-grid .concat-form .jet-form-builder-messages-wrap {
    margin-top: 12px;
    font-size: 15px;
    font-family: 'Roboto Condensed', sans-serif;
}

/* On the red section the success text must stay readable */
.quote-form-fields .jet-form-builder-messages-wrap .jet-form-builder-message,
.quote-form-fields .jet-form-builder-messages-wrap {
    color: #fff;
}

.quote-form-fields .jet-form-builder-messages-wrap a {
    color: gold;
}

.contact-grid .concat-form .jet-form-builder-messages-wrap {
    color: #d90303;
    font-weight: 600;
}

/* ---------- Field validation errors ---------- */
.quote-form-fields .jet-form-builder__field-wrap .jet-form-builder__error,
.contact-grid .concat-form .jet-form-builder__field-wrap .jet-form-builder__error {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    color: #ffd7d7;
}

.contact-grid .concat-form .jet-form-builder__field-wrap .jet-form-builder__error {
    color: #d90303;
}

/* ---------- Small screens ---------- */
@media (max-width: 768px) {
    .quote-form-fields .jet-form-builder__field,
    .contact-grid .concat-form .jet-form-builder__field {
        font-size: 15px;
        padding: 10px 12px;
    }

    .quote-form-fields .jet-form-builder__action-button,
    .contact-grid .concat-form .jet-form-builder__action-button {
        font-size: 15px;
        padding: 12px 20px;
    }

    .contact-grid .concat-form .jet-form-builder__action-button {
        font-size: 1.3em;
    }
}

/* ============================================================
   "Thank you" popup — shown after a successful submission
   (markup is created by js/quote-thankyou.js)
   ============================================================ */

.qtm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.62);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.qtm-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.qtm-card {
    width: 100%;
    max-width: 470px;
    background: #fff;
    border-radius: 10px;
    padding: 40px 34px 34px;
    text-align: center;
    font-family: 'Roboto Condensed', sans-serif;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    transform: translateY(22px) scale(0.97);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.qtm-overlay.is-open .qtm-card {
    transform: translateY(0) scale(1);
}

/* --- success icon --- */
.qtm-icon {
    width: 78px;
    height: 78px;
    margin: 0 auto 20px;
}

.qtm-icon svg {
    width: 100%;
    height: 100%;
}

.qtm-icon-circle,
.qtm-icon-check {
    fill: none;
    stroke: #d90303;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.qtm-icon-circle {
    stroke-dasharray: 152;
    stroke-dashoffset: 152;
}

.qtm-icon-check {
    stroke-dasharray: 32;
    stroke-dashoffset: 32;
}

.qtm-overlay.is-open .qtm-icon-circle {
    animation: qtm-draw 0.5s ease forwards;
}

.qtm-overlay.is-open .qtm-icon-check {
    animation: qtm-draw 0.35s 0.42s ease forwards;
}

@keyframes qtm-draw {
    to {
        stroke-dashoffset: 0;
    }
}

/* --- text --- */
.qtm-title {
    margin: 0 0 14px;
    font-size: 27px;
    font-weight: 700;
    color: #d90303;
    line-height: 1.25;
}

.qtm-text {
    margin: 0 0 26px;
    font-size: 16px;
    line-height: 1.7;
    color: #444;
}

/* --- button --- */
.qtm-btn {
    display: inline-block;
    min-width: 150px;
    padding: 13px 34px;
    border: none;
    border-radius: 4px;
    background: #d90303;
    color: #fff;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.qtm-btn:hover,
.qtm-btn:focus {
    background: gold;
    color: red;
    outline: none;
}

/* --- lock page scroll while open --- */
html.qtm-open,
html.qtm-open body {
    overflow: hidden;
}

@media (max-width: 480px) {
    .qtm-card {
        padding: 32px 22px 26px;
    }

    .qtm-title {
        font-size: 22px;
    }

    .qtm-text {
        font-size: 15px;
    }
}

/* ============================================================
   Hide the inline success message injected under the form —
   the "Thank You" popup (js/quote-thankyou.js) replaces it.
   The element is still added to the DOM (the popup script listens
   for it), it is just not rendered.
   ============================================================ */
.jet-form-builder-message--success {
    display: none !important;
}
