/* Analytics Dashboard Specific Styles */

/* Font Variables */
:root {
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Typography for Analytics */
.analytics h1, .analytics h2, .analytics h3 {
    font-family: var(--font-heading);
}

.analytics p, .analytics span, .analytics div {
    font-family: var(--font-body);
}

/* Analytics Cards */
.analytics-card h3, .analytics-card h4 {
    font-family: var(--font-heading);
}

.analytics-card p, .analytics-card span {
    font-family: var(--font-body);
}

/* Analytics Dashboard Container */
.analytics-dashboard {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    max-width: 600px;
    width: 100%;
}

.dashboard-header {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-controls select {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 0.9rem;
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1.5rem;
    background: #f8fafc;
}

.widget {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.widget-header h5 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
}

.widget-header i {
    color: #3b82f6;
    font-size: 1.2rem;
}

.widget-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* KPI Widget Styles */
.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.kpi-change {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.kpi-change.positive {
    color: #10b981;
}

.kpi-change.negative {
    color: #ef4444;
}

.mini-chart {
    display: flex;
    align-items: end;
    gap: 3px;
    height: 40px;
}

.chart-bar {
    background: linear-gradient(to top, #3b82f6, #60a5fa);
    width: 8px;
    border-radius: 2px;
    opacity: 0;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: all 0.6s ease;
}

/* Conversion Widget Styles */
.conversion-rate {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.rate-circle {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rate-fill {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(#3b82f6 0deg, #3b82f6 var(--percentage, 0%), #e2e8f0 var(--percentage, 0%), #e2e8f0 360deg);
    transition: all 1s ease;
}

.rate-text {
    position: relative;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    z-index: 1;
}

.conversion-trend {
    text-align: center;
    font-size: 0.8rem;
    color: #10b981;
    font-weight: 600;
}

/* Prediction Widget Styles */
.prediction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.prediction-label {
    font-size: 0.9rem;
    color: #64748b;
}

.prediction-value {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.prediction-value.low {
    background: #dcfce7;
    color: #166534;
}

.prediction-value.high {
    background: #dbeafe;
    color: #1d4ed8;
}

.prediction-value:not(.low):not(.high) {
    background: #f1f5f9;
    color: #475569;
}

/* Analytics Types Section */
.analytics-types {
    padding: 6rem 0;
    background: white;
}

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

.analytics-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.analytics-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.analytics-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.analytics-icon i {
    font-size: 2rem;
    color: white;
}

.analytics-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.analytics-card p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

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

.analytics-features li {
    padding: 0.5rem 0;
    color: #64748b;
    font-size: 0.9rem;
    position: relative;
    padding-left: 1.5rem;
}

.analytics-features li::before {
    content: '•';
    color: #3b82f6;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Pricing Section Button Alignment Fix */
.pricing-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pricing-header {
    flex-shrink: 0;
}

.pricing-features {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pricing-features ul {
    flex: 1;
}

.btn-full {
    margin-top: auto;
    align-self: stretch;
}

/* Responsive Design */
@media (max-width: 768px) {
    .analytics-dashboard {
        max-width: 100%;
    }
    
    .dashboard-widgets {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .widget {
        padding: 1rem;
        min-height: 150px;
    }
    
    .kpi-value {
        font-size: 1.5rem;
    }
    
    .rate-circle {
        width: 60px;
        height: 60px;
    }
    
    .rate-fill {
        width: 60px;
        height: 60px;
    }
    
    .rate-text {
        font-size: 1rem;
    }
}
