/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Content */
.payment-modal {
    background: #fff;
    width: 90%;
    max-width: 800px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-overlay.active .payment-modal {
    transform: translateY(0);
}

/* Header */
.payment-header {
    background: #f8f9fa;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-header h3 {
    margin: 0;
    color: #1a1a1a;
    font-size: 1.2rem;
    font-weight: 700;
}

.payment-header p {
    margin: 4px 0 0;
    color: #666;
    font-size: 0.9rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

/* Payment Options (Tabs) */
.payment-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding: 20px 30px;
    gap: 15px;
    background: #fff;
}

.payment-option {
    position: relative;
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-option:hover {
    border-color: #e0e0e0;
    background: #f8f9fa;
}

.payment-option.selected {
    border-color: #2e5cff;
    background: #f0f4ff;
}

.payment-option input {
    display: none;
}

.option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.option-content i {
    font-size: 24px;
    color: #666;
    transition: color 0.2s;
}

.payment-option.selected .option-content i {
    color: #2e5cff;
}

.option-content .text {
    display: flex;
    flex-direction: column;
}

.option-content .title {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.payment-option.selected .option-content .title {
    color: #2e5cff;
}

.option-content .subtitle {
    font-size: 0.75rem;
    color: #888;
}

.check-circle {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ddd;
    transition: all 0.2s;
}

.payment-option.selected .check-circle {
    background: #2e5cff;
    border-color: #2e5cff;
}

.payment-option.selected .check-circle::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Body Content */
.payment-body {
    padding: 0 30px 30px;
    overflow-y: auto;
    flex: 1;
}

.payment-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.payment-content.active {
    display: block;
}

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

/* Wallet and Cash Common Styles */
.wallet-container, .cash-container {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.wallet-info, .cash-info {
    text-align: center;
    max-width: 400px;
}

.wallet-info h4, .cash-info h4 {
    margin: 0 0 20px;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

.wallet-info p, .cash-info p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Wallet Specific Styles */
.wallet-logos {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.badge.yape { 
    background: #742284; 
}

.badge.plin { 
    background: #00d3f8; 
    color: #003057; 
}

.qr-wrapper {
    background: white;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #eee;
    display: inline-block;
    margin-bottom: 15px;
}

.qr-wrapper img {
    width: 180px;
    height: 180px;
    display: block;
}

/* Cash Specific Styles */
.cip-box {
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.qr-small {
    background: white;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid #eee;
    margin: 0;
}

.qr-small img {
    width: 60px;
    height: 60px;
    display: block;
}

.cip-details span {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    letter-spacing: 1px;
}

.pe-logo {
    margin-bottom: 15px;
    font-weight: 800;
    color: #e83e8c;
    font-size: 1.2rem;
}

/* Footer */
.payment-footer {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    background: #fff;
}

.btn-pay {
    width: 100%;
    background: #2e5cff;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(46, 92, 255, 0.2);
}

.btn-pay:hover {
    background: #1a45e6;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(46, 92, 255, 0.3);
}

.btn-pay:active {
    transform: translateY(0);
}



/* Responsive */
@media (max-width: 768px) {
    .payment-modal {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .payment-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .option-content {
        flex-direction: row;
        text-align: left;
    }
}


/* Contenedor del grupo con más aire */
.form-group {
    margin-bottom: 25px;
    padding: 0 15px;
}

/* Etiquetas suaves y modernas */
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #8e9aaf; /* Gris azulado suave */
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center; /* Centrado para estilo soft */
}

/* El Input estilo "Soft" */
.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #f1f3f9; /* Borde casi invisible */
    border-radius: 16px; /* Muy redondeado */
    font-size: 1rem;
    color: #2d3436;
    background-color: #f8faff; /* Fondo sutilmente azulado */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    outline: none;
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.02); /* Sombra interna sutil */
}

/* Efecto de foco (Neumorfismo ligero) */
.form-group input:focus {
    background-color: #ffffff;
    border-color: #2e5cff;
    transform: translateY(-2px); /* Pequeña elevación */
    box-shadow: 0 10px 20px rgba(46, 92, 255, 0.1); /* Sombra exterior suave */
}

/* Placeholder discreto */
.form-group input::placeholder {
    color: #c0c9d8;
    font-weight: 400;
}

.wallet-info p {
    background: #f0f4ff; /* Azul muy pálido */
    color: #5c7cfa;    /* Azul suave para el texto */
    display: inline-block;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 20px 0 30px 0; /* Mucho aire hacia los inputs */
    border: 1px solid rgba(92, 124, 250, 0.1);
}

/* Aplicar fuente a todo el modal */
.payment-modal {
    font-family: 'Outfit', sans-serif;
}

.form-group label {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: 0.8px; /* Hace que la etiqueta se vea premium */
    color: #4a5568;
    font-size: 0.75rem;
}

.form-group input {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    color: #2d3436; /* Un gris profundo, más suave que el negro */
    letter-spacing: 0.3px;
    font-size: 1rem;
}

/* El toque final: estilizar el placeholder */
.form-group input::placeholder {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    color: #a0aec0;
    letter-spacing: 0.5px;
}