/* Bank Transfer Discount Plugin CSS */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@400;600;700;800;900&display=swap');

/* ===================== CHECKOUT MESSAGE BOX ===================== */
.btd-discount-info {
    margin: 12px 0;
}

.btd-discount-box {
    padding: 10px 14px;
    border-radius: 10px;
    font-family: 'Roboto Slab', Georgia, serif;
    position: relative;
    overflow: hidden;
    animation: btdFadeIn 0.35s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

@keyframes btdFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- CHECKOUT: BANK TRANSFER BOX ---- */
.btd-bank-transfer {
    background: #f4faf7;
    border: 1px solid rgba(26, 107, 69, 0.2);
    border-left: 4px solid #1a6b45;
}

.btd-bank-transfer:hover {
    background: #eefaf3 !important;
    border-color: rgba(26, 107, 69, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(26, 107, 69, 0.08);
}

.btd-bank-transfer .btd-title {
    margin: 0;
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 14.5px;
    font-weight: 900;
    color: #1a6b45;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.2px;
}

.btd-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(26,107,69,0.4), rgba(109,191,143,0.1));
    margin: 1px 0;
}

.btd-bank-transfer .btd-message {
    margin: 0;
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 12.5px;
    color: #1c5237;
    line-height: 1.4;
    font-weight: 600;
}

/* ---- CHECKOUT: COD BOX ---- */
.btd-no-discount {
    background: #fffafaf5;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 4px solid #ef4444;
}

.btd-no-discount:hover {
    background: #fef2f2 !important;
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.08);
}

.btd-no-discount .btd-title {
    margin: 0;
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 14.5px;
    font-weight: 900;
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.2px;
}

.btd-cod-attract {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.btd-no-discount-message {
    margin: 0;
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 12.5px;
    color: #991b1b !important;
    line-height: 1.4;
}

.btd-bank-transfer .btd-message strong,
.btd-no-discount-message strong {
    font-size: 14px !important; 
    font-weight: 800 !important;
    display: inline-block;
    margin-right: 5px; 
    color: inherit !important;
}

.btd-convert-btn {
    display: none !important;
}

/* ===================== DYNAMIC BANK DETAILS TOGGLE ===================== */
/* Default mein details ko hide rakho jab tak Direct Bank Transfer selected na ho */
.payment_method_bacs .payment_box.payment_method_bacs {
    display: none !important;
}

/* Jab user Direct Bank Transfer select kare, tabhi details show hon */
.wc_payment_method.payment_method_bacs input[type="radio"]:checked ~ .payment_box.payment_method_bacs {
    display: block !important;
    animation: btdFadeIn 0.25s ease-in-out;
}

/* Bank Details font optimization */
.payment_box.payment_method_bacs, 
.payment_box.payment_method_bacs p {
    font-size: 12px !important;
    color: #4a5568 !important;
    line-height: 1.4 !important;
}

/* ===================== DYNAMIC CASH ON DELIVERY DESCRIPTION FIX ===================== */
.payment_method_cod .payment_box.payment_method_cod {
    display: none !important;
}

.wc_payment_method.payment_method_cod input[type="radio"]:checked ~ .payment_box.payment_method_cod {
    display: block !important;
    animation: btdFadeIn 0.25s ease-in-out;
}

.payment_box.payment_method_cod, 
.payment_box.payment_method_cod p {
    font-size: 12px !important;
    color: #4a5568 !important;
    line-height: 1.4 !important;
    margin: 6px 0 0 0 !important;
    padding: 8px 12px !important;
    background-color: #f8fafc !important;
    border-radius: 6px !important;
}

/* ===================== FIXED COMPACT INLINE TERMS & CONDITIONS CHECKBOX ===================== */
.woocommerce-terms-and-conditions-wrapper {
    margin-top: 20px !important;
    margin-bottom: 15px !important;
    display: block !important;
    width: 100% !important;
}

.woocommerce-form__label-for-checkbox {
    display: inline-flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
    cursor: pointer !important;
}

.woocommerce-form__label-for-checkbox span {
    font-size: 0 !important;
    visibility: hidden !important;
    display: inline !important;
    line-height: 0 !important;
}

.woocommerce-form__label-for-checkbox .required {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.woocommerce-form__label-for-checkbox span::after {
    content: "Your personal data will be used to process your order. Your info will be saved to a Shop account. By continuing, you agree to Shop's Terms of Service and acknowledge the Privacy Policy, Warranty Policy, and Returns & Refunds Policy. *";
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 11.5px !important;
    color: #2d3748 !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    visibility: visible !important;
    display: inline !important;
}

.woocommerce-form__label-for-checkbox input[type="checkbox"] {
    width: 14px !important;
    height: 14px !important;
    margin: 2px 0 0 0 !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
}
/* ===================== PRODUCT PAGE PRICING ===================== */
.btd-product-pricing-info {
    margin: 20px 0;
    padding: 0;
    background: transparent;
    border: none;
}

.btd-product-pricing-info h4 {
    margin: 0 0 12px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    font-family: 'Roboto Slab', Georgia, serif !important;
    background: none !important;
    -webkit-text-fill-color: unset !important;
}

.btd-pricing-container {
    display: flex;
    gap: 12px;
    align-items: stretch;
    flex-wrap: wrap;
}

.btd-pricing-container > div {
    flex: 1 1 160px;
    min-width: 140px;
    max-width: 220px;
}

.btd-bank-price,
.btd-cod-price {
    position: relative;
    padding: 14px 16px;
    border-radius: 14px;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-sizing: border-box;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    overflow: hidden;
}

/* Bank price — green */
.btd-bank-price {
    background: #f0fdf4 !important;
    border: 2px solid #22c55e !important;
}

.btd-bank-price:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.2) !important;
    background: #dcfce7 !important;
}

/* COD price — red */
.btd-cod-price {
    background: #fef2f2 !important;
    border: 2px solid #ef4444 !important;
}

.btd-cod-price:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.2) !important;
    background: #fee2e2 !important;
}

.btd-bank-price strong,
.btd-cod-price strong {
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin-bottom: 2px !important;
}

.btd-bank-price strong {
    color: #15803d !important;
}

.btd-cod-price strong {
    color: #b91c1c !important;
}

.btd-price-value {
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 20px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    display: block !important;
}

.btd-bank-price .btd-price-value {
    color: #15803d !important;
}

.btd-cod-price .btd-price-value {
    color: #b91c1c !important;
}

.btd-small {
    display: block !important;
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 11px !important;
    font-weight: 600 !important;
    margin-top: 4px !important;
    padding-top: 5px !important;
    border-top: 1px solid rgba(0,0,0,0.07) !important;
}

.btd-bank-price .btd-small {
    color: #16a34a !important;
}

.btd-cod-price .btd-small {
    color: #dc2626 !important;
}

/* BEST DEAL badge — ribbon top right */
.btd-badge {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 72px !important;
    height: 72px !important;
    overflow: hidden !important;
    pointer-events: none !important;
    z-index: 10 !important;
    font-size: 0 !important;
    color: transparent !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.btd-badge::before {
    content: "BEST DEAL" !important;
    position: absolute !important;
    display: block !important;
    width: 102px !important;
    padding: 4px 0 !important;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%) !important;
    color: #ffffff !important;
    font-family: 'Roboto Slab', Georgia, serif !important;
    font-size: 8px !important;
    font-weight: 900 !important;
    text-align: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    box-shadow: 0 2px 8px rgba(15,23,42,0.35) !important;
    right: -24px !important;
    top: 16px !important;
    transform: rotate(45deg) !important;
    animation: badgeBlink 1.6s ease-in-out infinite !important;
}

@keyframes badgeBlink {
    0%   { opacity: 1; box-shadow: 0 2px 8px rgba(15,23,42,0.35); }
    50%  { opacity: 0.55; box-shadow: 0 2px 16px rgba(30,58,138,0.7); }
    100% { opacity: 1; box-shadow: 0 2px 8px rgba(15,23,42,0.35); }
}

/* Responsive */
@media (max-width: 768px) {
    .btd-pricing-container {
        flex-direction: column;
        gap: 10px;
    }
    .btd-pricing-container > div {
        max-width: 100%;
        min-width: 100%;
    }
}

/* Admin fields */
#woocommerce-product-data .options_group {
    border-top: 1px solid #ddd;
    padding: 15px;
}

input#_bank_transfer_discount,
input#_cod_extra_charge {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

input#_bank_transfer_discount:focus,
input#_cod_extra_charge:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34,197,94,0.1);
    outline: none;
}
