/* Modal / form — match legacy Request Price popup */
.magecloud-cfp-modal-inner {
    min-width: 320px;
    max-width: 640px;
    color: #222;
    font-family: Arial, Helvetica, sans-serif;
}
.magecloud-cfp-intro {
    margin: 0 0 18px;
}
.magecloud-cfp-contact {
    margin: 0 0 4px;
    color: #c4161c;
    font-size: 15px;
    line-height: 1.45;
    font-weight: 600;
}
.magecloud-cfp-contact a {
    color: #c4161c;
    text-decoration: none;
}
.magecloud-cfp-contact a:hover {
    text-decoration: underline;
}
.magecloud-cfp-hint {
    margin: 8px 0 0;
    color: #222;
    font-size: 14px;
    font-weight: 400;
}
.magecloud-cfp-form .magecloud-cfp-row {
    display: flex;
    gap: 20px;
    margin-bottom: 14px;
}
.magecloud-cfp-form .magecloud-cfp-row > .field {
    flex: 1;
    margin: 0;
}
.magecloud-cfp-form .magecloud-cfp-row-half > .field {
    flex: 0 0 calc(50% - 10px);
}
.magecloud-cfp-form .field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #222;
    font-size: 14px;
}
.magecloud-cfp-form .field label em {
    color: #c4161c;
    font-style: normal;
}
.magecloud-cfp-form .input-text,
.magecloud-cfp-form .select,
.magecloud-cfp-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cfcfcf;
    border-radius: 0;
    padding: 8px 10px;
    background: #fff;
    min-height: 36px;
    font-size: 14px;
}
.magecloud-cfp-form textarea {
    min-height: 110px;
    resize: vertical;
}
.magecloud-cfp-message-field {
    margin-bottom: 8px;
}
.magecloud-cfp-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e5e5e5;
}
.magecloud-cfp-submit.action.primary,
button.magecloud-cfp-submit {
    background: #c4161c !important;
    border: none !important;
    border-radius: 0 !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    padding: 12px 22px !important;
    letter-spacing: .02em;
}
.magecloud-cfp-submit.action.primary:hover,
button.magecloud-cfp-submit:hover {
    background: #a01217 !important;
}
.magecloud-cfp-message.success {
    color: #006400;
    margin-top: 1rem;
}
.magecloud-cfp-message.error {
    color: #b90406;
    margin-top: 1rem;
}

/* Magento modal chrome tweaks for this popup */
.modal-popup .modal-inner-wrap:has(#magecloud-cfp-modal),
.modal-popup._show .modal-inner-wrap:has(.magecloud-cfp-modal-inner) {
    max-width: 680px;
}
.modal-popup .modal-title {
    font-size: 28px;
    font-weight: 700;
    color: #111;
}

/* Hide prices when Call for Price applies (removes duplicate red text + SPECIAL OFFER price) */
body.magecloud-cfp-hide-price.magecloud-cfp-apply-all .price-box,
body.magecloud-cfp-hide-price.magecloud-cfp-apply-all .special-price,
body.magecloud-cfp-hide-price.magecloud-cfp-apply-all .old-price,
body.magecloud-cfp-hide-price .product-info-main:has(.magecloud-cfp-marker) .price-box,
body.magecloud-cfp-hide-price .product-item:has(.magecloud-cfp-marker) .price-box,
body.magecloud-cfp-hide-price .product-item-info:has(.magecloud-cfp-marker) .price-box {
    display: none !important;
}
.magecloud-cfp-marker {
    display: none !important;
}

/* Hide native cart actions — keep CFP button visible */
body.magecloud-cfp-apply-all .action.tocart:not(.magecloud-cfp-btn),
body.magecloud-cfp-apply-all form[data-role="tocart-form"],
body.magecloud-cfp-apply-all .box-tocart .field.qty,
body.magecloud-cfp-apply-all #product-addtocart-button:not(.magecloud-cfp-btn),
.product-item:has(.magecloud-cfp-marker) .action.tocart:not(.magecloud-cfp-btn),
.product-item:has(.magecloud-cfp-marker) form[data-role="tocart-form"],
.product-item-info:has(.magecloud-cfp-marker) .action.tocart:not(.magecloud-cfp-btn),
.product-item-info:has(.magecloud-cfp-marker) form[data-role="tocart-form"],
.product-info-main:has(.magecloud-cfp-marker) .box-tocart .field.qty,
.product-info-main:has(.magecloud-cfp-marker) #product-addtocart-button:not(.magecloud-cfp-btn),
.product-info-main:has(.magecloud-cfp-marker) .action.tocart:not(.magecloud-cfp-btn) {
    display: none !important;
}

.magecloud-cfp-btn.action.tocart {
    display: block !important;
    visibility: visible !important;
    cursor: pointer;
    text-transform: uppercase;
}
.product-item .magecloud-cfp-btn.action.tocart,
.product-item-info .magecloud-cfp-btn.action.tocart {
    margin: 0 auto;
}
.box-tocart .magecloud-cfp-btn.action.tocart,
.product-info-main .magecloud-cfp-btn.action.tocart {
    width: 100%;
}

@media (max-width: 640px) {
    .magecloud-cfp-form .magecloud-cfp-row,
    .magecloud-cfp-form .magecloud-cfp-row-half {
        flex-direction: column;
        gap: 12px;
    }
    .magecloud-cfp-form .magecloud-cfp-row-half > .field {
        flex: 1;
    }
}
