/**
 * Vigthoria Subscription UI Styles
 * Beautiful, modern styling for subscription-related components
 *
 * @version 2.0.0
 * @date October 11, 2025
 */

/* ==================== TIER BADGE ==================== */

.subscription-tier-badge {
    /* REMOVED: position: fixed overlay - was covering content */
    display: none !important; /* Hide this flying badge - user doesn't want overlay */
    /* Original code kept for reference:
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: badgeSlideIn 0.5s ease;
    */
}

.subscription-tier-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.subscription-tier-badge.developer {
    border: 2px solid #3b82f6;
    color: #3b82f6;
}

.subscription-tier-badge.professional {
    border: 2px solid #8b5cf6;
    color: #8b5cf6;
    background: linear-gradient(135deg, #ffffff 0%, #f3e8ff 100%);
}

.subscription-tier-badge.enterprise {
    border: 2px solid #f59e0b;
    color: #f59e0b;
    background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%);
}

.badge-icon {
    font-size: 18px;
}

.badge-text {
    font-weight: 600;
}

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

/* ==================== UPGRADE BANNERS ==================== */

.upgrade-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    animation: bannerSlideDown 0.5s ease;
}

.upgrade-banner.developer-tier {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
}

.upgrade-banner.professional-tier {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    opacity: 0.9;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.banner-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.banner-text strong {
    font-size: 16px;
    font-weight: 600;
}

.banner-text span {
    font-size: 14px;
    opacity: 0.95;
}

.banner-cta {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.banner-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.login-prompt-banner {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

@keyframes bannerSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== UPGRADE MODALS ==================== */

.subscription-upgrade-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.3s ease;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 48px;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: modalSlideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    color: #6b7280;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #374151;
    transform: rotate(90deg);
}

.modal-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 16px;
    animation: iconBounce 0.6s ease;
}

.modal-content h2 {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.developer-upgrade h2 {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.professional-upgrade h2 {
    background: linear-gradient(135deg, #8b5cf6 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-subtitle {
    text-align: center;
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 32px;
}

/* Upgrade Benefits Section */

.upgrade-benefits {
    margin: 32px 0;
}

.upgrade-benefits h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1f2937;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.benefit-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    transition: all 0.2s;
}

.benefit-item:hover {
    background: #f3f4f6;
    transform: translateX(4px);
}

.benefit-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.benefit-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.benefit-text strong {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.benefit-text span {
    font-size: 12px;
    color: #6b7280;
}

.additional-benefits {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 100%);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.additional-benefits p {
    font-weight: 600;
    margin-bottom: 12px;
    color: #1f2937;
}

.additional-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.additional-benefits li {
    padding: 6px 0;
    font-size: 14px;
    color: #374151;
}

/* Price Comparison */

.upgrade-pricing {
    margin: 32px 0;
}

.price-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 16px;
}

.current-price,
.new-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.current-price .label,
.new-price .label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    letter-spacing: 0.5px;
}

.current-price .amount,
.new-price .amount {
    font-size: 36px;
    font-weight: 700;
    color: #1f2937;
}

.new-price .amount {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.amount .period {
    font-size: 18px;
    font-weight: 500;
    color: #9ca3af;
}

.new-price .savings {
    font-size: 14px;
    font-weight: 600;
    color: #10b981;
    background: #d1fae5;
    padding: 4px 12px;
    border-radius: 12px;
}

.arrow {
    font-size: 32px;
    color: #667eea;
    font-weight: bold;
}

/* Modal Actions */

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}

.btn-upgrade {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.developer-upgrade .btn-upgrade {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
}

.professional-upgrade .btn-upgrade {
    background: linear-gradient(135deg, #8b5cf6 0%, #f59e0b 100%);
}

.btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    flex: 1;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #f0f9ff;
}

.btn-cancel {
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: #e5e7eb;
}

.modal-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.modal-footer p {
    font-size: 14px;
    color: #6b7280;
}

/* Limit Reached Modal */

.limit-reached .modal-content {
    max-width: 500px;
}

.limit-info {
    background: #fef3c7;
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    text-align: center;
}

.usage-chart {
    margin-bottom: 12px;
}

.usage-bar {
    width: 100%;
    height: 24px;
    background: #fde68a;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.usage-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b 0%, #dc2626 100%);
    border-radius: 12px;
    transition: width 0.3s ease;
}

.usage-text {
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    margin-top: 8px;
}

.limit-info p {
    font-size: 14px;
    color: #78350f;
    margin: 0;
}

/* ==================== LOCKED TEMPLATES ==================== */

.template-item.locked {
    opacity: 0.6;
    position: relative;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.template-item.locked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    backdrop-filter: blur(2px);
    border-radius: inherit;
    pointer-events: none;
}

.lock-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.lock-badge::before {
    content: '🔒';
    font-size: 14px;
}

/* ==================== GENERATION COUNTER ==================== */

.generation-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f3f4f6;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    transition: all 0.3s;
}

.generation-counter.unlimited {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.generation-counter.warning {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
}

.generation-counter.depleted {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

/* ==================== ANIMATIONS ==================== */

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 768px) {
    .subscription-tier-badge {
        top: 10px;
        right: 10px;
        padding: 8px 16px;
        font-size: 12px;
    }

    .upgrade-banner {
        padding: 12px 16px;
        margin-bottom: 16px;
    }

    .banner-content {
        flex-direction: column;
        text-align: center;
    }

    .banner-icon {
        font-size: 24px;
    }

    .banner-cta {
        width: 100%;
    }

    .modal-content {
        padding: 32px 24px;
        margin: 10px;
    }

    .modal-icon {
        font-size: 48px;
    }

    .modal-content h2 {
        font-size: 24px;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .price-comparison {
        flex-direction: column;
        gap: 12px;
    }

    .arrow {
        transform: rotate(90deg);
    }

    .modal-actions {
        flex-direction: column;
    }
}

/* ==================== DARK MODE SUPPORT ==================== */

@media (prefers-color-scheme: dark) {
    .subscription-tier-badge {
        background: #1f2937;
        color: white;
    }

    .subscription-tier-badge.developer {
        border-color: #60a5fa;
    }

    .subscription-tier-badge.professional {
        border-color: #a78bfa;
        background: linear-gradient(135deg, #1f2937 0%, #312e81 100%);
    }

    .subscription-tier-badge.enterprise {
        border-color: #fbbf24;
        background: linear-gradient(135deg, #1f2937 0%, #78350f 100%);
    }

    .modal-content {
        background: #1f2937;
        color: white;
    }

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

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

    .modal-content h2 {
        color: white;
    }

    .modal-subtitle {
        color: #d1d5db;
    }

    .upgrade-benefits h3 {
        color: white;
    }

    .benefit-item {
        background: #374151;
    }

    .benefit-item:hover {
        background: #4b5563;
    }

    .benefit-text strong {
        color: white;
    }

    .benefit-text span {
        color: #d1d5db;
    }

    .additional-benefits {
        background: linear-gradient(135deg, #1e3a8a 0%, #312e81 100%);
    }

    .additional-benefits p,
    .additional-benefits li {
        color: #e0e7ff;
    }

    .price-comparison {
        background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    }

    .current-price .amount,
    .new-price .amount {
        color: white;
    }

    .btn-cancel {
        background: #374151;
        color: #d1d5db;
    }

    .btn-cancel:hover {
        background: #4b5563;
    }

    .modal-footer {
        border-top-color: #374151;
    }

    .modal-footer p {
        color: #d1d5db;
    }
}

/* ==================== PRINT STYLES ==================== */

@media print {
    .subscription-tier-badge,
    .upgrade-banner,
    .subscription-upgrade-modal {
        display: none !important;
    }
}
