/* ==========================================================================
   Contabilidad General Express - Modern Pricing & Subscription Styles
   File: css/public/pricing.css
   ========================================================================== */

.pricing-section {
    padding: 3rem 1.5rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.pricing-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 2.5rem;
}

.pricing-badge-top {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid #e0e7ff;
}

.pricing-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    margin-bottom: 0.75rem;
    line-height: 1.25;
}

.pricing-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted, #64748b);
    line-height: 1.5;
}

/* Toggle Mensual vs Anual */
.pricing-toggle-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem auto 2.5rem;
}

.billing-toggle-container {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    position: relative;
    user-select: none;
}

.billing-cycle-btn {
    padding: 0.5rem 1.25rem;
    border: none;
    background: transparent;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.billing-cycle-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.discount-tag {
    background: #10b981;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    letter-spacing: 0.02em;
    animation: pulse 2.5s infinite;
}

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

/* Pricing Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    align-items: stretch;
}

@media (max-width: 960px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }
}

/* Pricing Card */
.pricing-card {
    background: #ffffff;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    padding: 2.25rem 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.1);
}

.pricing-card.featured {
    border: 2px solid #4f46e5;
    box-shadow: 0 10px 25px -3px rgba(79, 70, 229, 0.18);
    position: relative;
}

.featured-ribbon {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
}

.card-header-plan {
    margin-bottom: 1.25rem;
}

.plan-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.plan-desc {
    font-size: 0.9rem;
    color: #64748b;
    min-height: 2.5rem;
    line-height: 1.4;
}

/* Price Display */
.price-box {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.price-amount {
    font-size: 2.75rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    transition: all 0.2s ease-in-out;
}

.price-period {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
}

.price-billing-subtext {
    font-size: 0.8rem;
    color: #10b981;
    font-weight: 600;
    margin-top: 0.4rem;
    min-height: 1.2rem;
}

/* Features List */
.features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    flex-grow: 1;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.92rem;
    color: #334155;
    margin-bottom: 0.85rem;
    line-height: 1.45;
}

.features-list li i.check-icon {
    color: #10b981;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.features-list li strong {
    color: #0f172a;
}

/* Action CTA Button */
.plan-cta-btn {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border-radius: 0.6rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    border: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-plan-primary {
    background: #4f46e5;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-plan-primary:hover {
    background: #4338ca;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.btn-plan-outline {
    background: #ffffff;
    color: #4f46e5;
    border: 2px solid #e0e7ff;
}

.btn-plan-outline:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.btn-plan-dark {
    background: #0f172a;
    color: #ffffff;
}

.btn-plan-dark:hover {
    background: #1e293b;
}

/* Current Plan State */
.current-plan-badge {
    display: block;
    text-align: center;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 0.6rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
}

/* Upgrade Modal Context Styling */
.modal-upgrade-header {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    color: #ffffff;
    padding: 1.5rem;
    border-radius: 0.75rem 0.75rem 0 0;
    margin: -1.5rem -1.5rem 1.5rem;
    position: relative;
}

.modal-upgrade-header h3 {
    color: #ffffff;
    margin-bottom: 0.35rem;
    font-size: 1.35rem;
}

.modal-upgrade-header p {
    color: #c7d2fe;
    font-size: 0.9rem;
    margin: 0;
}

.upgrade-reason-banner {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.5rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #92400e;
    font-size: 0.92rem;
}

.upgrade-reason-banner i {
    font-size: 1.25rem;
    color: #d97706;
    flex-shrink: 0;
}

/* Modal Pricing Responsive & Layout Enhancements */
.modal-pricing-view {
    max-width: 1160px !important;
    width: 96% !important;
    max-height: 92vh !important;
    overflow-y: auto !important;
    padding: 0 !important;
    border-radius: 1.25rem !important;
    position: relative !important;
}

.modal-pricing-view .pricing-section {
    padding: 2.25rem 2rem 2.5rem !important;
    max-width: 100% !important;
    position: relative;
}

.pricing-modal-close-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    font-size: 1.6rem;
    line-height: 1;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.pricing-modal-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: scale(1.05);
}

@media (max-width: 1080px) {
    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
    .pricing-card {
        padding: 1.75rem 1.25rem;
    }
}

@media (max-width: 860px) {
    .modal-pricing-view {
        width: 98% !important;
        max-height: 94vh !important;
    }
    .modal-pricing-view .pricing-section {
        padding: 2rem 1.25rem !important;
    }
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 440px;
        margin: 0 auto;
    }
}
