/* Pricing Modal Styles */

/* Modal Overlay - High z-index to appear above chat interface */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000; /* Very high z-index to appear above everything */
    padding: 1rem;
}

.modal-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10001;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: #6b7280;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 2rem;
}

.pricing-modal {
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.pricing-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.pricing-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.pricing-card.featured {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.plan-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.plan-header {
    text-align: center;
    margin-bottom: 2rem;
}

.plan-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 0.5rem;
    flex-direction: column;
}

.plan-price .main-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.plan-price .currency {
    font-size: 1.25rem;
    color: #6b7280;
    margin-right: 0.25rem;
}

.plan-price .amount {
    font-size: 3rem;
    font-weight: 800;
    color: #1f2937;
}

.plan-price .period {
    font-size: 1rem;
    color: #6b7280;
    margin-left: 0.25rem;
}

.price-inr {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    margin-top: 0.25rem;
    font-style: italic;
}

.plan-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.plan-features {
    margin-bottom: 2rem;
}

.feature {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.feature.disabled {
    opacity: 0.6;
}

.feature-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.feature-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.overage-rate {
    font-size: 0.75rem;
    color: #f59e0b;
    margin-top: 0.25rem;
    font-weight: 500;
}

.btn-select-plan {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-select-plan:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a42a0);
    transform: translateY(-2px);
}

/* Current Plan Styles */
.pricing-card.current-plan {
    border: 3px solid #10b981;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
    position: relative;
}

.current-badge {
    position: absolute;
    top: -1px;
    right: -1px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0 8px 0 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.btn-current-plan {
    width: 100%;
    background: #10b981;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.btn-current-plan:disabled {
    background: #10b981;
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
}

/* Upgrade Button Styles */
.btn-upgrade {
    width: 100%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-upgrade:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px);
}

/* Disabled Button Styles */
.btn-disabled {
    width: 100%;
    background: #9ca3af;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.btn-disabled:disabled {
    background: #9ca3af;
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Button Loader Styles */
.btn-loader {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: btn-spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading button state */
button:disabled .btn-loader {
    border-color: #9ca3af;
    border-top-color: transparent;
}

/* Usage Summary Styles */
.usage-summary {
    background: #f8fafc;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.usage-summary h3 {
    color: #1f2937;
    margin-bottom: 1.5rem;
    text-align: center;
}



.usage-stat {
    margin-bottom: 1.5rem;
}

.stat-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.stat-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.stat-progress {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    transition: width 0.3s ease;
}

.stat-progress[style*="100%"] {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.stat-text {
    font-size: 0.875rem;
    color: #6b7280;
}

.overage-charges {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
}

.overage-label {
    font-weight: 600;
    color: #92400e;
}

.overage-amount {
    font-size: 1.25rem;
    font-weight: 800;
    color: #92400e;
    margin-left: 0.5rem;
}

.subscription-actions {
    text-align: center;
    margin-top: 2rem;
}

.btn-cancel-subscription {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-cancel-subscription:hover {
    background: #dc2626;
}

/* Usage Warning Banner */
.usage-warning-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: white;
    display: none;
}

.usage-warning-banner.medium {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.usage-warning-banner.high {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.usage-warning-banner .close-warning {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
}

.usage-warning-banner .close-warning:hover {
    opacity: 1;
}

.upgrade-prompt {
    margin-left: 1rem;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out;
}

.notification.success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.notification.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Error Tracking Disabled Modal */
.error-tracking-disabled {
    text-align: center;
    padding: 2rem;
}

.error-tracking-disabled h3 {
    color: #ef4444;
    margin-bottom: 1rem;
}

.error-tracking-disabled p {
    color: #6b7280;
    margin-bottom: 2rem;
}

.feature-comparison {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.feature-comparison h4 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
}

.feature-list li::before {
    content: "✅";
    margin-right: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pricing-plans {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .pricing-modal {
        width: 95%;
        margin: 1rem;
    }
    
    .pricing-card {
        padding: 1.5rem;
    }
    
    .plan-price .amount {
        font-size: 2.5rem;
    }
    
    .usage-warning-banner {
        position: relative;
        font-size: 0.875rem;
    }
}