/* Processing Modal */
#nmi-processing-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
    font-size: 1.2em;
}

.nmi-spinner {
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid #fff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.nmi-payment-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.nmi-section {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.nmi-section h2 {
    font-size: 1.6em;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.nmi-section p {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.nmi-form-grid {
    display: grid;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #444;
    font-size: 0.95em;
}

input[type="text"],
input[type="tel"],
input[type="email"],
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s;
}

input:focus,
select:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.exp-group {
    display: flex;
    gap: 15px;
}

.exp-group select {
    flex: 1;
}

#payButton {
    width: 100%;
    padding: 14px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

#payButton:hover {
    background: #218838;
    transform: translateY(-2px);
}

.nmi-success {
    color: #28a745;
    font-weight: bold;
    margin-top: 20px;
}

.nmi-error {
    color: #dc3545;
    font-weight: bold;
    margin-top: 20px;
}

.nmi-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

/* Style: Grid (Modern Responsive) */
.nmi-style-grid .nmi-form-grid {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .nmi-style-grid .nmi-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.nmi-style-grid .full-width {
    grid-column: 1 / -1;
}

/* Style: Inline (Compact like Screenshot) */
.nmi-style-inline .nmi-form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 20px;
}

.nmi-style-inline .nmi-form-grid > div {
    flex: 1 1 calc(50% - 20px); /* 2 columns base */
    min-width: 200px;
}

@media (min-width: 992px) {
    .nmi-style-inline .nmi-form-grid > div {
        flex: 1 1 calc(25% - 20px); /* 4 columns on large screens for billing */
    }
}

.nmi-style-inline .full-width {
    flex: 1 1 100%;
}

.nmi-style-inline label {
    margin-bottom: 4px; /* Tighter spacing */
}

.nmi-style-inline .exp-group {
    gap: 10px;
}
#paay-challenge-modal {
    display: flex;
}

#paay-challenge-modal > div {
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

@media (max-width: 600px) {
    #paay-challenge-modal > div {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    #paay-challenge-iframe {
        height: 300px; /* Adjust for mobile */
    }
}