/* ====================================
   TIER & PACKAGE SELECTION
   Modal-style takeover with asymmetric cards
   ==================================== */

/* Modal-Style Takeover Container */
.tier-selection-takeover {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-width: 900px;
    margin: 1rem auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Progress Narrative Header */
.tier-progress-header {
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.progress-checkmark {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.progress-content {
    flex: 1;
}

.progress-title {
    font-size: 1.1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

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

/* Main Content Area */
.tier-selection-content {
    padding: 1rem 1.5rem;
}

/* Header Styling */
.tier-cards-header {
    text-align: center;
    margin-bottom: 0.75rem;
}

.tier-cards-header h3 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0;
}

/* Asymmetric Tier Cards Layout */
.tier-cards-asymmetric {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

/* Base Tier Card Styles */
.tier-card {
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: auto;
    width: 100%;
    max-width: 450px;
}

/* Pro Card - Larger with Glow */
.tier-card-pro {
    border-color: var(--ledewire-yellow);
    box-shadow: 0 4px 16px rgba(255, 243, 141, 0.3);
}

.tier-card-pro:hover {
    box-shadow: 0 6px 24px rgba(255, 243, 141, 0.5);
    transform: translateY(-2px);
}

/* Research Card - Compact */
.tier-card-research:hover {
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

/* Badge Styling */
.tier-badge {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ledewire-yellow);
    color: var(--charcoal);
    padding: 0.35rem 0.85rem;
    border-radius: 0 0 var(--radius) var(--radius);
    font-size: 0.75rem;
    font-weight: var(--font-weight-bold);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Icon Styling */
.tier-icon {
    font-size: 1.75rem;
    margin-bottom: 0.15rem;
    text-align: center;
}

/* Title & Price Styling */
.tier-title-new {
    font-size: 1.1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    text-align: center;
}

.tier-price-new {
    font-size: 1.75rem;
    font-weight: var(--font-weight-bold);
    color: var(--ledewire-yellow);
    margin-bottom: 0.15rem;
    line-height: 1;
    text-align: center;
}

.tier-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-align: center;
}

/* Features List - Compact */
.tier-features-compact {
    list-style: none;
    padding: 0;
    margin: 0 0 0.65rem 0;
    flex: 1;
}

.tier-features-compact li {
    font-size: 0.85rem;
    color: var(--text-primary);
    padding: 0.2rem 0;
    line-height: 1.3;
}

/* Button Styling - Primary vs Ghost */
.tier-purchase-btn {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: auto;
}

.tier-btn-primary {
    background: #fff38D;
    color: var(--charcoal);
    border: 2px solid #fff38D;
}

.tier-btn-primary:hover {
    background: #f5e65c;
    border-color: #f5e65c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 243, 141, 0.4);
}

.tier-btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-light);
}

.tier-btn-ghost:hover {
    border-color: var(--text-primary);
    background: var(--bg-secondary);
}

.tier-purchase-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Microcopy Below Button */
.tier-microcopy {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Comparison Accordion */
.tier-comparison-accordion {
    margin: 1.5rem 0;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--bg-card);
}

.accordion-summary {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    list-style: none;
    user-select: none;
    transition: background 0.2s ease;
}

.accordion-summary:hover {
    background: var(--bg-secondary);
}

.accordion-summary::-webkit-details-marker {
    display: none;
}

.accordion-content {
    padding: 0 1.25rem 1.25rem 1.25rem;
    border-top: 1px solid var(--border-light);
}

.tier-comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.tier-comparison-table th {
    background: var(--bg-secondary);
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: var(--font-weight-semibold);
    text-align: left;
    border-bottom: 2px solid var(--border-light);
}

.tier-comparison-table td {
    padding: 0.75rem;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-light);
}

.tier-comparison-table td:first-child {
    color: var(--text-primary);
    font-weight: var(--font-weight-medium);
}

.tier-comparison-table td:not(:first-child) {
    text-align: center;
    color: var(--text-secondary);
}

/* Security Footer */
.tier-security-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    margin-top: 1.5rem;
}

.security-icon {
    font-size: 1.1rem;
}

.security-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .tier-selection-takeover {
        margin: 0.5rem;
    }
    
    .tier-progress-header {
        padding: 1rem;
    }
    
    .progress-title {
        font-size: 1rem;
    }
    
    .progress-subtitle {
        font-size: 0.85rem;
    }
    
    .tier-selection-content {
        padding: 1.5rem 1rem;
    }
    
    /* Stack vertically on mobile with Pro first */
    .tier-cards-asymmetric {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tier-card {
        min-height: auto;
    }
    
    .tier-card-pro {
        order: 1;
    }
    
    .tier-card-research {
        order: 2;
    }
    
    .tier-icon {
        font-size: 2rem;
    }
    
    .tier-title-new {
        font-size: 1.1rem;
    }
    
    .tier-price-new {
        font-size: 1.75rem;
    }
    
    .tier-comparison-table {
        font-size: 0.8rem;
    }
    
    .tier-comparison-table th,
    .tier-comparison-table td {
        padding: 0.5rem 0.35rem;
    }
}

/* Current Query Summary */
.current-query-summary {
    background: var(--pale-grey);
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.current-query-summary h4 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: var(--font-weight-semibold);
}

/* Modern Research Packages - Matching React ResearchPackets component */
.research-packages {
    margin: 1.5rem 0;
    padding: 1.5rem;
}

.packages-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.packages-header h3 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-medium);
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.packages-header p {
    color: var(--muted-foreground);
    font-size: 0.95rem;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    max-width: 1024px;
    margin: 0 auto;
}

.package-card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.package-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.package-card.highlighted {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, rgba(255, 243, 141, 0.05) 0%, rgba(255, 243, 141, 0.1) 100%);
}

.package-card.highlighted::before {
    content: "Most Popular";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--accent-foreground);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: var(--font-weight-medium);
}

.package-header {
    margin-bottom: 1.5rem;
}

.package-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    font-size: 1.5rem;
}

.package-card:not(.highlighted) .package-icon {
    background: var(--muted);
    color: var(--muted-foreground);
}

.package-card.highlighted .package-icon {
    background: var(--accent);
    color: var(--accent-foreground);
}

.package-title {
    font-size: 1.125rem;
    font-weight: var(--font-weight-medium);
    color: var(--card-foreground);
    margin-bottom: 0.5rem;
}

.package-price {
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    color: var(--foreground);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.package-description {
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    color: var(--foreground);
    margin-bottom: 1rem;
}

.package-subtitle {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    line-height: 1.4;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.package-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    text-align: left;
}

.package-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.package-feature::before {
    content: "✓";
    color: var(--accent);
    font-weight: var(--font-weight-bold);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.package-card.highlighted .package-feature::before {
    color: var(--accent);
}

.package-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: auto;
}

.package-card:not(.highlighted) .package-btn {
    background: var(--primary);
    color: var(--primary-foreground);
}

.package-card:not(.highlighted) .package-btn:hover {
    background: var(--muted-foreground);
}

.package-card.highlighted .package-btn {
    background: var(--accent);
    color: var(--accent-foreground);
}

.package-card.highlighted .package-btn:hover {
    background: var(--accent);
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-yellow);
}
