/* Mercantil Payment Modals Styles */

/* Input with prefix (dropdown + input) */
.input-with-prefix {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.prefix-select {
    width: auto;
    min-width: 80px;
    flex-shrink: 0;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.prefix-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-with-prefix input {
    flex: 1;
}

.mercantil-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.mercantil-modal {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.mercantil-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
    z-index: 1;
}

.mercantil-modal-close:hover {
    background: #e5e7eb;
    color: #374151;
    transform: rotate(90deg);
}

.mercantil-modal-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.mercantil-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.mercantil-modal-subtitle {
    margin: 8px 0 0 0;
    color: #6b7280;
    font-size: 14px;
}

.mercantil-modal-body {
    padding: 24px 32px 32px;
}

.mercantil-order-summary {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: #374151;
}

.summary-row:not(:last-child) {
    border-bottom: 1px solid #e5e7eb;
}

.summary-row strong {
    color: #111827;
    font-weight: 600;
}

.mercantil-payment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.form-group input {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.form-hint {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

.mercantil-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.mercantil-modal-actions button {
    flex: 1;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.btn-cancel:hover {
    background: #e5e7eb;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.mercantil-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 12px 16px;
    color: #991b1b;
    font-size: 14px;
    margin-top: 16px;
}

/* Mercantil Payment Buttons */
.mercantil-payment-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid #e5e7eb;
    background: white;
    color: #374151;
    margin: 8px 0;
}

.mercantil-payment-button:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.mercantil-payment-button .icon {
    font-size: 24px;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .mercantil-modal {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .mercantil-modal-header,
    .mercantil-modal-body {
        padding-left: 20px;
        padding-right: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .mercantil-modal-actions {
        flex-direction: column;
    }

    .mercantil-modal-actions button {
        width: 100%;
    }
}

