/*
CHANGE LOG
File: /var/www/memory_system/static/plans.css
Document Type: CSS Stylesheet
Purpose: Styling for freemium tier templates (free, premium, upgrade flows)
Main App: memory_app.py
Routes: /free/*, /premium/*, /upgrade
Context: Unique class names to prevent bleed-over from other CSS files
Templates: free/dashboard.html, premium/dashboard.html, free/upgrade.html, partials/usage_meter.html
Dependencies: None
Version History:
2025-08-17 v1.0 - Initial creation for freemium model
*/

/* =================================
   FREEMIUM SHARED STYLES
   ================================= */

.freemium-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.freemium-header {
    text-align: center;
    margin-bottom: 40px;
}

.freemium-title {
    font-size: 2.5em;
    color: #2c3e50;
    margin: 20px 0 10px 0;
    font-weight: 600;
}

.freemium-subtitle {
    font-size: 1.2em;
    color: #7f8c8d;
    margin-bottom: 30px;
}

/* Tier Badges */
.free-tier-badge {
    display: inline-block;
    background: #17a2b8;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.premium-tier-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #212529;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    position: relative;
}

/* Feature Cards Grid */
.freemium-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.freemium-feature-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.freemium-feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.freemium-feature-available {
    border-left: 4px solid #28a745;
}

.freemium-feature-limited {
    border-left: 4px solid #ffc107;
}

.freemium-feature-premium {
    border-left: 4px solid #6c757d;
    opacity: 0.7;
}

.freemium-feature-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.freemium-feature-description {
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* Buttons */
.freemium-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 16px;
    text-align: center;
}

.freemium-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    text-decoration: none;
}

.freemium-btn-primary {
    background: #007bff;
    color: white;
}

.freemium-btn-success {
    background: #28a745;
    color: white;
}

.freemium-btn-warning {
    background: #ffc107;
    color: #212529;
}

.freemium-btn-upgrade {
    background: #ffc107;
    color: #212529;
    font-size: 18px;
    padding: 15px 30px;
    font-weight: 700;
}

.freemium-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 30px 0;
}

/* Upgrade Sections */
.freemium-upgrade-section {
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    margin: 30px 0;
    color: white;
}

.freemium-upgrade-urgent {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.freemium-upgrade-warning {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.freemium-upgrade-title {
    font-size: 1.8em;
    margin-bottom: 15px;
    font-weight: 600;
}

.freemium-upgrade-description {
    font-size: 1.1em;
    margin-bottom: 25px;
    opacity: 0.95;
}

/* =================================
   FREE TIER SPECIFIC STYLES
   ================================= */

.free-usage-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.free-usage-title {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.free-usage-meter {
    margin: 20px 0;
}

.free-usage-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.free-usage-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #ffc107, #dc3545);
    transition: width 0.5s ease;
}

.free-usage-text {
    text-align: center;
    font-weight: 600;
    color: #495057;
}

.free-usage-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    color: #856404;
}

/* =================================
   PREMIUM TIER SPECIFIC STYLES
   ================================= */

.premium-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.premium-stat-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.premium-stat-number {
    font-size: 2.5em;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 10px;
}

.premium-stat-label {
    color: #6c757d;
    font-weight: 600;
}

.premium-memory-clip-section {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
}

.premium-memory-clip-title {
    font-size: 1.8em;
    margin-bottom: 15px;
    font-weight: 600;
}

.premium-memory-clip-description {
    font-size: 1.1em;
    margin-bottom: 25px;
    opacity: 0.95;
}

.premium-btn-download {
    background: white;
    color: #11998e;
    font-size: 18px;
    padding: 15px 30px;
    font-weight: 700;
}

.premium-memory-clip-note {
    margin-top: 15px;
    font-size: 14px;
    opacity: 0.9;
}

.premium-features-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.premium-features-title {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.premium-feature-card {
    background: #f8f9fa;
    border-left: 4px solid #28a745;
}

.premium-feature-title {
    color: #28a745;
}

/* =================================
   UPGRADE PAGE SPECIFIC STYLES
   ================================= */

.upgrade-comparison-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.upgrade-table-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background: #f8f9fa;
}

.upgrade-column {
    padding: 30px 20px;
    text-align: center;
    position: relative;
}

.upgrade-feature-column {
    background: #f8f9fa;
}

.upgrade-free-column {
    border-right: 1px solid #e9ecef;
}

.upgrade-premium-column {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #212529;
    font-weight: 700;
}

.upgrade-premium-column::before {
    content: "RECOMMENDED";
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.upgrade-column-title {
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.upgrade-column-subtitle {
    margin: 0;
    opacity: 0.8;
    font-size: 0.9em;
}

.upgrade-feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    border-bottom: 1px solid #e9ecef;
}

.upgrade-cell {
    padding: 20px;
    text-align: center;
    border-right: 1px solid #e9ecef;
}

.upgrade-cell:last-child {
    border-right: none;
}

.upgrade-feature-name {
    font-weight: 600;
    text-align: left;
    background: #f8f9fa;
}

.upgrade-check {
    color: #28a745;
    font-size: 18px;
    font-weight: 700;
}

.upgrade-cross {
    color: #dc3545;
    font-size: 18px;
    font-weight: 700;
}

.upgrade-premium-value {
    font-weight: 600;
    color: #28a745;
}

.upgrade-cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 50px;
    text-align: center;
    margin-bottom: 30px;
}

.upgrade-cta-title {
    font-size: 2em;
    margin-bottom: 15px;
    font-weight: 600;
}

.upgrade-cta-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.95;
}

.upgrade-btn-cta {
    background: #ffc107;
    color: #212529;
    font-size: 20px;
    padding: 18px 36px;
    font-weight: 700;
}

.upgrade-cta-note {
    margin-top: 20px;
    font-size: 14px;
    opacity: 0.9;
}

.upgrade-testimonial {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.upgrade-testimonial-text {
    font-style: italic;
    font-size: 1.1em;
    color: #555;
    margin-bottom: 15px;
}

.upgrade-testimonial-author {
    color: #333;
    font-weight: 600;
}

/* =================================
   USAGE METER COMPONENT STYLES
   ================================= */

.usage-meter-component {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.usage-meter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.usage-meter-label {
    font-weight: 600;
    color: #495057;
}

.usage-meter-count {
    font-weight: 700;
    color: #007bff;
}

.usage-meter-bar {
    width: 100%;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.usage-meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #ffc107 70%, #dc3545 100%);
    transition: width 0.5s ease;
}

.usage-meter-text {
    text-align: center;
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 10px;
}

.usage-meter-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 10px;
    font-size: 14px;
    color: #856404;
    text-align: center;
}

.usage-meter-urgent {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 10px;
    font-size: 14px;
    color: #721c24;
    text-align: center;
}

.usage-meter-upgrade-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.usage-meter-upgrade-link:hover {
    text-decoration: underline;
}

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

@media (max-width: 1024px) {
    .freemium-features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 15px;
    }
    
    .premium-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .upgrade-table-header,
    .upgrade-feature-row {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .freemium-container {
        padding: 15px;
    }
    
    .freemium-title {
        font-size: 2em;
    }
    
    .freemium-subtitle {
        font-size: 1.1em;
    }
    
    .freemium-features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .premium-stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .freemium-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .freemium-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .upgrade-table-header,
    .upgrade-feature-row {
        grid-template-columns: 1fr;
    }
    
    .upgrade-cell {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .upgrade-feature-name {
        background: #667eea;
        color: white;
        text-align: center;
    }
    
    .upgrade-cta-title {
        font-size: 1.6em;
    }
    
    .upgrade-cta-description {
        font-size: 1.1em;
    }
    
    .premium-memory-clip-section {
        padding: 30px 20px;
    }
    
    .premium-memory-clip-title {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .freemium-container {
        padding: 10px;
    }
    
    .freemium-title {
        font-size: 1.8em;
    }
    
    .freemium-feature-card {
        padding: 20px 15px;
    }
    
    .premium-stat-card {
        padding: 20px 15px;
    }
    
    .premium-stat-number {
        font-size: 2em;
    }
    
    .free-usage-section {
        padding: 20px 15px;
    }
    
    .upgrade-column {
        padding: 20px 15px;
    }
    
    .upgrade-cell {
        padding: 15px 10px;
    }
    
    .upgrade-cta-section {
        padding: 30px 20px;
    }
    
    .upgrade-btn-cta {
        font-size: 18px;
        padding: 15px 30px;
    }
    
    .usage-meter-component {
        padding: 15px;
    }
    
    .usage-meter-header {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}

/* =================================
   UTILITY CLASSES
   ================================= */

.freemium-text-center {
    text-align: center;
}

.freemium-mb-small {
    margin-bottom: 15px;
}

.freemium-mb-medium {
    margin-bottom: 30px;
}

.freemium-mb-large {
    margin-bottom: 45px;
}

.freemium-mt-small {
    margin-top: 15px;
}

.freemium-mt-medium {
    margin-top: 30px;
}

.freemium-mt-large {
    margin-top: 45px;
}

.freemium-hidden {
    display: none;
}

.freemium-text-muted {
    color: #6c757d;
}

.freemium-text-success {
    color: #28a745;
}

.freemium-text-warning {
    color: #ffc107;
}

.freemium-text-danger {
    color: #dc3545;
}
