/* Buy Crypto page — extends exchange look */

.buy-crypto-page .buy-hero {
    padding-bottom: 1.5rem;
}

.buy-panel {
    max-width: 560px;
    margin: 0 auto 3rem;
    padding: 0 1.1rem 2rem;
}

.buy-form {
    padding: 1.4rem 1.35rem 1.5rem;
    background: #131820;
    border: 1px solid #1f2635;
    border-radius: 14px;
}

.buy-form fieldset {
    border: 0;
    margin: 0 0 1.25rem;
    padding: 0;
}

.buy-form legend {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 0.65rem;
}

.coin-pills {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.coin-pill {
    cursor: pointer;
}

.coin-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.coin-pill span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.2rem;
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    border: 1px solid #2a3344;
    background: #0f131a;
    color: #d1d5db;
    font-weight: 650;
    font-size: 0.92rem;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.coin-pill input:checked + span {
    border-color: rgba(0, 255, 157, 0.45);
    background: rgba(0, 255, 157, 0.08);
    color: #00ff9d;
}

.buy-prices {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
    margin: 0 0 0.55rem;
}

.buy-price-card {
    padding: 0.7rem 0.55rem 0.65rem;
    border-radius: 10px;
    border: 1px solid #2a3344;
    background: #0f131a;
    text-align: center;
    cursor: pointer;
}

.buy-price-card.is-active {
    border-color: rgba(0, 255, 157, 0.45);
    background: rgba(0, 255, 157, 0.07);
}

.buy-price-coin {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 0.28rem;
}

.buy-price-sell {
    display: block;
    font-size: 0.92rem;
    font-weight: 800;
    color: #e8eaed;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
}

.buy-price-card.is-active .buy-price-sell {
    color: #00ff9d;
}

.buy-price-market {
    display: block;
    margin-top: 0.28rem;
    font-size: 0.68rem;
    color: #6b7280;
    line-height: 1.35;
}

.buy-price-stock {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
}

.buy-price-card.is-available .buy-price-stock {
    color: #00ff9d;
}

.buy-price-card.is-unavailable {
    opacity: 0.48;
    cursor: pointer;
}

.buy-price-card.is-unavailable .buy-price-stock {
    color: #f87171;
}

.coin-pill.is-unavailable span {
    opacity: 0.45;
    text-decoration: line-through;
}

.paypal-buttons.is-disabled {
    pointer-events: none !important;
    opacity: 1;
    filter: none;
}

.paypal-buttons.is-disabled iframe,
.paypal-buttons.is-disabled .paypal-buttons-context-iframe {
    display: none !important;
}

.paypal-disabled-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    border: 1px solid #2a3344;
    background: #1a2030;
    color: #9ca3af;
    font-weight: 650;
    font-size: 0.92rem;
    pointer-events: none;
    user-select: none;
    text-align: center;
}

#paypal-stock-msg {
    color: #f87171;
    margin: 0 0 1rem;
}

.buy-prices-hint {
    margin: 0 0 1.15rem !important;
}

.buy-form .field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #9ca3af;
}

.buy-form .field input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #2a3344;
    background: #0c1016;
    color: #e8eaed;
    font-size: 0.95rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.buy-form .field input:focus {
    outline: none;
    border-color: rgba(0, 255, 157, 0.4);
}

.buy-form .hint {
    margin: 0.55rem 0 0;
    font-size: 0.8rem;
    color: #6b7280;
}

.buy-form .hint strong {
    color: #e5e7eb;
}

.buy-summary {
    display: grid;
    gap: 0.45rem;
    margin: 0 0 1.1rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: rgba(0, 255, 157, 0.04);
    border: 1px solid rgba(0, 255, 157, 0.14);
}

.buy-summary > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.86rem;
    color: #9ca3af;
}

.buy-summary strong {
    color: #e8eaed;
    font-variant-numeric: tabular-nums;
}

.buy-convert {
    margin: 0 0 1.25rem;
    padding: 0.95rem 1rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 157, 0.22);
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.07) 0%, rgba(15, 19, 26, 0.9) 100%);
}

.buy-convert-kicker {
    margin: 0 0 0.7rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #00ff9d;
}

.buy-convert-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.buy-convert-side {
    flex: 1;
    min-width: 0;
}

.buy-convert-side span {
    display: block;
    font-size: 0.72rem;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.buy-convert-side strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: #f0f4f8;
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

.buy-convert-arrow {
    flex-shrink: 0;
    color: #00ff9d;
    font-size: 1.2rem;
    font-weight: 700;
}

.buy-convert-meta {
    margin: 0.75rem 0 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #9ca3af;
}

.buy-convert.is-ready .buy-convert-side:last-child strong {
    color: #00ff9d;
}

.paypal-buttons {
    min-height: 48px;
    margin-bottom: 1rem;
}

.buy-alert {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.86rem;
    line-height: 1.55;
}

.buy-alert-warn {
    background: rgba(255, 180, 50, 0.08);
    border: 1px solid rgba(255, 180, 50, 0.25);
    color: #d1b375;
}

.buy-alert code {
    color: #f0b429;
}

#buy-status {
    margin: 0 0 0.9rem;
    font-size: 0.86rem;
}

#buy-status.error {
    color: #f87171;
}

#buy-result-box {
    margin-top: 0.5rem;
}

@media (max-width: 640px) {
    .buy-panel {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .buy-prices {
        grid-template-columns: 1fr;
    }

    .buy-convert-row {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }

    .buy-convert-arrow {
        transform: rotate(90deg);
        align-self: center;
    }
}
