/* AuthNet Lab — Checkout Styles */

/* ─────────────────────────────────────────────────────────────────────────────
   Wallet Buttons (Google Pay / Apple Pay)
   ───────────────────────────────────────────────────────────────────────────── */
.authnet-lab-wallet-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.authnet-lab-wallet-btn {
    flex: 1;
    min-width: 140px;
}

/* Google Pay button inherits its own styles from the API */
.authnet-lab-wallet-btn button,
.authnet-lab-wallet-btn .gpay-button {
    width: 100%;
    min-height: 48px;
}

/* Apple Pay button - uses native -webkit-appearance */
.authnet-lab-applepay-button {
    -webkit-appearance: -apple-pay-button;
    -apple-pay-button-type: buy;
    -apple-pay-button-style: black;
    width: 100%;
    min-height: 48px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.authnet-lab-applepay-button:hover {
    opacity: 0.9;
}

/* Divider between wallet and card */
.authnet-lab-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0 16px;
    color: #888;
    font-size: 0.85em;
}

.authnet-lab-divider::before,
.authnet-lab-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.authnet-lab-divider span {
    padding: 0 16px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Card Form Fields
   ───────────────────────────────────────────────────────────────────────────── */
.authnet-lab-fields {
    margin: 12px 0 0;
}

.authnet-lab-fields .form-row {
    margin-bottom: 14px;
}

.authnet-lab-fields label {
    display: block;
    font-size: 0.875em;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.authnet-lab-fields label .required {
    color: #e2401c;
}

.authnet-lab-fields .input-text {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    background: #fff;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
    letter-spacing: 0.05em;
}

.authnet-lab-fields .input-text:focus {
    border-color: #96588a;
    outline: none;
    box-shadow: 0 0 0 2px rgba(150, 88, 138, 0.15);
}

.authnet-lab-fields .form-row-first,
.authnet-lab-fields .form-row-last {
    width: 48%;
    display: inline-block;
    box-sizing: border-box;
}

.authnet-lab-fields .form-row-last {
    float: right;
}

.authnet-lab-fields::after {
    content: '';
    display: table;
    clear: both;
}

/* Error messages - hidden by default */
.authnet-lab-errors {
    display: none;
    background: #fff0f0;
    border: 1px solid #e2401c;
    border-radius: 4px;
    padding: 10px 14px;
    margin-top: 10px;
    color: #e2401c;
    font-size: 0.9em;
}

.authnet-lab-errors.is-visible {
    display: block;
}

.authnet-lab-errors p {
    margin: 0;
}

.authnet-lab-description {
    margin-bottom: 12px;
    color: #555;
    font-size: 0.9em;
}

/* Card Icons */
.authnet-lab-card-icons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    align-items: center;
}

.authnet-lab-card-icons svg {
    width: 45px;
    height: 30px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.authnet-lab-card-icons svg.is-active {
    opacity: 1;
}

.authnet-lab-card-icons .authnet-lab-icon-wrapper {
    display: inline-block;
    line-height: 0;
}

/* Accepted cards label */
.authnet-lab-accepted-cards {
    font-size: 0.75em;
    color: #888;
    margin-bottom: 4px;
    font-weight: normal;
}

/* Blocks editor preview */
.authnet-lab-editor-preview {
    padding: 12px;
    background: #f8f8f8;
    border: 1px dashed #ccc;
    border-radius: 4px;
    color: #888;
    font-size: 0.9em;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .authnet-lab-wallet-buttons {
        flex-direction: column;
    }
    
    .authnet-lab-wallet-btn {
        min-width: 100%;
    }
    
    .authnet-lab-fields .form-row-first,
    .authnet-lab-fields .form-row-last {
        width: 100%;
        display: block;
        float: none;
    }
    
    .authnet-lab-fields .form-row-last {
        margin-top: 0;
    }
    
    .authnet-lab-card-icons svg {
        width: 32px;
        height: 20px;
    }
}
