/* 
 * TAI Chat - Estilos para el sistema de expiración y renovación
 * Versión 1.0
 */

/* Modal de Renovación */
.tai-renewal-modal {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tai-renewal-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: none;
    padding: 1.5rem 2rem;
}

.tai-renewal-modal .modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.tai-renewal-modal .modal-body {
    padding: 2rem;
    background-color: #f8f9fa;
}

.tai-renewal-modal .section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

/* Tarjeta de Prompt */
.prompt-card {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease;
}

.prompt-card:hover {
    transform: translateY(-2px);
}

.prompt-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.prompt-avatar i {
    font-size: 2rem;
    color: white;
}

.prompt-details {
    flex: 1;
}

.prompt-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.prompt-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Estado */
.status-info {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.status-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f1f1;
}

.status-item:last-child {
    border-bottom: none;
}

.status-label {
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.status-value {
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
}

/* Tarjeta de Producto */
.product-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    min-height: 200px;
    position: relative;
}

.product-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    z-index: 10;
}

.product-loaded {
    display: none;
}

.product-loaded.active {
    display: block;
}

.product-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 1rem;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Lista de Beneficios */
.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    padding: 0.5rem 0;
    color: #555;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.benefits-list li i {
    margin-right: 0.75rem;
    font-size: 0.9rem;
}

/* Alertas */
#taiRenewalStatusAlert {
    border-radius: 10px;
    padding: 1rem 1.5rem;
    border: none;
    margin-bottom: 0;
}

#taiRenewalStatusAlert.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

#taiRenewalStatusAlert.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

#taiRenewalStatusAlert.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-content {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.alert-content i {
    font-size: 1.2rem;
    margin-right: 0.75rem;
}

/* Botones del Modal */
.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

#taiRenewalProductButton {
    min-width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

#taiRenewalProductButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

#taiRenewalProductButton .button-price {
    margin-left: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
}

#taiRenewalCheckoutButton {
    min-width: 150px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
}

/* Overlay de Bloqueo */
.tai-renewal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.tai-renewal-overlay::after {
    content: '⏳ Acceso interrumpido - Renovación requerida';
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* Responsive */
@media (max-width: 768px) {
    .tai-renewal-modal .modal-body {
        padding: 1.5rem;
    }
    
    .prompt-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .prompt-avatar {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .status-items {
        gap: 0.5rem;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    #taiRenewalProductButton,
    #taiRenewalCheckoutButton {
        width: 100%;
    }
}

/* Estados de Expiración */
.expired-badge {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.warning-badge {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
}

.ok-badge {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
}

/* Animaciones */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake-animation {
    animation: shake 0.5s ease-in-out;
}

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

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}