/**
 * BitPay Payment Gateway - WooCommerce Blocks Checkout Styles
 *
 * @package BitPay_Payment_Gateway
 */

/* Payment method label */
.bitpay-payment-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
    font-weight: 500;
}

.bitpay-payment-title {
    flex-shrink: 0;
}

/* Card icons */
.bitpay-card-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.bitpay-card-icon {
    display: inline-flex;
    line-height: 0;
}

.bitpay-card-icon svg,
.bitpay-card-icons svg {
    display: block;
    width: 38px;
    height: 24px;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Content container */
.bitpay-blocks-checkout-content,
.bitpay-blocks-direct-content {
    padding: 16px 0;
}

.bitpay-blocks-checkout-content p,
.bitpay-blocks-direct-content .bitpay-description {
    margin: 0 0 16px;
    color: #666;
    font-size: 14px;
}

/* Card form */
.bitpay-card-form {
    background-color: #f8f9fa;
    border: 1px solid #e1e5eb;
    border-radius: 4px;
    padding: 20px;
}

/* Form rows */
.bitpay-form-row {
    margin-bottom: 16px;
}

.bitpay-form-row:last-child {
    margin-bottom: 0;
}

.bitpay-form-row-half {
    display: flex;
    gap: 16px;
}

.bitpay-form-col {
    flex: 1;
}

/* Labels */
.bitpay-card-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.bitpay-card-form .required {
    color: #e74c3c;
}

/* Inputs */
.bitpay-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.bitpay-input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
    outline: none;
}

.bitpay-input::placeholder {
    color: #999;
}

/* Card number styling */
#bitpay-card-number {
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    letter-spacing: 2px;
}

/* Responsive */
@media screen and (max-width: 480px) {
    .bitpay-form-row-half {
        flex-direction: column;
        gap: 16px;
    }

    .bitpay-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* WooCommerce Blocks specific overrides */
.wc-block-checkout__payment-method .bitpay-card-form {
    margin-top: 8px;
}

.wc-block-components-radio-control-accordion-option .bitpay-blocks-direct-content {
    padding-top: 8px;
}

/* =========================================================
   V5Pay product type selector (Blocks Checkout)
   ========================================================= */

.bitpay-v5pay-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.bitpay-v5pay-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 12px 16px;
    min-width: 96px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s ease, background 0.2s ease;
    user-select: none;
}

.bitpay-v5pay-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.bitpay-v5pay-icon {
    width: 52px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.bitpay-v5pay-option span {
    font-size: 12px;
    color: #555;
    text-align: center;
    line-height: 1.3;
}

.bitpay-v5pay-option:has(input:checked),
.bitpay-v5pay-option.is-selected {
    border-color: #0073aa;
    background: #f0f6fc;
}

.bitpay-v5pay-option:has(input:checked) span,
.bitpay-v5pay-option.is-selected span {
    color: #0073aa;
    font-weight: 600;
}

@media screen and (max-width: 480px) {
    .bitpay-v5pay-options {
        gap: 8px;
    }

    .bitpay-v5pay-option {
        min-width: 80px;
        padding: 10px 12px;
    }
}
