/* OVZA Bank Transfer — checkout panel. Matches ovza-checkout.css (green #148a64). */

/* --- Currency chips next to "Bank Transfer" in the payment options --- */
/* Label and chips form one row centred on the same line, so the chips sit in the exact middle of the
   option box (as inline content, vertical-align: middle put them a few pixels below the text centre). */
.payment-option .option-label:has(> .ovza-bt-chips) {
    display: inline-flex !important;
    align-items: center;
    flex-wrap: nowrap; /* label, chips and icon always on one line */
    gap: 8px;
    min-width: 0;
    white-space: nowrap;
    line-height: 1.2 !important;
}
.payment-option .ovza-bt-chips {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 5px;
    margin-left: 0;
    vertical-align: middle;
}
/* The bank icon keeps its size and a gap from the chips. */
.payment-option .option-content:has(.ovza-bt-chips) .payment-icon {
    flex-shrink: 0;
    margin-left: 8px;
}
/* Pill: flag + code centred with even spacing on every side. */
.payment-option .ovza-bt-chip {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 7px !important;
    border-radius: 999px;
    background: #f1f3f2;
    color: #444;
    font-size: 11px;
    font-weight: 700;
    line-height: 1 !important;
}
/* Rectangular flags, all the same size (the EU flag is naturally taller, so each is fitted to one
   18×12 frame). Padding/border/background reset: the theme frames images otherwise. */
.payment-option .ovza-bt-chip img {
    display: block !important;
    flex-shrink: 0;
    width: 16px !important;
    height: 11px !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 2px !important;
    background: none !important;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .08) !important;
}

/* --- With Bank Transfer selected, only its own button shows. Pure CSS so it holds even when the
   checkout's script re-shows its card/crypto button (e.g. when restoring the page on Back). --- */
body:has(input[name="payment-method"][value="bank-transfer"]:checked) :is(#open-pf-iframe, #nowpayments-button),
body:has(input[name="ovza-bank-payment-method"][value="bank-transfer"]:checked) :is(#ovza-bank-open-pf-iframe, #ovza-bank-nowpayments-button),
body:has(input[name="payment_method"][value="bank-transfer"]:checked) :is(#pay-card-btn, #pay-crypto-btn) {
    display: none !important;
}

/* --- Pay button: same style as the card / crypto buttons ("text ........ GBP 1,778.00") --- */
.pay-btn.bank-btn {
    background: #148a64;
    color: #fff;
}
.pay-btn.bank-btn:hover:not(:disabled) {
    background: #0f6d4d;
}
#ovza-bt-button .btn-text {
    line-height: 1.4 !important; /* the theme sets a tall line-height on button text */
}
#ovza-bt-button .btn-price {
    white-space: nowrap;
    margin-left: 12px;
}
#ovza-bt-button #btn-price-bank-cur {
    font-size: inherit;
    font-weight: inherit;
    margin-right: 5px;
}
#ovza-bt-button #btn-price-bank-cur:empty {
    display: none;
}

/* --- Text colours (approved mockup) ---
   Scoped by ID: the checkout's ".container-checkout label span { color: #d63031 }" (meant for the red
   required-field asterisk) otherwise turns the text inside our <label> cards red, and its font-weight
   600 makes secondary text bold. */
#ovza-bt-panel,
#ovza-bt-panel label,
#ovza-bt-panel label span {
    color: #1f2937;
}
#ovza-bt-panel .ovza-bt-step-title { color: #1f2937; }
#ovza-bt-panel .ovza-bt-num { color: #fff; }
#ovza-bt-panel .ovza-bt-symbol { color: #148a64; font-weight: 700; }
#ovza-bt-panel .ovza-bt-code { color: #111; font-weight: 700; }
#ovza-bt-panel .ovza-bt-cname { color: #333; font-weight: 400; }
#ovza-bt-panel .ovza-bt-method-name { color: #111; font-weight: 700; }
#ovza-bt-panel .ovza-bt-method-hint { color: #333; font-weight: 400; }
#ovza-bt-panel .ovza-bt-amount-label { color: #148a64; }
#ovza-bt-panel .ovza-bt-amount-value { color: #111; }
#ovza-bt-panel .ovza-bt-amount-code { color: #1f2937; }
#ovza-bt-panel .ovza-bt-conv-text { color: #333; font-weight: 400; }
#ovza-bt-panel .ovza-bt-conv-text strong { color: #111; font-weight: 700; }
#ovza-bt-panel .ovza-bt-amount-note,
#ovza-bt-panel .ovza-bt-amount-note span { color: #555; font-weight: 400; }
#ovza-bt-panel .ovza-bt-cur-code { color: #1f2937; }
#ovza-bt-panel .ovza-bt-cur-list li[aria-selected="true"] .ovza-bt-cur-code { color: #148a64; }
#ovza-bt-panel .ovza-bt-cur-name { color: #6b7280; font-weight: 400; }
#ovza-bt-panel .ovza-bt-notice { color: #5c4400; }

/* Currency chips sit inside the "Bank Transfer" <label> too. */
.container-checkout .payment-option .ovza-bt-chips,
.payment-options .payment-option span.ovza-bt-chip {
    color: #444;
}
.payment-options .payment-option span.ovza-bt-chips {
    color: inherit;
}

/* --- Panel --- */
.ovza-bt-panel {
    margin-top: 12px;
    padding: 18px;
    border: 2px solid #148a64;
    border-radius: 10px;
    background: #f6fbf8;
    animation: ovzaBtIn .2s ease-out;
}
.ovza-bt-panel[hidden],
.ovza-bt-panel [hidden] {
    display: none !important;
}
/* Slide only: an opacity fade could leave the panel invisible wherever animations are paused. */
@keyframes ovzaBtIn {
    from { transform: translateY(-4px); }
    to { transform: none; }
}
.ovza-bt-panel > * + * {
    margin-top: 18px;
}
.ovza-bt-step-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
}
.ovza-bt-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #148a64;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

/* --- Currency cards --- */
.ovza-bt-currencies {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 10px;
}
.ovza-bt-currency {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 6px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s, box-shadow .15s;
}
.ovza-bt-currency:hover,
.ovza-bt-currency.is-selected {
    border-color: #148a64;
}
.ovza-bt-currency.is-selected {
    box-shadow: 0 0 0 3px rgba(20, 138, 100, .12);
}
.ovza-bt-currency input,
.ovza-bt-method input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.ovza-bt-currency:focus-within,
.ovza-bt-method:focus-within {
    outline: 2px solid #148a64;
    outline-offset: 2px;
}
.ovza-bt-symbol {
    font-size: 20px;
    font-weight: 700;
    color: #148a64;
    line-height: 1.1;
}
.ovza-bt-code {
    font-weight: 700;
    font-size: 15px;
    color: #111;
}
.ovza-bt-cname {
    font-size: 13px;
    color: #333;
}
/* Normal line height: the theme's tall one spread "Great British Pound" over two far-apart lines. */
#ovza-bt-panel .ovza-bt-cname {
    line-height: normal !important;
}

/* --- Method cards --- */
.ovza-bt-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ovza-bt-method {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s;
}
.ovza-bt-method::before {
    content: "";
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid #c4c4c4;
    border-radius: 50%;
    box-sizing: border-box;
    background: #fff;
}
.ovza-bt-method:hover,
.ovza-bt-method.is-selected {
    border-color: #148a64;
}
.ovza-bt-method.is-selected::before {
    border: 5px solid #148a64;
}
.ovza-bt-method-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.ovza-bt-method-name {
    font-weight: 700;
    font-size: 15.5px;
    color: #111;
}
.ovza-bt-method-hint {
    font-size: 13px;
    color: #333;
    line-height: 1.45;
}

/* --- Exact amount box --- */
.ovza-bt-amount {
    padding: 16px;
    border: 2px dashed #148a64;
    border-radius: 8px;
    background: #fafdfb;
}
.ovza-bt-amount-label {
    display: block;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #148a64;
}
.ovza-bt-amount-field {
    display: flex;
    align-items: stretch;
    border: 1px solid #e1e5e3;
    border-radius: 8px;
    background: #fff;
    position: relative; /* no overflow:hidden — the currency list drops below the field */
}
/* Currency part: our own button + flag list (native selects can't show images). Hardened against theme styles. */
.ovza-bt-amount-cur {
    position: relative;
    display: flex;
    flex-shrink: 0;
    border-right: 1px solid #e1e5e3;
}
.ovza-bt-panel .ovza-bt-cur-btn {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    height: 100% !important;
    min-height: 0 !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 0 !important;
    border-radius: 7px 0 0 7px !important;
    background: #f7f8f8 !important;
    box-shadow: none !important;
    color: #1f2937 !important;
    font: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1 !important;
    cursor: pointer;
}
.ovza-bt-panel .ovza-bt-cur-btn:hover,
.ovza-bt-panel .ovza-bt-cur-btn[aria-expanded="true"] {
    background: #eef3f1 !important;
}
.ovza-bt-panel .ovza-bt-cur-btn:focus-visible {
    outline: 2px solid #148a64 !important;
    outline-offset: -2px;
}
/* All dropdown flags share one 24×16 frame (the EU flag is naturally taller than the others). */
.ovza-bt-panel .ovza-bt-amount-cur img {
    display: block !important;
    width: 24px !important;
    height: 16px !important;
    max-height: none !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 3px !important;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
    flex-shrink: 0;
}
.ovza-bt-panel .ovza-bt-amount-cur img[src=""] {
    visibility: hidden;
}
.ovza-bt-panel .ovza-bt-amount-code {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    line-height: 1;
    letter-spacing: .01em;
}
.ovza-bt-amount-chevron {
    flex-shrink: 0;
    color: #1f2937;
    transition: transform .15s;
}
.ovza-bt-cur-btn[aria-expanded="true"] .ovza-bt-amount-chevron {
    transform: rotate(180deg);
}

/* The flag list */
.ovza-bt-panel .ovza-bt-cur-list {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    z-index: 50;
    min-width: 230px; /* flag + code + full name on one line */
    margin: 0 !important;
    padding: 6px !important;
    list-style: none !important;
    background: #fff !important;
    border: 1px solid #e1e5e3 !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 28px rgba(16, 24, 40, .14), 0 2px 6px rgba(16, 24, 40, .06);
    outline: none;
}
.ovza-bt-panel .ovza-bt-cur-list li {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin: 0 !important;
    padding: 10px 34px 10px 12px !important;
    border-radius: 7px;
    list-style: none !important;
    cursor: pointer;
    color: #1f2937 !important;
    line-height: 1.2;
}
.ovza-bt-panel .ovza-bt-cur-list li::before {
    content: none !important; /* themes often add bullets/icons to li */
}
.ovza-bt-panel .ovza-bt-cur-list li img {
    display: block !important;
    width: 24px !important;
    height: 16px !important;
    max-height: none !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 3px !important;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
    flex-shrink: 0;
}
.ovza-bt-cur-code {
    font-size: 15px;
    font-weight: 700;
}
.ovza-bt-panel .ovza-bt-cur-name {
    font-size: 12px !important;
    color: #6b7280;
    white-space: nowrap;
}
.ovza-bt-panel .ovza-bt-cur-list li.is-active {
    background: #eef8f3;
}
.ovza-bt-panel .ovza-bt-cur-list li[aria-selected="true"] .ovza-bt-cur-code {
    color: #148a64;
}
.ovza-bt-panel .ovza-bt-cur-list li[aria-selected="true"]::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 6px;
    height: 11px;
    margin-top: -7px;
    border: solid #148a64;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Our icons are stroke-only; stop theme "svg path { fill }" rules from filling them in. */
.ovza-bt-panel svg,
.ovza-bt-panel svg * {
    fill: none !important;
}
.ovza-bt-panel svg {
    width: 16px;
    height: 16px;
    overflow: visible;
}
.ovza-bt-panel svg.ovza-bt-amount-chevron {
    width: 12px;
    height: 12px;
}
.ovza-bt-amount-value {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 12px 14px;
    font-size: 18px;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.ovza-bt-amount-conv {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f2f4f3;
    font-size: 12.5px;
    color: #333;
    line-height: 1.45;
}
.ovza-bt-amount-conv strong {
    color: #111;
}
.ovza-bt-conv-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #dcefe6;
    color: #148a64;
    position: relative;
}
.ovza-bt-conv-icon::after {
    content: "";
    position: absolute;
    right: -7px;
    top: 4px;
    bottom: 4px;
    width: 1px;
    background: #d5dad8;
}
.ovza-bt-conv-text {
    padding-left: 2px;
}
.ovza-bt-amount-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 12px 0 0;
    font-size: 11.5px;
    color: #555;
    line-height: 1.5;
}
.ovza-bt-amount-note svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: #148a64;
}

/* --- SWIFT charges notice --- */
.ovza-bt-notice {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #5c4400;
}
.ovza-bt-notice-warn {
    background: #fff8e6;
    border-left: 3px solid #d39e00;
}

@media (max-width: 480px) {
    .ovza-bt-panel {
        padding: 12px;
    }
    /* Small screens: stay on one line, just tighter. */
    .payment-option .option-label:has(> .ovza-bt-chips) {
        gap: 5px;
    }
    .payment-option .ovza-bt-chips {
        gap: 3px;
    }
    .payment-option .ovza-bt-chip {
        gap: 3px;
        padding: 3px 5px !important;
        font-size: 10px;
    }
    .payment-option .ovza-bt-chip img {
        width: 14px !important;
        height: 10px !important;
    }
    .payment-option .option-content:has(.ovza-bt-chips) .payment-icon {
        margin-left: 6px;
    }
}

/* Email confirmation popup: uses the checkout's own .ovza-otp-* classes and styles (see checkout.js). */

/* --- "Redirecting to Payment…" overlay, for checkouts without one (same look as the others) --- */
.ovza-bt-spinner { position: fixed; inset: 0; z-index: 99999; background: rgba(0, 0, 0, .4); }
.ovza-bt-spinner-box { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 25px 35px; background: #fff; border: 2px solid #148a64; border-radius: 12px; box-shadow: 0 4px 20px rgba(0, 0, 0, .15); text-align: center; }
.ovza-bt-spinner-box p { margin: 0 0 15px !important; color: #148a64 !important; font-weight: 600; font-size: 18px; line-height: 1.4; }
.ovza-bt-spinner-ring { display: block; width: 44px; height: 44px; margin: 0 auto; border: 5px solid #148a64; border-top-color: transparent; border-radius: 50%; animation: ovza-bt-spin 1s linear infinite; box-sizing: border-box; }
@keyframes ovza-bt-spin { to { transform: rotate(360deg); } }
