/* Estilos para el Sistema de Pagos */

/* Variables CSS para pagos */
:root {
    --payment-success: #4CAF50;
    --payment-error: #F44336;
    --payment-warning: #FF9800;
    --payment-info: #2196F3;
    --payment-primary: #00D4FF;
    --payment-secondary: #673AB7;
    
    /* Gradientes de pago */
    --gradient-success: linear-gradient(135deg, #4CAF50, #8BC34A);
    --gradient-error: linear-gradient(135deg, #F44336, #E91E63);
    --gradient-warning: linear-gradient(135deg, #FF9800, #FFC107);
    --gradient-info: linear-gradient(135deg, #2196F3, #03A9F4);
}

/* Notificaciones de pago */
.payment-success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: var(--gradient-success);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 12px 40px rgba(76, 175, 80, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInRight 0.5s ease-out;
    max-width: 350px;
}

.payment-error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: var(--gradient-error);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 12px 40px rgba(244, 67, 54, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInRight 0.5s ease-out;
    max-width: 350px;
}

.success-content,
.error-content {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.success-icon,
.error-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.success-text,
.error-text {
    flex: 1;
}

.success-text h3,
.error-text h3 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: bold;
}

.success-text p,
.error-text p {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.success-features {
    font-size: 0.8rem !important;
    opacity: 0.8 !important;
    font-style: italic;
}

/* Overlay de carga de pago */
.payment-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-loading {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    width: 90%;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--payment-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.payment-loading h3 {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
    color: var(--payment-primary);
}

.payment-loading p {
    margin: 0 0 8px 0;
    font-size: 1rem;
    opacity: 0.9;
}

.loading-note {
    font-size: 0.85rem !important;
    opacity: 0.7 !important;
    font-style: italic;
}

/* Modal de selección de método de pago */
.payment-method-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Modal de checkout */
.payment-checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.payment-checkout-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.5s ease-out;
}

.checkout-header {
    text-align: center;
    margin-bottom: 30px;
}

.checkout-header h2 {
    color: var(--payment-primary);
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    font-weight: bold;
}

.checkout-header p {
    color: #ccc;
    margin: 0;
    font-size: 1rem;
}

.plan-summary {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.plan-summary h3 {
    color: white;
    margin: 0 0 15px 0;
    font-size: 1.3rem;
    text-align: center;
}

.plan-price {
    text-align: center;
    margin-bottom: 20px;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--payment-primary);
    margin: 0;
}

.price-currency {
    font-size: 1.2rem;
    color: #ccc;
    margin-left: 5px;
}

.price-interval {
    color: #ccc;
    font-size: 0.9rem;
    margin-top: 5px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #ccc;
    font-size: 0.9rem;
}

.plan-features li::before {
    content: '✓';
    color: var(--payment-success);
    font-weight: bold;
    font-size: 1rem;
}

.payment-methods {
    margin-bottom: 25px;
}

.payment-methods h4 {
    color: white;
    margin: 0 0 15px 0;
    font-size: 1.1rem;
}

.payment-method-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.payment-method-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ccc;
}

.payment-method-option:hover {
    border-color: var(--payment-primary);
    background: rgba(0, 212, 255, 0.1);
}

.payment-method-option.selected {
    border-color: var(--payment-primary);
    background: rgba(0, 212, 255, 0.2);
    color: white;
}

.payment-method-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.payment-method-label {
    font-size: 0.8rem;
    font-weight: 600;
}

.checkout-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.checkout-actions .glass-button {
    flex: 1;
    max-width: 200px;
}

/* Elementos de Stripe */
.stripe-elements {
    margin-bottom: 20px;
}

.stripe-element {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    color: white;
}

.stripe-element--focus {
    border-color: var(--payment-primary);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

/* Animaciones */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Estilos específicos para el modal de método de pago */
.payment-method-modal .modal-content {
    max-width: 450px;
}

.payment-method-modal .plan-summary {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.payment-method-modal .plan-summary h3 {
    color: white;
    margin: 0 0 10px 0;
    font-size: 1.3rem;
}

.payment-method-modal .plan-price {
    margin: 0;
}

.payment-method-modal .price-amount {
    font-size: 2rem;
    font-weight: bold;
    color: var(--payment-primary);
}

.payment-method-modal .price-interval {
    color: #ccc;
    font-size: 1rem;
    margin-left: 5px;
}

.payment-method-modal .payment-methods h4 {
    color: white;
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    text-align: center;
}

.payment-method-modal .payment-method-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.payment-method-modal .payment-method-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ccc;
}

.payment-method-modal .payment-method-option:hover {
    border-color: var(--payment-primary);
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-2px);
}

.payment-method-modal .payment-method-option.selected {
    border-color: var(--payment-primary);
    background: rgba(0, 212, 255, 0.2);
    color: white;
}

.payment-method-modal .payment-method-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.payment-method-modal .payment-method-label {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.payment-method-modal .payment-method-description {
    font-size: 0.8rem;
    opacity: 0.8;
}

.payment-method-modal .payment-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.payment-method-modal .payment-actions .glass-button {
    flex: 1;
    max-width: 200px;
}

.payment-method-modal .payment-actions .glass-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .payment-success-notification,
    .payment-error-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .payment-checkout-content {
        padding: 20px;
        margin: 10px;
    }
    
    .checkout-header h2 {
        font-size: 1.5rem;
    }
    
    .price-amount {
        font-size: 2rem;
    }
    
    .checkout-actions {
        flex-direction: column;
    }
    
    .checkout-actions .glass-button {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .payment-loading {
        padding: 30px 20px;
    }
    
    .plan-features li {
        font-size: 0.85rem;
    }
    
    .payment-method-options {
        grid-template-columns: 1fr 1fr;
    }
    
    .payment-method-modal .payment-method-options {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .payment-method-modal .modal-content {
        margin: 10px;
        max-width: none;
    }
    
    .payment-method-modal .payment-actions {
        flex-direction: column;
    }
    
    .payment-method-modal .payment-actions .glass-button {
        max-width: none;
    }
}
