/* Pricing Page Styles */

.pricing-container {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
    color: #000;
}

.pricing-header {
    text-align: center;
    margin-bottom: 48px;
}

.pricing-title-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.pricing-title-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    object-fit: contain;
}

.pricing-header h1 {
    font-size: 42px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.pricing-subtitle {
    font-size: 18px;
    color: #000;
    margin-bottom: 12px;
}

.credit-balance-label {
    font-size: 15px;
    font-weight: 600;
    color: #000;
    margin: 0 0 10px;
}

.credit-balance-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
}

.credit-bar-edge {
    font-size: 13px;
    font-weight: 600;
    color: #000;
    min-width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.credit-bar-track {
    flex: 1;
    height: 20px;
    background: #e8e8ef;
    border-radius: 999px;
    overflow: hidden;
    min-width: 0;
}

.credit-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #7eb8ff 0%, #3b82f6 45%, #1d4ed8 100%);
    transition: width 0.3s ease;
}

.credit-pack-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.credit-pack-pill-form {
    margin: 0;
    display: inline;
}

.briefing-subscribe-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.briefing-subscribe-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.briefing-subscribe-status {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.briefing-subscribe-form {
    margin: 0;
    display: inline;
}

.briefing-subscribe-action-pill {
    color: #000 !important;
    width: auto;
    min-width: 0;
    padding: 10px 20px;
    box-sizing: border-box;
}

.briefing-subscribe-action-pill:hover,
.briefing-subscribe-action-pill:active,
.briefing-subscribe-action-pill:focus {
    color: #000 !important;
}

.pricing-container .dashboard-btn {
    color: #000 !important;
    width: auto;
    min-width: 0;
}

.pricing-container .dashboard-btn:hover,
.pricing-container .dashboard-btn:active,
.pricing-container .dashboard-btn:focus {
    color: #000 !important;
}

.pricing-container .dashboard-btn:disabled {
    opacity: 0.65;
    cursor: default;
    transform: none;
}

.pricing-features-card {
    max-width: 720px;
    margin: 0 auto;
}

.pricing-nav-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    max-width: 720px;
    margin: 14px auto 0;
}

.current-plan-badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 16px;
}

/* 4-column grid for the individual tiers */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 48px;
    width: 100%;
    box-sizing: border-box;
}

.pricing-card {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.pricing-card.current-tier {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102,126,234,0.05), rgba(118,75,162,0.05));
    box-shadow: 0 8px 24px rgba(102,126,234,0.2);
}

/* "Most Popular" badge */
.pricing-card.popular-card {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102,126,234,0.18);
}

.popular-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 18px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.tier-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 3.2px;
    border-bottom: 2px solid #f0f0f0;
}

.tier-name {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.tier-price {
    margin-bottom: 16px;
}

.price-amount {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

.price-period {
    font-size: 14px;
    color: #000;
    margin-left: 4px;
}

.tier-description-wrapper {
    min-height: 96px;
    display: flex;
    align-items: flex-start;
    margin-top: 6.4px;
    margin-bottom: -24px;
}

.tier-description {
    font-size: 12px;
    color: #000;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin: 0;
    width: 100%;
    text-align: justify;
}

.tier-features {
    flex: 1;
    margin-bottom: 24px;
    overflow: visible;
}

.tier-features h3 {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    margin-bottom: 16px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: visible;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 8px;
    min-width: 0;
    position: relative;
}

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

.feature-item.feature-disabled {
    opacity: 0.6;
}

.feature-emoji {
    font-size: 20px;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon-img {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
}

.feature-name {
    flex: 1;
    font-size: 13px;
    color: #000;
    font-weight: 500;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.feature-limit {
    font-size: 12px;
    color: #000;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}


.unlimited-badge-inline {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, #2196F3, #64B5F6);
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.disabled-badge {
    color: #999;
    font-size: 12px;
}

.tier-actions {
    margin-top: auto;
}

/* Tier action buttons use dashboard style; full width inside card */
.tier-actions .dashboard-btn {
    width: 100%;
    margin-bottom: 12px;
}

.tier-actions .dashboard-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.tier-actions .dashboard-btn:disabled:hover {
    transform: none;
}

.btn-block {
    width: 100%;
    margin-bottom: 12px;
}

/* Sign up button styling - red gradient with outline (similar to login button) */
.sign-up-btn {
    display: inline-block;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none !important;
    color: white !important;
    border-radius: 8px;
    border: 2px solid #f87171;
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #f87171 100%);
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.3);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    line-height: 1.4;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.sign-up-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.sign-up-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(220, 38, 38, 0.4);
    border-color: #fca5a5;
    background: linear-gradient(135deg, #ef4444 0%, #f87171 50%, #fca5a5 100%);
    color: white !important;
    text-decoration: none !important;
}

.sign-up-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.payment-note {
    text-align: center;
    color: #666;
    font-size: 12px;
    margin-top: 8px;
    font-style: italic;
}

.no-tiers-message {
    text-align: center;
    padding: 48px;
    color: #000;
}

/* ------------------------------------------------------------------ */
/* Team & Enterprise section                                          */
/* ------------------------------------------------------------------ */

/* ------------------------------------------------------------------ */
/* Dark theme support                                                 */
/* ------------------------------------------------------------------ */

.dark-theme .pricing-card {
    background: #2a2a2a;
    border-color: #444;
}

.dark-theme .pricing-card.current-tier {
    background: linear-gradient(135deg, rgba(102,126,234,0.15), rgba(118,75,162,0.15));
}

.dark-theme .pricing-header h1,
.dark-theme .tier-name,
.dark-theme .tier-features h3,
.dark-theme .feature-name {
    color: #fff;
}

.dark-theme .pricing-subtitle,
.dark-theme .tier-description-wrapper,
.dark-theme .feature-limit,
.dark-theme .payment-note,
.dark-theme .briefing-subscribe-status {
    color: #aaa;
}

.dark-theme .tier-description,
.dark-theme .price-period {
    color: #fff;
}


.dark-theme .tier-header {
    border-color: #444;
}

.dark-theme .feature-item {
    border-bottom-color: #444;
}

/* Dark theme pending tier notice */
.dark-theme .pending-tier-notice {
    background: linear-gradient(135deg, #5568d3 0%, #6941a0 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.dark-theme .pending-tier-notice strong {
    color: white;
}

/* ------------------------------------------------------------------ */
/* Responsive: 4 columns on wide, 2 on medium, 1 on mobile           */
/* ------------------------------------------------------------------ */

@media (max-width: 1600px) {
    .pricing-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }
    
    .pricing-card {
        padding: 16px;
    }
}

@media (max-width: 1400px) {
    .pricing-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
    }
    
    .pricing-card {
        padding: 14px;
    }
    
    .tier-name {
        font-size: 20px;
    }
    
    .price-amount {
        font-size: 30px;
    }
    
    .tier-description {
        font-size: 11px;
    }
    
    .tier-description-wrapper {
        min-height: 80px;
    }
    
    .feature-name {
        font-size: 12px;
    }
    
    .feature-limit {
        font-size: 11px;
    }
}

@media (max-width: 1300px) {
    .pricing-container {
        padding: 40px 15px;
    }
    
    .pricing-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }
    
    .pricing-card {
        padding: 12px;
    }
    
    .tier-name {
        font-size: 18px;
    }
    
    .price-amount {
        font-size: 28px;
    }
    
    .tier-description {
        font-size: 10px;
    }
    
    .tier-description-wrapper {
        min-height: 72px;
    }
    
    .tier-features h3 {
        font-size: 14px;
    }
    
    .feature-name {
        font-size: 11px;
    }
    
    .feature-limit {
        font-size: 10px;
    }
    
    .feature-emoji {
        font-size: 18px;
        width: 24px;
    }

    .feature-icon-img {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 1200px) {
    .pricing-container {
        padding: 40px 10px;
    }
    
    .pricing-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }
    
    .pricing-card {
        padding: 10px;
    }
    
    .tier-name {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .price-amount {
        font-size: 24px;
    }
    
    .price-period {
        font-size: 12px;
    }
    
    .tier-description {
        font-size: 9px;
        line-height: 1.3;
    }
    
    .tier-description-wrapper {
        min-height: 64px;
    }
    
    .tier-features h3 {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .feature-item {
        padding: 6px 0;
    }
    
    .feature-name {
        font-size: 10px;
    }
    
    .feature-limit {
        font-size: 9px;
    }
    
    .feature-emoji {
        font-size: 16px;
        width: 20px;
    }

    .feature-icon-img {
        width: 16px;
        height: 16px;
    }
    
    .btn-block {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .payment-note {
        font-size: 10px;
    }
}

/* Pending tier notice - matches tier badge styling */
.pending-tier-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.pending-tier-notice strong {
    font-weight: 700;
    color: white;
}

/* 2-column below 999px */
@media (max-width: 999px) {
    .pricing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

/* Stack to 1 column on mobile */
@media (max-width: 768px) {
    .pricing-container {
        max-width: 100%;
        padding: 20px 16px;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .pricing-header h1 {
        font-size: 32px;
    }

    .credit-balance-bar {
        max-width: 100%;
        padding: 0 8px;
    }

    .pricing-container .dashboard-btn {
        white-space: normal;
        text-align: center;
        max-width: 100%;
    }
    
    .price-amount {
        font-size: 36px;
    }
    
    .tier-name {
        font-size: 28px;
    }
    
    .pricing-card {
        padding: 24px;
    }
}

/* Cancellation section in pricing footer */
.cancellation-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.cancellation-section h5 {
    color: #495057;
    margin-bottom: 10px;
}

.cancellation-section p {
    color: #666;
    margin-bottom: 15px;
}

/* Unlimited badge styles */
.unlimited-badge-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    margin: 16px auto;
    max-width: 600px;
}

.unlimited-badge-gradient .badge-text {
    font-size: 1.2rem;
}

.unlimited-badge-gradient .infinity-symbol {
    font-size: 1.5rem;
}

.unlimited-badge-gradient .badge-description {
    margin: 8px 0 0 0;
    font-size: 0.9rem;
    opacity: 0.95;
}

/* Pending tier notice with margin */
.pending-tier-notice-centered {
    margin: 16px auto;
    max-width: 800px;
}

/* Cancellation warning notice */
.pending-tier-notice-cancellation {
    background: #fff3cd;
    border-color: #ffc107;
}

.pending-tier-notice-cancellation strong {
    color: #856404;
}

.pending-tier-notice-cancellation a {
    color: #856404;
    text-decoration: underline;
}

.pricing-footer-btn {
    display: inline-block;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none !important;
    color: white !important;
    border-radius: 8px;
    border: 2px solid #a78bfa;
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 50%, #a78bfa 100%);
    box-shadow: 0 3px 10px rgba(124, 58, 237, 0.3);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    line-height: 1.4;
    cursor: pointer;
    width: 240px;
    box-sizing: border-box;
}

.pricing-footer-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.pricing-footer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(124, 58, 237, 0.4);
    border-color: #c4b5fd;
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 50%, #c4b5fd 100%);
    color: white !important;
    text-decoration: none !important;
}

.pricing-footer-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
}

/* Cancel subscription button - red gradient */
.pricing-footer-btn.cancel-subscription-btn {
    border: 2px solid #ef4444 !important;
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #f87171 100%) !important;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.3) !important;
}

.pricing-footer-btn.cancel-subscription-btn:hover {
    border-color: #f87171 !important;
    background: linear-gradient(135deg, #ef4444 0%, #f87171 50%, #fca5a5 100%) !important;
    box-shadow: 0 5px 16px rgba(220, 38, 38, 0.4) !important;
}

.pricing-footer-btn.cancel-subscription-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3) !important;
}
