/**
 * Estilos para UI de Planes y Restricciones (REDISEÑO MODERNO)
 */

/* ====================
   ESTRUCTURA GENERAL
   ==================== */
.subscriptions-header-container {
    text-align: center;
    margin-bottom: 32px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--color-text-secondary);
}

.plans-container {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap; /* Para responsive */
    padding: 10px;
}

/* ====================
   TARJETA DE PLAN (BASE)
   ==================== */
.plan-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    padding: 32px 24px;
    flex: 1;
    min-width: 280px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.plan-card.base {
    background: #f8fafc; /* Gris muy suave */
    border-color: #e2e8f0;
}

/* ====================
   TARJETA PRO (PREMIUM)
   ==================== */
.plan-card.pro {
    background: #ffffff;
    border: 2px solid var(--color-primary); /* Borde destacado */
    box-shadow: 0 20px 40px rgba(var(--color-primary-rgb), 0.15); /* Sombra coloreada suave */
    transform: scale(1.02); /* Ligeramente más grande */
    z-index: 10;
}

.plan-card.pro:hover {
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 25px 50px rgba(var(--color-primary-rgb), 0.2);
}

.recommended-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(var(--color-primary-rgb), 0.3);
}

/* ====================
   HEADER TARJETA
   ==================== */
.plan-card-header {
    text-align: center;
    margin-bottom: 24px;
}

.plan-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: inline-block;
}

.plan-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-text-primary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--color-text-primary);
    line-height: 1;
}

.plan-card.pro .plan-price {
    color: var(--color-primary); /* Precio en azul en Pro */
}

.plan-period {
    font-size: 1rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    margin-left: 4px;
}

/* Status Badge (Activo/Inactivo) */
.status-badge {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
}

.plan-card.pro .status-badge {
    background: #dbeafe; /* Azul claro */
    color: var(--color-primary);
}

/* ====================
   BODY (FEATURES)
   ==================== */
.plan-card-body {
    flex: 1;
}

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

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
}

.feature-icon, .feature-check {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: -2px;
}

/* Checkmarks verdes para Pro */
.plan-card.pro .feature-check {
    /* El emoji ya es verde, pero podemos ocultarlo y usar SVG si quisiéramos. 
       Por ahora el emoji ✅ funciona bien y es universal */
}

.feature-desc {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-tertiary);
    margin-top: 2px;
}

.plan-features strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

/* Highlight especial para IA Ilimitada */
.feature-highlight div strong {
    color: var(--color-primary);
    font-weight: 800;
}

/* ====================
   USO DE IA (BARRA MODERNA)
   ==================== */
.usage-stats-modern {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    border: 1px solid #f1f5f9;
    margin-top: auto; /* Empujar al fondo si sobra espacio */
}

.usage-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.usage-track {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.usage-fill {
    height: 100%;
    background: linear-gradient(to right, #94a3b8, #64748b);
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ====================
   FOOTER Y BOTONES
   ==================== */
.plan-card-footer {
    margin-top: 24px;
    text-align: center;
}

/* Botón Pro (Muy llamativo) */
.btn-pro {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
    border: none;
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(var(--color-primary-rgb), 0.3);
}

.btn-pro:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(var(--color-primary-rgb), 0.4);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.cancel-anytime {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--color-text-tertiary);
}

/* ====================
   RESPONSIVE
   ==================== */
@media (max-width: 768px) {
    .plans-container {
        flex-direction: column; /* Apilar en móvil */
        align-items: center;
        gap: 32px;
    }

    .plan-card {
        width: 100%;
        max-width: 100%; /* Ocupar todo el ancho */
    }

    .plan-card.base {
        order: 2; /* Poner el gratis debajo en móvil */
    }

    .plan-card.pro {
        order: 1; /* Poner el Pro primero en móvil */
        transform: scale(1); /* Resetear escala para que no se salga */
        border-width: 2px;
    }
}

/* ====================
   UTILIDADES (Mantener compatibility)
   ==================== */
.hidden {
    display: none !important;
}

.ai-usage-indicator.danger {
    color: var(--color-danger);
}
