/**
 * BTC Checkout Frontend Styles — Premium v2.4.0
 *
 * Hierarchy: Hero amount → Utility (QR + fields) → Action → Trust
 * Design: Visually dominant payment card, strong CTA, calm trust section
 */

/* ═══ RESET ═══ */
.cc-pay *,
.cc-pay *::before,
.cc-pay *::after {
    box-sizing: border-box;
}

/* ═══ CURRENCY SELECTION ON CHECKOUT ═══ */
.crypto-checkout-currency-selection {
    margin: 15px 0;
}

.crypto-checkout-btc-display {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid #F7931A;
    border-radius: 8px;
    background: #fffaf3;
}

.crypto-checkout-currency-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin: 8px 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.crypto-checkout-currency-option:hover {
    border-color: #007cba;
    background: #f8f9fa;
}

.crypto-checkout-currency-option input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
}

.crypto-checkout-currency-option input[type="radio"]:checked + .crypto-currency-icon {
    transform: scale(1.1);
}

.crypto-currency-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    margin-right: 12px;
    flex-shrink: 0;
}

.crypto-currency-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

/* ═══ PAYMENT CARD — OUTER SHELL ═══ */
.cc-pay {
    max-width: 620px;
    margin: 32px auto;
    padding: 0;
    background: #ffffff;
    border-radius: 16px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.06),
        0 8px 32px rgba(0, 0, 0, 0.10);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ═══ HERO: Amount as dominant visual ═══ */
.cc-pay__hero {
    padding: 36px 32px 28px;
    text-align: center;
    background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
    border-bottom: 1px solid #f0f0f0;
}

.cc-pay__heading {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    letter-spacing: -0.01em;
}

.cc-pay__amount-hero {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.cc-pay__amount-value {
    font-size: 42px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.cc-pay__amount-ticker {
    font-size: 18px;
    font-weight: 600;
    color: #F7931A;
    letter-spacing: 0.02em;
}

.cc-pay__fiat-context {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

/* ═══ UTILITY: QR + Fields ═══ */
.cc-pay__utility {
    display: flex;
    gap: 28px;
    padding: 28px 32px;
    align-items: flex-start;
}

.cc-pay__qr {
    flex-shrink: 0;
    text-align: center;
}

.cc-pay__qr img,
.cc-pay__qr .crypto-checkout-qr-code {
    width: 180px;
    height: 180px;
    border: 3px solid #f1f5f9;
    border-radius: 12px;
    padding: 8px;
    background: #fff;
}

.cc-pay__qr-label {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.cc-pay__fields {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cc-pay__field-group {
    /* no extra styling needed */
}

.cc-pay__label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.cc-pay__input-row {
    display: flex;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    transition: border-color 0.15s ease;
}

.cc-pay__input-row:focus-within {
    border-color: #F7931A;
}

.cc-pay__input {
    flex: 1;
    min-width: 0;
    border: none;
    padding: 11px 14px;
    font-size: 14px;
    background: transparent;
    color: #1e293b;
    outline: none;
}

.cc-pay__input--mono {
    font-family: 'SF Mono', 'Monaco', 'Consolas', 'Liberation Mono', monospace;
    font-size: 12px;
    letter-spacing: -0.01em;
}

.cc-pay__copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    min-height: 44px;
    border: none;
    border-left: 1.5px solid #e2e8f0;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.cc-pay__copy-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.cc-pay__copy-btn.copied {
    background: #dcfce7;
    color: #16a34a;
    border-left-color: #bbf7d0;
}

/* ═══ PRIMARY ACTION ═══ */
.cc-pay__action {
    padding: 24px 32px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    background: #fafbfc;
}

.cc-pay__status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.cc-pay__spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid #e2e8f0;
    border-top-color: #F7931A;
    border-radius: 50%;
    animation: cc-spin 0.8s linear infinite;
}

@keyframes cc-spin {
    to { transform: rotate(360deg); }
}

.cc-pay__waiting-text {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
}

.cc-pay__check-btn {
    display: inline-block;
    padding: 14px 40px;
    border: none;
    border-radius: 10px;
    background: #F7931A;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: -0.01em;
    box-shadow: 0 2px 8px rgba(247, 147, 26, 0.3);
}

.cc-pay__check-btn:hover {
    background: #e8850f;
    box-shadow: 0 4px 16px rgba(247, 147, 26, 0.4);
    transform: translateY(-1px);
}

.cc-pay__check-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(247, 147, 26, 0.3);
}

.cc-pay__check-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ═══ TRUST SECTION ═══ */
.cc-pay__trust {
    padding: 28px 32px 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    border-top: 1px solid #f0f0f0;
}

.cc-pay__trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.cc-pay__trust-icon {
    font-size: 13px;
    color: #cbd5e1;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.cc-pay__explorer-link {
    color: #64748b;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: color 0.15s ease;
}

.cc-pay__explorer-link:hover {
    color: #F7931A;
    text-decoration: underline;
}

/* ═══ CONFIRMED STATE ═══ */
.cc-pay__confirmed {
    text-align: center;
    padding: 48px 32px;
}

.cc-pay__confirmed-icon {
    margin-bottom: 20px;
}

.cc-pay__check-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #22c55e;
    fill: none;
    animation: cc-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.cc-pay__check-path {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 3;
    stroke: #22c55e;
    animation: cc-stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes cc-stroke {
    100% { stroke-dashoffset: 0; }
}

.cc-pay__confirmed-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #22c55e;
}

.cc-pay__confirmed-msg {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
}

/* ═══ CONFIRMED ANIMATION ═══ */
.crypto-checkout-payment-confirmed {
    animation: cc-fadeIn 0.5s ease;
}

@keyframes cc-fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══ ERROR STATE ═══ */
.crypto-checkout-error {
    padding: 15px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #991b1b;
    text-align: center;
    font-size: 14px;
}

/* ═══ NETWORK WARNING ═══ */
.crypto-checkout-network-warning {
    margin-top: 20px;
    padding: 15px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 13px;
    color: #92400e;
    line-height: 1.5;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 640px) {
    .cc-pay {
        margin: 16px;
        border-radius: 12px;
    }

    .cc-pay__hero {
        padding: 28px 20px 22px;
    }

    .cc-pay__amount-value {
        font-size: 32px;
    }

    .cc-pay__amount-ticker {
        font-size: 15px;
    }

    .cc-pay__utility {
        flex-direction: column;
        align-items: center;
        padding: 24px 20px;
        gap: 20px;
    }

    .cc-pay__qr img,
    .cc-pay__qr .crypto-checkout-qr-code {
        width: 160px;
        height: 160px;
    }

    .cc-pay__fields {
        width: 100%;
    }

    .cc-pay__action {
        padding: 20px;
    }

    .cc-pay__check-btn {
        width: 100%;
        padding: 14px 20px;
    }

    .cc-pay__trust {
        padding: 16px 20px 20px;
        flex-direction: column;
        gap: 8px;
    }

    .cc-pay__input--mono {
        font-size: 11px;
    }
}

@media (max-width: 380px) {
    .cc-pay__amount-value {
        font-size: 26px;
    }

    .cc-pay__input {
        padding: 10px 12px;
        font-size: 13px;
    }

    .cc-pay__copy-btn {
        padding: 0 12px;
        font-size: 11px;
    }
}
/* ═══ DROPDOWN CURRENCY SELECTOR (Option C) ═══ */
.cc-dropdown-wrap {
    margin: 12px 0;
}

.cc-dropdown-label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}

.cc-dropdown {
    position: relative;
}

.cc-dropdown__trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s;
}

.cc-dropdown__trigger:hover {
    border-color: #d1d5db;
}

.cc-dropdown.cc-dropdown--open .cc-dropdown__trigger {
    border-color: #4a7c59;
    border-radius: 10px 10px 0 0;
}

.cc-dropdown__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.cc-dropdown__text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cc-dropdown__name {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a2e;
    line-height: 1.3;
}

.cc-dropdown__ticker {
    font-size: 12px;
    color: #888;
    line-height: 1.3;
}

.cc-dropdown__chevron {
    color: #999;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.cc-dropdown.cc-dropdown--open .cc-dropdown__chevron {
    transform: rotate(180deg);
}

.cc-dropdown__options {
    display: none;
    max-height: 240px;
    overflow-y: auto;
    border: 2px solid #4a7c59;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 10px 10px;
    background: #fff;
    position: absolute;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.cc-dropdown.cc-dropdown--open .cc-dropdown__options {
    display: block;
}

.cc-dropdown__option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    background: #fff;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.1s;
}

.cc-dropdown__option:last-child {
    border-bottom: none;
}

.cc-dropdown__option:hover {
    background: #f9fafb;
}

.cc-dropdown__option--active {
    background: #f0faf3;
}

.cc-dropdown__option--active:hover {
    background: #f0faf3;
}

.cc-dropdown__option-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
}

.cc-dropdown__option-name {
    flex: 1;
    font-weight: 500;
    font-size: 14px;
    color: #1a1a2e;
}

.cc-dropdown__option--active .cc-dropdown__option-name {
    font-weight: 600;
}

.cc-dropdown__option-ticker {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

.cc-dropdown__option-check {
    display: none;
    flex-shrink: 0;
}

.cc-dropdown__option--active .cc-dropdown__option-check {
    display: block;
}

/* ─── Mini coin strip ─── */
.cc-dropdown__strip {
    display: flex;
    gap: 6px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
    align-items: center;
}

.cc-dropdown__mini-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    font-size: 7px;
    opacity: 0.4;
    transition: all 0.15s;
}

.cc-dropdown__mini-icon--active {
    opacity: 1;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #4a7c59;
}

.cc-dropdown__strip-count {
    font-size: 11px;
    color: #aaa;
    margin-left: auto;
}

/* ═══ Z-INDEX FIX: Ensure dropdown overlays Order Now button ═══ */
.payment_box.payment_method_crypto_checkout {
    z-index: 10;
}
