/* SiteSim Pro Subscription Styles */

/* Upsell banner */
.subscription-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 10px;
    display: none;
}

.subscription-banner.show {
    display: block;
}

.subscription-banner h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
}

.subscription-banner p {
    margin: 0 0 12px 0;
    font-size: 13px;
    opacity: 0.9;
}

.subscription-banner .btn-upgrade {
    background: white;
    color: #667eea;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.subscription-banner .btn-upgrade:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Free tier indicator */
.free-tier-indicator {
    background: #2d2d2d;
    border-radius: 4px;
    padding: 6px 10px;
    margin: 8px 10px;
    font-size: 12px;
    color: #888;
    display: none;
}

.free-tier-indicator.show {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.free-tier-indicator .messages-left {
    color: #4CAF50;
}

.free-tier-indicator .messages-left.warning {
    color: #FF9800;
}

.free-tier-indicator .messages-left.empty {
    color: #f44336;
}

/* Subscription Modal */
.subscription-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 100000;
    align-items: center;
    justify-content: center;
}

.subscription-modal.show {
    display: flex;
}

.subscription-modal-content {
    background: #1e1e1e;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.subscription-modal-header {
    padding: 24px 24px 0;
    text-align: center;
}

.subscription-modal-header h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: white;
}

.subscription-modal-header p {
    margin: 0;
    color: #888;
    font-size: 14px;
}

.subscription-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
}

.subscription-modal-close:hover {
    color: white;
}

/* Pricing section (new unified design) */
.pricing-section {
    padding: 24px;
    text-align: center;
}

.billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.toggle-label {
    font-size: 14px;
    color: #666;
    transition: color 0.2s;
}

.toggle-label.active {
    color: white;
    font-weight: 600;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #3d3d3d;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.savings-badge {
    background: #4CAF50;
    color: white;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s, transform 0.3s;
}

.savings-badge.show {
    opacity: 1;
    transform: translateX(0);
}

.pricing-display {
    margin-bottom: 24px;
}

.pricing-display .price {
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin: 0;
}

.pricing-display .price span {
    font-size: 18px;
    font-weight: 400;
    color: #888;
}

.price-monthly-equiv {
    color: #4CAF50;
    font-size: 14px;
    margin-top: 4px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 280px;
    text-align: left;
}

.features-list li {
    font-size: 14px;
    color: #ccc;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.features-list li i {
    color: #4CAF50;
    width: 16px;
}

/* Pricing cards (legacy, kept for compatibility) */
.pricing-cards {
    display: flex;
    gap: 16px;
    padding: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.pricing-card {
    background: #2d2d2d;
    border: 2px solid #3d3d3d;
    border-radius: 12px;
    padding: 20px;
    flex: 1;
    min-width: 200px;
    max-width: 220px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.pricing-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.pricing-card.selected {
    border-color: #667eea;
    background: #363654;
}

.pricing-card.recommended {
    border-color: #4CAF50;
}

.pricing-card .badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background: #4CAF50;
    color: white;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.pricing-card h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: white;
}

.pricing-card .price {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin: 8px 0;
}

.pricing-card .price span {
    font-size: 14px;
    font-weight: 400;
    color: #888;
}

.pricing-card .savings {
    color: #4CAF50;
    font-size: 12px;
    margin-bottom: 12px;
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pricing-card li {
    font-size: 12px;
    color: #aaa;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-card li i {
    color: #4CAF50;
}

/* Checkout container */
.checkout-container {
    padding: 0 24px 24px;
    min-height: 300px;
}

#checkout-element {
    min-height: 250px;
}

.checkout-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #888;
}

.checkout-loading i {
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Checkout button */
.btn-checkout {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-checkout:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

/* Pro badge in agent panel */
.pro-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 6px;
    text-transform: uppercase;
}

/* Header subscribe button */
.header-btn.btn-subscribe {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #764ba2;
    color: white;
}

.header-btn.btn-subscribe:hover {
    background: linear-gradient(135deg, #7a8eed 0%, #8a5bb4 100%);
    transform: translateY(-1px);
}

.header-btn.btn-subscribe .pro-label {
    font-weight: 600;
}

.header-btn.btn-subscribe.subscribed {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-color: #4CAF50;
}

.header-btn.btn-subscribe.subscribed .fa-star:before {
    content: "\f005"; /* filled star */
}

/* Success state */
.checkout-success {
    text-align: center;
    padding: 40px 20px;
}

.checkout-success i {
    font-size: 48px;
    color: #4CAF50;
    margin-bottom: 16px;
}

.checkout-success h3 {
    color: white;
    margin: 0 0 8px 0;
}

.checkout-success p {
    color: #888;
    margin: 0;
}

/* Subscription prompt in chat */
.subscription-prompt {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

.subscription-prompt p {
    margin: 0 0 12px 0;
    color: white;
    font-size: 14px;
}

.subscription-prompt .btn-upgrade {
    background: white;
    color: #667eea;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.subscription-prompt .btn-upgrade:hover {
    background: #f0f0f0;
}

/* Header dropdown */
.header-dropdown {
    position: relative;
    display: inline-block;
}

.header-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1e1e1e;
    border: 1px solid #3d3d3d;
    border-radius: 8px;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 1000;
    overflow: hidden;
}

.header-dropdown:hover .header-dropdown-menu,
.header-dropdown-menu:hover {
    display: block;
}

.header-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #ccc;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s;
}

.header-dropdown-menu .dropdown-item:hover {
    background: #2d2d2d;
    color: white;
}

.header-dropdown-menu .dropdown-item i {
    width: 16px;
    text-align: center;
}

.pro-badge-small {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: 600;
    margin-left: auto;
    text-transform: uppercase;
}

/* Export Modal */
.export-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 100000;
    align-items: center;
    justify-content: center;
}

.export-modal.show {
    display: flex;
}

.export-modal-content {
    background: #1e1e1e;
    border-radius: 16px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    position: relative;
}

.export-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
}

.export-modal-close:hover {
    color: white;
}

.export-modal-header {
    padding: 24px 24px 16px;
    text-align: center;
}

.export-modal-header h2 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: white;
}

.export-modal-header h2 i {
    margin-right: 8px;
    color: #667eea;
}

.export-modal-header p {
    margin: 0;
    color: #888;
    font-size: 13px;
}

.export-progress-section {
    padding: 0 24px 24px;
}

.export-progress-bar-container {
    background: #2d2d2d;
    border-radius: 8px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

.export-progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 8px;
}

.export-progress-text {
    text-align: center;
    font-size: 14px;
    color: #ccc;
    margin-bottom: 8px;
}

.export-current-url {
    text-align: center;
    font-size: 12px;
    color: #888;
    word-break: break-all;
    min-height: 18px;
}

.export-actions {
    padding: 0 24px 24px;
    text-align: center;
}

.export-actions .btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.export-actions .btn-secondary {
    background: #3d3d3d;
    border: none;
    color: #ccc;
}

.export-actions .btn-secondary:hover {
    background: #4d4d4d;
    color: white;
}

.export-actions .btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .subscription-modal-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }

    .pricing-cards {
        flex-direction: column;
        padding: 16px;
    }

    .pricing-card {
        max-width: none;
    }

    .header-dropdown-menu {
        position: fixed;
        top: 60px;
        left: 10px;
        right: 10px;
        min-width: auto;
    }

    .export-modal-content {
        margin: 16px;
    }
}
