/**
 * SFK Checkout Styles
 */

/* ── Hide newsletter checkbox — aggressive targeting ─────────────── */
.woocommerce-checkout .woodmart-opt-in,
.woocommerce-checkout .wd-newsletter-checkout,
.woocommerce-checkout [class*="newsletter"],
.woocommerce-checkout [id*="newsletter"],
.woocommerce-checkout [class*="mailchimp"],
.woocommerce-checkout [id*="mailchimp"] {
    display: none !important;
}

/* ── Feature 1: Lock Country to India ───────────────────────────── */
#billing_country_field select,
#billing_country {
    pointer-events: none;
    opacity: 0.75;
    background-color: #f9f9f9;
}

.sfk-pin-loading #billing_postcode {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 50 50'%3E%3Ccircle cx='25' cy='25' r='20' fill='none' stroke='%23999' stroke-width='4' stroke-dasharray='31.4' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='0.8s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
}

@keyframes sfkAutofillFlash {
    0%   { background-color: #e8f5e9; }
    100% { background-color: transparent; }
}

.sfk-autofilled {
    animation: sfkAutofillFlash 2s ease-out;
}

/* ── Feature 1b: Address field — single tall column ─────────────── */
#billing_address_1_field {
    width: 100% !important;
    clear: both;
}
#billing_address_1 {
    min-height: 70px !important;
    resize: vertical;
}
#billing_address_2_field {
    display: none !important;
}

/* ── Feature 3: Address warning ──────────────────────────────────── */
.sfk-addr-warning {
    background: #fff3cd;
    border-left: 4px solid #f0ad4e;
    border-radius: 6px;
    color: #856404;
    font-size: 13px;
    line-height: 1.5;
    margin: 4px 0 0 !important;
    padding: 8px 12px;
}

/* ── Feature 4: Prepaid / Cashfree notice ───────────────────────── */
.sfk-prepaid-notice {
    align-items: center;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border: 1px solid #a5d6a7;
    border-radius: 10px;
    display: flex;
    gap: 10px;
    margin: 10px 0 4px;
    padding: 11px 14px;
}

.sfk-prepaid-notice__icon {
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1;
}

.sfk-prepaid-notice__text {
    color: #2e7d32;
    display: flex;
    flex-direction: column;
    font-size: 13px;
    gap: 1px;
    line-height: 1.45;
}

.sfk-prepaid-notice__text strong {
    font-size: 14px;
}

/* ── Feature 4: COD inline notice banner ─────────────────────────── */
.sfk-cod-notice {
    align-items: center;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border: 1px solid #a5d6a7;
    border-radius: 10px;
    display: flex;
    gap: 10px;
    margin: 10px 0 4px;
    padding: 11px 14px;
}

.sfk-cod-notice__icon {
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1;
}

.sfk-cod-notice__text {
    color: #2e7d32;
    display: flex;
    flex-direction: column;
    font-size: 13px;
    gap: 2px;
    line-height: 1.45;
}

.sfk-cod-notice__text strong {
    font-size: 15px;
    font-weight: 700;
}

/* COD fee bold line below notice */
.sfk-cod-fee-notice {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 8px;
    color: #5d4037;
    font-size: 13px;
    margin: 0 0 10px;
    padding: 9px 14px;
}

.sfk-cod-fee-notice strong {
    font-weight: 700;
}

/* ── Feature 5: Pre-OTP modal ────────────────────────────────────── */
.sfk-modal-overlay {
    align-items: center;
    background: rgba(0, 0, 0, 0.72);
    bottom: 0;
    display: none;
    justify-content: center;
    left: 0;
    padding: 16px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 999999;
}

.sfk-modal-box {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0,0,0,.35);
    max-width: 420px;
    overflow: hidden;
    width: 100%;
    animation: sfkModalIn .22s ease-out;
}

@keyframes sfkModalIn {
    from { opacity:0; transform: scale(.94) translateY(12px); }
    to   { opacity:1; transform: scale(1)  translateY(0);     }
}

.sfk-modal-header {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.2px;
    padding: 20px 22px 18px;
    text-align: center;
}

.sfk-modal-body {
    padding: 20px 22px 16px;
}

.sfk-modal-compare {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 16px;
}

.sfk-modal-col {
    border-radius: 10px;
    padding: 14px 14px 12px;
    text-align: center;
}

.sfk-modal-col--bad {
    background: #fce4ec;
    border: 1px solid #ef9a9a;
}

.sfk-modal-col--good {
    background: #e8f5e9;
    border: 2px solid #66bb6a;
}

.sfk-modal-col__label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.sfk-modal-col--bad  .sfk-modal-col__label { color: #b71c1c; }
.sfk-modal-col--good .sfk-modal-col__label { color: #1b5e20; }

.sfk-modal-col__amount {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}

.sfk-modal-col--bad  .sfk-modal-col__amount { color: #c62828; }
.sfk-modal-col--good .sfk-modal-col__amount { color: #2e7d32; }

.sfk-modal-col ul {
    font-size: 12px;
    line-height: 1.6;
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.sfk-modal-col--bad  ul { color: #b71c1c; }
.sfk-modal-col--good ul { color: #2e7d32; }

.sfk-modal-saving {
    background: #fffde7;
    border: 1px solid #fff176;
    border-radius: 8px;
    color: #f57f17;
    font-size: 14px;
    padding: 10px 14px;
    text-align: center;
}

.sfk-modal-saving strong {
    font-size: 16px;
}

.sfk-modal-footer {
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 22px 20px;
}

.sfk-btn {
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    padding: 14px 20px;
    text-align: center;
    transition: opacity .15s;
    width: 100%;
}

.sfk-btn:hover { opacity: .88; }

.sfk-btn--primary {
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: #fff;
    letter-spacing: -.1px;
}

.sfk-btn--ghost {
    background: #f5f5f5;
    color: #666;
    font-size: 13px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 480px) {
    .sfk-modal-box { border-radius: 14px; }
    .sfk-modal-header { font-size: 16px; padding: 16px 18px; }
    .sfk-modal-body { padding: 16px 18px 12px; }
    .sfk-modal-footer { padding: 14px 18px 18px; }
    .sfk-modal-col__amount { font-size: 19px; }
}

/* ── Feature 6: Sharkara Upperi notice variant ───────────────────── */
.sfk-prepaid-notice--sharkara {
    background: linear-gradient(135deg, #fff8e1 0%, #fffde7 100%) !important;
    border-color: #ffe082 !important;
}

.sfk-prepaid-notice--sharkara .sfk-prepaid-notice__text {
    color: #e65100 !important;
}

.sfk-prepaid-notice--sharkara .sfk-prepaid-notice__icon {
    font-size: 22px;
}

/* ── Feature 6: Login link below Create Account ──────────────────── */
.sfk-login-link {
    font-size: 12.5px;
    color: #666;
    margin: -8px 0 12px;
}

.sfk-login-link a {
    color: #2e7d32;
    text-decoration: none;
    font-weight: 600;
}

.sfk-login-link a:hover {
    text-decoration: underline;
}

/* ── Feature 6: Coupon section above order review ────────────────── */
.sfk-coupon-section {
    margin-bottom: 20px;
}

/* ── Feature 6: Coupon code hints ───────────────────────────────── */
.sfk-coupon-hints {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    margin-top: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sfk-coupon-hints code {
    background: #fff3cd;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .3px;
    padding: 1px 6px;
}

/* WC returning customer login notice — shown as default */

/* ── Login + Coupon block above order review ─────────────────────── */
.sfk-above-order {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
    padding: 14px 16px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 13.5px;
}

.sfk-above-order .sfk-login-link,
.sfk-above-order .sfk-coupon-link {
    color: #2e7d32;
    text-decoration: none;
    font-weight: 600;
}

.sfk-above-order .sfk-login-link:hover,
.sfk-above-order .sfk-coupon-link:hover {
    text-decoration: underline;
}

.sfk-inline-coupon {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    align-items: center;
}

.sfk-inline-coupon .input-text {
    flex: 1;
    min-width: 160px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 13px;
}

.sfk-inline-coupon .button {
    height: 38px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 700;
    background: #1a1a2e;
    color: #f0c040;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.sfk-coupon-result {
    width: 100%;
    font-size: 13px;
    margin-top: 2px;
}
