/* Estilos para cartas 3D de métodos de pago */
.payment-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.payment-card-3d {
    perspective: 1000px;
    height: 180px;
}

.payment-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.payment-card-3d:hover .payment-card-inner {
    transform: rotateY(10deg) rotateX(5deg);
}

.payment-card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    color: white;
    transform: translateZ(0);
}

.payment-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.payment-icon {
    font-size: 1.5rem;
}

.payment-card-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.payment-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.payment-card-content p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.payment-card-content strong {
    opacity: 1;
}

/* Selector estilizado para bancos */
.styled-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.styled-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.styled-select:hover {
    border-color: #667eea;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.15);
}

.styled-select option {
    padding: 0.5rem;
    background: white;
    color: #374151;
}

/* Estilos para contenedor de vista previa de imágenes */
.image-preview-container {
    margin-top: 1rem;
    text-align: center;
}

.image-preview-container img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Mejoras para formularios de pago */
.payment-registration-form {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 2px solid #e5e7eb;
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.payment-registration-form h4 {
    color: #374151;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
}

.payment-registration-form .form-group {
    margin-bottom: 1.5rem;
}

.payment-registration-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.payment-registration-form input,
.payment-registration-form select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.payment-registration-form input:focus,
.payment-registration-form select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.payment-registration-form input[readonly] {
    background-color: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

.payment-registration-form .form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.payment-registration-form .btn {
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.payment-registration-form .btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.payment-registration-form .btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.payment-registration-form .btn.secondary {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.payment-registration-form .btn.secondary:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

/* Animaciones para cartas 3D */
@keyframes cardFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

.payment-card-3d:nth-child(odd) {
    animation: cardFloat 3s ease-in-out infinite;
}

.payment-card-3d:nth-child(even) {
    animation: cardFloat 3s ease-in-out infinite 1.5s;
}

/* Responsive para cartas de pago */
@media (max-width: 768px) {
    .payment-cards-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .payment-card-3d {
        height: 160px;
    }
    
    .payment-registration-form {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .payment-registration-form .form-actions {
        flex-direction: column;
    }
    
    .payment-registration-form .btn {
        width: 100%;
    }
}

/* Estilos para el modal de pago mejorado */
.payment-modal {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.payment-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 2px solid #e3f2fd;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.1);
}

.payment-summary h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1565c0;
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 10px;
}

.summary-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.summary-item {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.08),
        0 2px 10px rgba(0, 0, 0, 0.04);
    border: 2px solid #e5e7eb;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.summary-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: height 0.3s ease;
}

.summary-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.12),
        0 8px 25px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.summary-item:hover::before {
    height: 6px;
}

.summary-label {
    font-weight: 700;
    color: #1a202c;
    font-size: 1.1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.summary-value {
    font-weight: 800;
    font-size: 1.4rem;
    color: #2d3748;
    line-height: 1.2;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Estilo especial para la sección de números seleccionados */
.numbers-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 15px !important;
    min-height: auto;
    height: auto;
}

.numbers-section .summary-label {
    align-self: flex-start;
    margin-bottom: 2px;
}

.selected-numbers-display {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    justify-content: flex-start;
    padding: 8px 0;
    border: none;
}

.number-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.4);
    animation: fadeInScale 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.number-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.6);
}

.quantity-badge {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.4);
}

.price-badge {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 2px 8px rgba(67, 233, 123, 0.4);
}

.total-section {
    border-left: 4px solid #ff6b6b;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
}

.total-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    font-size: 1.2rem;
    padding: 8px 16px;
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.4);
    animation: pulse 2s infinite;
}

.exchange-section {
    border-left: 4px solid #feca57;
    background: linear-gradient(135deg, #fffbf0 0%, #fff3d4 100%);
}

.usd-badge {
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
    box-shadow: 0 2px 8px rgba(254, 202, 87, 0.4);
}

.exchange-rate {
    display: block;
    color: #666;
    font-size: 0.75rem;
    margin-top: 4px;
    font-style: italic;
}

/* Animaciones para el resumen */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Estilos para números seleccionados en la página principal */
.selected-number-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.4);
    animation: fadeInScale 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    margin: 2px;
}

.selected-number-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.6);
}

.selected-numbers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 0;
}

/* Responsive para resumen de compra */
@media (max-width: 768px) {
    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .selected-numbers-display {
        max-width: 100%;
        justify-content: flex-start;
    }
    
    .summary-value {
        align-self: flex-end;
    }
    
    .payment-summary {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .payment-summary h3 {
        font-size: 1.2rem;
    }
    
    .selected-number-badge {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
}
