/**
 * InstaPay Gateway — Checkout styles.
 * Uses high specificity to prevent theme/page-builder overrides.
 *
 * @package InstaPay_Gateway
 */

/* ─── Main container ─── */
.woocommerce .instapay-checkout-box,
.woocommerce-checkout .instapay-checkout-box,
.instapay-checkout-box {
    background: #f9f5ff !important;
    border: 1px solid #6b3fa0 !important;
    border-radius: 12px !important;
    margin: 10px 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* ─── Payment details ─── */
.woocommerce .instapay-checkout-box .instapay-details,
.instapay-checkout-box .instapay-details {
    padding: 20px !important;
    text-align: center !important;
}

/* ─── QR Code ─── */
.instapay-checkout-box .instapay-qr-label {
    margin: 0 0 8px !important;
    font-weight: 600 !important;
    color: #6b3fa0 !important;
    font-size: 15px !important;
}

.instapay-checkout-box img.instapay-qr-img,
.woocommerce .instapay-checkout-box img.instapay-qr-img,
.woocommerce-checkout .instapay-checkout-box img.instapay-qr-img,
.elementor-widget-woocommerce-checkout-page .instapay-checkout-box img.instapay-qr-img {
    max-width: 220px !important;
    width: 220px !important;
    height: auto !important;
    border-radius: 8px !important;
    margin: 0 auto 12px !important;
    display: block !important;
    object-fit: contain !important;
}

/* ─── Or separator ─── */
.instapay-checkout-box .instapay-or {
    margin: 12px 0 6px !important;
    font-size: 14px !important;
    color: #555 !important;
}

/* ─── Pay button ─── */
.instapay-checkout-box a.instapay-pay-btn,
.instapay-checkout-box a.instapay-pay-btn:visited,
.woocommerce .instapay-checkout-box a.instapay-pay-btn,
.elementor-widget-woocommerce-checkout-page a.instapay-pay-btn {
    display: inline-block !important;
    background: linear-gradient(135deg, #6b3fa0, #e8612d) !important;
    color: #fff !important;
    padding: 12px 28px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    margin-bottom: 14px !important;
    transition: opacity 0.2s !important;
    border: none !important;
    line-height: 1.4 !important;
}

.instapay-checkout-box a.instapay-pay-btn:hover,
.instapay-checkout-box a.instapay-pay-btn:focus {
    opacity: 0.9 !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* ─── Account details card ─── */
.instapay-checkout-box .instapay-account-card {
    background: #fff !important;
    border-radius: 8px !important;
    padding: 12px !important;
    margin-top: 10px !important;
    text-align: left !important;
    font-size: 13px !important;
    line-height: 1.7 !important;
    border: 1px solid #e0d4f0 !important;
    color: #333 !important;
}

.instapay-checkout-box .instapay-account-card .instapay-address {
    color: #6b3fa0 !important;
    font-weight: 600 !important;
}

.instapay-checkout-box .instapay-account-card .instapay-amount {
    color: #e8612d !important;
    font-weight: 700 !important;
}

/* ─── Fields area ─── */
.instapay-checkout-box .instapay-fields {
    padding: 0 20px 20px !important;
    text-align: left !important;
}

.instapay-checkout-box .instapay-field-group {
    margin-top: 14px !important;
}

.instapay-checkout-box .instapay-field-group:first-child {
    margin-top: 0 !important;
}

.instapay-checkout-box .instapay-field-group label,
.woocommerce .instapay-checkout-box .instapay-field-group label,
.elementor-widget-woocommerce-checkout-page .instapay-checkout-box label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #333 !important;
    display: block !important;
    margin-bottom: 4px !important;
}

.instapay-checkout-box .instapay-field-group input[type="text"],
.woocommerce .instapay-checkout-box input[type="text"] {
    width: 100% !important;
    padding: 10px !important;
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    background: #fff !important;
    color: #333 !important;
    box-sizing: border-box !important;
    height: auto !important;
}

.instapay-checkout-box .instapay-field-group input[type="file"],
.woocommerce .instapay-checkout-box input[type="file"] {
    width: 100% !important;
    padding: 8px !important;
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    background: #fff !important;
    color: #333 !important;
    box-sizing: border-box !important;
    height: auto !important;
}

.instapay-checkout-box .instapay-upload-status {
    margin-top: 6px !important;
    font-size: 12px !important;
}

.instapay-checkout-box .instapay-upload-status .uploading {
    color: #6b3fa0 !important;
}

.instapay-checkout-box .instapay-upload-status .success {
    color: #27ae60 !important;
    font-weight: 600 !important;
}

.instapay-checkout-box .instapay-upload-status .error {
    color: #c00 !important;
}

.instapay-checkout-box .instapay-field-hint {
    font-size: 11px !important;
    color: #888 !important;
    margin: 4px 0 0 !important;
}

/* ─── Thank-you page ─── */
.woocommerce .instapay-thankyou,
.instapay-thankyou {
    background: #f9f5ff !important;
    border: 1px solid #6b3fa0 !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin: 20px 0 !important;
}

.instapay-thankyou h3 {
    color: #6b3fa0 !important;
    margin-top: 0 !important;
}

.instapay-thankyou h3 img {
    height: 22px !important;
    vertical-align: middle !important;
    margin-right: 6px !important;
    width: auto !important;
}
