/* 22 Peptides Manual Payments: checkout cards + payment panel */

/* Boxed payment method options at checkout */
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 0 0 12px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method:hover {
    border-color: #94a3b8;
}
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method input[type="radio"]:checked + label,
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method:has(input[type="radio"]:checked) {
    border-color: #00b8c9;
    box-shadow: 0 0 0 1px #00b8c9;
}
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    margin: 0;
}
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label img {
    height: 28px;
    width: auto;
    margin-left: auto;
}
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method .payment_box {
    background: transparent;
    padding: 8px 0 0;
    margin: 0;
    font-size: 14px;
    color: #475569;
}
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method .payment_box::before {
    display: none;
}

/* Save badge */
.p22-save-badge {
    display: inline-block;
    background: #00b8c9;
    color: #06333a;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Payment panel (thank you page, account, upload page, standalone) */
.p22-pay-panel {
    max-width: 560px;
    margin: 32px auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 24px rgba(10, 22, 51, .06);
}
.p22-pay-title {
    text-align: center;
    font-size: 22px;
    margin: 0 0 8px;
    color: #0a1633;
}
.p22-pay-amount-line {
    text-align: center;
    color: #475569;
    margin: 0 0 20px;
    font-size: 16px;
}
.p22-pay-card {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}
.p22-pay-sendto {
    font-weight: 700;
    font-size: 17px;
    color: #0a1633;
    margin-bottom: 10px;
}
.p22-pay-row {
    margin: 6px 0;
    font-size: 15px;
    color: #334155;
}
.p22-pay-k {
    color: #64748b;
}
.p22-pay-v {
    font-weight: 600;
    color: #0a1633;
    word-break: break-all;
}
.p22-pay-qr {
    margin: 16px auto 4px;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    display: inline-block;
    box-shadow: 0 2px 10px rgba(10, 22, 51, .08);
    max-width: 100%;
    box-sizing: border-box;
}
/* 1.1.12: QR was 200px forced square: small for phone scanning, and it
   squashed the portrait Cash App card. 300px, undistorted, capped by
   the panel on narrow screens. */
.p22-pay-qr img {
    display: block;
    width: 300px;
    height: auto;
    max-width: 100%;
}
/* 1.1.12: copy buttons + gray hints used to carry inline light styles
   that dark mode could never override. Classes now, dark below. */
.p22-copy-btn {
    margin-left: 8px;
    padding: 3px 12px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    color: #0a1633;
    cursor: pointer;
}
.p22-pay-hint {
    color: #64748b;
}
.p22-pay-memo {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    border-radius: 10px;
    padding: 12px 16px;
    margin: 20px 0 0;
    text-align: center;
    font-size: 15px;
}
.p22-pay-deadline {
    margin: 12px 0 0;
    text-align: center;
    font-size: 13px;
    color: #64748b;
}

/* Upload box */
.p22-pay-upload {
    margin-top: 24px;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}
.p22-pay-upload h3 {
    font-size: 17px;
    margin: 0 0 12px;
    color: #0a1633;
}
.p22-upload-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.p22-file-label input[type="file"] {
    font-size: 14px;
}
.p22-upload-btn {
    background: #06333a;
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.p22-upload-btn:hover {
    background: #0a4a54;
}
.p22-pay-ok {
    color: #15803d;
    font-weight: 600;
}
.p22-pay-err {
    color: #dc2626;
    font-weight: 600;
}
.p22-pay-alt {
    margin-top: 10px;
    font-size: 13px;
    color: #64748b;
}

/* Standalone upload page */
body.p22-standalone {
    background: #f8fafc;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.p22-standalone-wrap {
    padding: 24px 16px 48px;
}

/* Mobile */
@media (max-width: 480px) {
    .p22-pay-panel {
        padding: 20px 16px;
        margin: 20px auto;
    }
    .p22-upload-form {
        flex-direction: column;
        align-items: stretch;
    }
    .p22-upload-btn {
        width: 100%;
    }
}

/* WooCommerce Blocks checkout */
.p22-block-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.p22-block-text {
    white-space: nowrap;
    font-weight: 600;
}
.p22-block-icon {
    height: 30px;
    width: 30px;
    flex-shrink: 0;
}
.p22-block-desc {
    font-size: 14px;
    color: #475569;
}
.p22-save-badge {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Card "coming soon" placeholder row (injected via JS, disabled) */
.p22-card-soon {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-top: 12px;
    background: #f8fafc;
    opacity: .7;
    cursor: not-allowed;
}
.p22-card-soon-radio {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    flex-shrink: 0;
    background: #fff;
}
.p22-card-soon-icon {
    flex-shrink: 0;
    display: inline-flex;
}
.p22-card-soon-icon svg {
    display: block;
}
.p22-card-soon-text {
    white-space: nowrap;
    font-weight: 600;
    color: #334155;
}
.p22-card-soon-badge {
    margin-left: auto;
    background: #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Checkout order summary rows: let the description shrink so the
   price + sale badge stay inside the card (fixes flex min-width overflow) */
.wc-block-components-order-summary-item__description {
    min-width: 0 !important;
}
.wc-block-components-order-summary-item__total-price {
    flex-shrink: 0 !important;
}

/* Checkout order summary: never break product names mid-word */
.wc-block-components-product-name,
.wc-block-components-order-summary-item__name,
.wc-block-components-order-summary-item__description {
    word-break: normal !important;
    overflow-wrap: break-word !important;
    hyphens: none !important;
}

/* 1.1.12: dark mode. The panel kept hardcoded white while the theme
 * went dark, so it sat as a white block on dark pages. Surfaces and
 * text follow the theme's dark variables now. The QR box stays white
 * on purpose: QR codes need a white quiet zone to scan reliably. */
html[data-theme="dark"] .p22-pay-panel {
    background: var(--surface, #0e1a33);
    border-color: var(--line, #223154);
    box-shadow: 0 4px 24px rgba(0, 0, 0, .35);
}
html[data-theme="dark"] .p22-pay-title { color: #fff; }
html[data-theme="dark"] .p22-pay-amount-line { color: #cbd5e1; }
html[data-theme="dark"] .p22-pay-card { background: var(--surface-2, #0d1730); }
html[data-theme="dark"] .p22-pay-sendto { color: #fff; }
html[data-theme="dark"] .p22-pay-row { color: #cbd5e1; }
html[data-theme="dark"] .p22-pay-k { color: #94a3b8; }
html[data-theme="dark"] .p22-pay-v { color: #fff; }
html[data-theme="dark"] .p22-copy-btn {
    background: #1e293b;
    color: #f1f5f9;
    border-color: #334155;
}
html[data-theme="dark"] .p22-pay-hint { color: #94a3b8; }
html[data-theme="dark"] .p22-pay-memo {
    background: rgba(251, 191, 36, .12);
    border-color: rgba(251, 191, 36, .4);
    color: #fde68a;
}
html[data-theme="dark"] .p22-pay-deadline { color: #94a3b8; }
html[data-theme="dark"] .p22-pay-upload { border-top-color: var(--line, #223154); }
html[data-theme="dark"] .p22-pay-upload h3 { color: #fff; }
html[data-theme="dark"] .p22-pay-ok { color: #4ade80; }
html[data-theme="dark"] .p22-pay-err { color: #f87171; }
html[data-theme="dark"] .p22-pay-alt { color: #94a3b8; }

/* 1.1.13: premium panel pass (CSS only; markup, values and flow unchanged) */
.p22-pay-panel {
    background: #fff;
    border: 1px solid #dfe6f1;
    border-radius: 20px;
    padding: 0 0 22px;
    overflow: hidden;
    box-shadow: 0 30px 60px -36px rgba(10, 22, 51, 0.45);
}
.p22-pay-panel > * { margin-left: 22px; margin-right: 22px; }
.p22-pay-panel .p22-pay-title {
    margin: 0 0 18px;
    padding: 22px 22px 20px;
    background: radial-gradient(120% 140% at 85% 0%, #12306b 0%, #0a1633 55%, #060d20 100%);
    color: #fff;
    font-size: 21px;
    letter-spacing: -0.01em;
    border-bottom: 3px solid #00b8c9;
}
.p22-pay-panel .p22-pay-amount-line strong { color: #0a1633; font-size: 1.15em; }
.p22-pay-panel .p22-pay-card {
    background: #f6f9fd;
    border: 1px solid #e3eaf4;
    border-radius: 14px;
}
.p22-pay-panel .p22-pay-sendto {
    color: #008e9c;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
}
.p22-pay-panel .p22-pay-v { color: #0a1633; font-weight: 700; }
.p22-pay-panel .p22-copy-btn {
    border: 1px solid #0a1633;
    background: #0a1633;
    color: #fff;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-left: 8px;
    transition: background .15s ease, border-color .15s ease;
}
.p22-pay-panel .p22-copy-btn:hover { background: #00b8c9; border-color: #00b8c9; }
.p22-pay-panel .p22-pay-qr img { border-radius: 12px; box-shadow: 0 10px 30px -14px rgba(10, 22, 51, 0.5); }
.p22-pay-panel .p22-upload-btn {
    background: linear-gradient(135deg, #00b8c9, #0090a8);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 700;
    cursor: pointer;
}
.p22-pay-panel .p22-pay-now { box-shadow: 0 12px 26px -12px rgba(0, 214, 50, 0.7); }
