/**
 * NMI Collect.js Styles for WooCommerce
 */

#nmi-payment-container {
    padding: 15px 0;
}

#nmi-payment-container.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Test mode notice */
.nmi-test-mode-notice {
    background: #f7dc6f;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Wallet buttons (Apple Pay / Google Pay) */
#nmi-wallet-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

#nmi-apple-pay-button,
#nmi-google-pay-button {
    min-height: 48px;
    border-radius: 4px;
    overflow: hidden;
}

#nmi-apple-pay-button iframe,
#nmi-google-pay-button iframe {
    width: 100% !important;
    min-height: 48px !important;
}

/* Divider */
.nmi-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #757575;
    font-size: 14px;
}

.nmi-divider::before,
.nmi-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #dcdcde;
}

.nmi-divider span {
    padding: 0 15px;
}

/* Card fields */
#nmi-card-fields {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nmi-field-wrapper {
    display: flex;
    flex-direction: column;
}

.nmi-field-wrapper label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #1e1e1e;
}

.nmi-field-wrapper label .required {
    color: #dc3232;
}

.nmi-collect-field {
    height: 44px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.nmi-collect-field iframe {
    height: 44px !important;
    width: 100% !important;
}

.nmi-collect-field:focus-within {
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.nmi-field-valid {
    border-color: #46b450 !important;
}

.nmi-field-invalid {
    border-color: #dc3232 !important;
}

/* Row layout for expiry and CVV */
.nmi-field-row {
    display: flex;
    gap: 15px;
}

.nmi-field-half {
    flex: 1;
}

/* Error messages */
.nmi-errors {
    background: #fef1f1;
    border: 1px solid #dc3232;
    border-radius: 4px;
    padding: 12px 15px;
    margin-top: 15px;
    color: #8a1f1f;
}

.nmi-errors p {
    margin: 0;
}

/* Responsive */
@media (max-width: 480px) {
    .nmi-field-row {
        flex-direction: column;
    }
    
    #nmi-wallet-buttons {
        gap: 8px;
    }
}

/* Loading state for fields */
.nmi-collect-field.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: nmi-shimmer 1.5s infinite;
}

@keyframes nmi-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .nmi-field-wrapper label {
        color: #f0f0f0;
    }
    
    .nmi-divider {
        color: #a0a0a0;
    }
    
    .nmi-divider::before,
    .nmi-divider::after {
        border-color: #444;
    }
}


