/* ===================================================================
   RFT Quote — frontend buttons + modal
   =================================================================== */

.rft-quote-product .rft-quote-price {
    display: inline-block;
    background: #fff3eb;
    color: #c84a1f;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 15px;
}

/* -------- Buttons block (single product) -------- */
.rft-quote-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 14px 0;
}

/* Defensive !important on every visual property — Elementor / Crocoblock
   widget styles share the same .button.X specificity and would otherwise
   beat us based on source order, producing the purple/blue theme color. */
.button.rft-quote-btn,
button.rft-quote-btn,
a.rft-quote-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #e35b2a !important;
    background-color: #e35b2a !important;
    background-image: none !important;
    color: #fff !important;
    padding: 14px 22px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: none !important;
    border: 0 !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(227, 91, 42, .2) !important;
    transition: background .15s, transform .12s, box-shadow .15s !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
}
.button.rft-quote-btn:hover,
.button.rft-quote-btn:focus,
button.rft-quote-btn:hover,
button.rft-quote-btn:focus,
a.rft-quote-btn:hover,
a.rft-quote-btn:focus {
    background: #c84a1f !important;
    background-color: #c84a1f !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(227, 91, 42, .28) !important;
}

.button.rft-quote-call-btn,
a.rft-quote-call-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: #1d2327 !important;
    background-color: #1d2327 !important;
    background-image: none !important;
    color: #fff !important;
    padding: 12px 22px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    text-decoration: none !important;
    border: 0 !important;
    transition: background .15s !important;
}
.button.rft-quote-call-btn:hover,
a.rft-quote-call-btn:hover { background: #000 !important; background-color: #000 !important; color: #fff !important; }
.rft-quote-call-num { opacity: .8; font-weight: 400; font-size: 13px; }

.rft-quote-hours {
    margin: 0;
    font-size: 12px;
    color: #646970;
    text-align: center;
}

/* Loop button (archive grids) */
.button.rft-quote-loop-btn {
    background: #1d2327 !important;
    color: #fff !important;
}

/* -------- Hide WC cart form / variations / express-pay on quote products --------
   Covers standard WC themes AND JetWooBuilder / Elementor Pro WC widgets,
   which render their own wrappers and bypass form.cart entirely. */
body.rft-quote-product form.cart:not(.rft-keep),
body.rft-quote-product .single_variation_wrap,
body.rft-quote-product .wc-stripe-payment-request-wrapper,
body.rft-quote-product .wcpay-payment-request-wrapper,
body.rft-quote-product .stripe-payment-request-wrapper,
body.rft-quote-product .elementor-widget-jet-single-add-to-cart,
body.rft-quote-product .elementor-widget-woocommerce-product-add-to-cart,
body.rft-quote-product .elementor-widget-woocommerce-product-price {
    display: none !important;
}

/* -------- Modal -------- */
.rft-quote-modal[hidden] { display: none !important; }

.rft-quote-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.rft-quote-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    cursor: pointer;
    animation: rft-fade-in .2s ease;
}
.rft-quote-modal__panel {
    position: relative;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    width: 92%;
    max-width: 540px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 32px;
    animation: rft-slide-up .25s cubic-bezier(.2,.8,.2,1);
}

@keyframes rft-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rft-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rft-quote-modal__close {
    position: absolute;
    top: 12px; right: 12px;
    background: transparent;
    border: 0;
    font-size: 28px;
    line-height: 1;
    color: #646970;
    cursor: pointer;
    width: 32px; height: 32px;
    border-radius: 50%;
    transition: background .15s;
}
.rft-quote-modal__close:hover { background: #f5f5f5; color: #1d2327; }

.rft-quote-modal h2 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    color: #1d2327;
}
.rft-quote-modal__product {
    margin: 0 0 18px;
    color: #e35b2a;
    font-weight: 600;
    font-size: 15px;
}

.rft-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.rft-form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.rft-form-field--full   { grid-column: 1 / -1; }
.rft-form-field--small  { grid-column: 1; }

.rft-form-field > span {
    font-size: 12px;
    color: #646970;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.rft-form-field input,
.rft-form-field textarea {
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    background: #fafafa;
    transition: border-color .15s, background .15s;
    font-family: inherit;
}
.rft-form-field input:focus,
.rft-form-field textarea:focus {
    border-color: #e35b2a;
    background: #fff;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(227, 91, 42, .12);
}

.button.rft-quote-submit,
button.rft-quote-submit {
    width: 100% !important;
    background: #e35b2a !important;
    background-color: #e35b2a !important;
    background-image: none !important;
    color: #fff !important;
    padding: 14px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border: 0 !important;
    margin-top: 18px !important;
    cursor: pointer !important;
    transition: background .15s !important;
    text-transform: none !important;
}
.button.rft-quote-submit:hover,
button.rft-quote-submit:hover { background: #c84a1f !important; background-color: #c84a1f !important; color: #fff !important; }
.button.rft-quote-submit:disabled,
button.rft-quote-submit:disabled { background: #999 !important; background-color: #999 !important; cursor: wait !important; }

/* Success state */
.rft-quote-modal__success {
    text-align: center;
    padding: 30px 16px;
}
.rft-quote-modal__success-icon {
    width: 64px; height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #dcfce7;
    color: #166534;
    font-size: 36px;
    line-height: 64px;
    font-weight: 700;
}

body.rft-quote-modal-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .rft-quote-modal__panel { padding: 24px; }
    .rft-form-grid { grid-template-columns: 1fr; }
    .rft-form-field--small { grid-column: 1 / -1; }
}
