/**
 * Plans Purchase Module - Frontend Styles
 * Fase 1: Vista de Planes
 * Version: 1.0
 */

/* ===================================
   Plan Tabs Container - iOS Style
   =================================== */
.plan-tabs-container {
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
}

.plan-type-tabs {
    border-bottom: none;
    background: #e8e9eb;
    border-radius: 50px;
    padding: 2px;
    display: inline-flex;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.plan-type-tabs .nav-item {
    margin: 0;
    flex: 1;
}

.plan-type-tabs .nav-link {
    border: none;
    color: #3c3c43;
    padding: 0.6rem 2rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

.plan-type-tabs .nav-link:hover {
    color: #1c1c1e;
}

.plan-type-tabs .nav-link.active {
    color: #fff;
    background: #0d2b3f;
    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.12),
        0 3px 1px rgba(0, 0, 0, 0.04);
    border-radius: 50px;
}

/* ===================================
   Tab Content
   =================================== */
.plan-tabs-content {
    margin-top: 2rem;
    background-color: #30a5bf;
    padding: 45px;
    border-radius: 30px;
}

.plans-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0rem;
    justify-content: center;
}

/* ===================================
   Plan Card
   =================================== */
.plan-card {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.plan-card:hover,
.plan-card.hovered {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.plan-card.recommended {
    border-color: #0d2b3f;
    border-width: 3px;
}

.plan-card.plan-with-tests {
    background: linear-gradient(135deg, #f8f9ff 0%, #fff5f7 100%);
}

/* Plan Badge */
.plan-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background-color: #0d2b3f;
    color: #fff;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(245, 87, 108, 0.3);
}

/* Plan Icon */
.plan-icon {
    font-size: 3.5rem;
    color: #667eea;
    margin-bottom: 1.5rem;
}

.plan-card.plan-with-tests .plan-icon {
    color: #28a745;
}

.plan-card.recommended .plan-icon {
    color: #f5576c;
}

/* Plan Name */
.plan-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0d2b3f;
    margin-bottom: 1rem;
    line-height: 1.3;
    text-align: left;
}

/* Plan Price */
.plan-price {
    margin-bottom: 2rem;
    color: #0d2b3f;
    text-align: left;
}

.plan-price .currency {
    font-size: 1.5rem;
    font-weight: 600;
    vertical-align: super;
}

.plan-price .amount {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
}

.plan-price .period {
    font-size: 1.2rem;
    color: #0d2b3f;
    font-weight: 700;
    display: block;
    margin-top: 0.5rem;
}

.plan-card.plan-with-tests .plan-price {
    color: #0d2b3f;
}

/* Plan Features */
.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    flex-grow: 1;
    text-align: left;
}

.plan-features li {
    padding: 0.75rem 0;
    color: #4a5568;
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.plan-features li i {
    color: #28a745;
    font-size: 1.1rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.plan-features li.feature-highlight {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    padding: 1rem;
    border-radius: 8px;
    margin: 0.5rem 0;
    font-weight: 600;
}

.plan-features li.feature-highlight i {
    color: #28a745;
    font-size: 1.3rem;
}

/* Plan Footer */
.plan-footer {
    margin-top: auto;
    padding-bottom: 1.5rem;
}

.plan-footer .btn {
    width: 100%;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-acquire {
    background-color: #0d2b3f;
    border: none;
    color: #fff;
}

.btn-acquire:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4);
    color: #fff;
}

.btn-current-plan {
    background: #f8f9fa;
    border: 2px solid #0d2b3f;
    color: #0d2b3f;
}

.btn-current-plan:hover {
    background: #0d2b3f;
    color: #fff;
}

/* ===================================
   Custom Plan Section
   =================================== */
.custom-plan-section {
    padding: 0;
    margin: 0;
    margin-top: 1rem;
}

.custom-plan-card {
    background-color: #fff;
    color: #0d2b3f;
    padding: 2rem;
    border-radius: 20px;
    margin: 0 auto;
}

.custom-plan-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.custom-plan-card h4 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #0d2b3f;
}

.custom-plan-card p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: #0d2b3f;
    line-height: 1.6;
}

.btn-custom-plan {
    background: #30a5bf;
    color: #fff;
    padding: 1rem 2.5rem;
    font-weight: 700;
    border-radius: 20px;
    border: none;
    transition: all 0.3s ease;
}

.btn-custom-plan:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    color: #667eea;
}

.btn-custom-plan i {
    margin-right: 0.5rem;
}

/* ===================================
   Compare Plans Button
   =================================== */
.btn-compare-plans {
    color: #6c757d;
    font-size: 0.95rem;
    text-decoration: none;
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-compare-plans:hover {
    color: #6c757d;
    text-decoration: none;
}

.btn-compare-plans i {
    margin-right: 0.5rem;
}

/* ===================================
   Responsive Design
   =================================== */

/* Tablets */
@media (max-width: 992px) {
    .plan-card {
        margin-bottom: 2rem;
    }

    .plan-type-tabs .nav-link {
        padding: 0.875rem 2rem;
        font-size: 0.95rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .plan-type-tabs {
        width: 100%;
        flex-direction: column;
        border-radius: 12px;
        padding: 0.25rem;
    }

    .plan-type-tabs .nav-link {
        width: 100%;
        padding: 1rem;
        border-radius: 8px;
        justify-content: center;
    }

    .plan-card {
        padding: 2rem 1.5rem;
    }

    .plan-name {
        font-size: 1.5rem;
    }

    .plan-price .amount {
        font-size: 2.5rem;
    }

    .custom-plan-card {
        padding: 2rem 1.5rem;
    }

    .custom-plan-card h4 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .plans-grid {
        gap: 1.5rem;
    }

    .plan-card {
        margin-bottom: 1.5rem;
    }

    .plan-icon {
        font-size: 2.5rem;
    }

    .plan-features li {
        font-size: 0.9rem;
    }
}

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

.plan-card {
    animation: fadeInUp 0.6s ease-out;
}

.plan-card:nth-child(1) {
    animation-delay: 0.1s;
}

.plan-card:nth-child(2) {
    animation-delay: 0.2s;
}

.plan-card:nth-child(3) {
    animation-delay: 0.3s;
}

.plan-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Loading State */
.btn-acquire:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-acquire .fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* ===================================
   Print Styles
   =================================== */
@media print {
    .custom-plan-section,
    .btn-compare-plans,
    .plan-footer {
        display: none;
    }

    .plan-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}
