/**
 * CoinRemark Market Mood Widget Styles
 * Light mode styling (default)
 */

.coinremark-market-mood {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    font-family: inherit;
    color: #0f172a;
    max-width: 100%;
    box-sizing: border-box;
}

/* Header */
.mood-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.mood-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.025em;
    font-family: inherit;
}

.mood-cache-status {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
    font-family: inherit;
}

/* Market Health Section */
.mood-health-section {
    margin-bottom: 24px;
}

.mood-health-indicator {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.health-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.health-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    font-family: inherit;
}

.health-status {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: inherit;
}

.health-status.bullish {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.health-status.bearish {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.health-status.neutral {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.health-bar {
    height: 6px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.health-fill {
    height: 100%;
    transition: width 0.8s ease-in-out;
    border-radius: 3px;
}

.health-fill.bullish {
    background: linear-gradient(90deg, #10b981, #059669);
}

.health-fill.bearish {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.health-fill.neutral {
    background: linear-gradient(90deg, #9ca3af, #6b7280);
}

/* Statistics Grid */
.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease;
}

.stat-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
    background: #ffffff;
}

.stat-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: inherit;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
    font-family: inherit;
}

.stat-unit {
    font-size: 20px;
    color: #64748b;
    font-weight: 700;
    font-family: inherit;
}

.stat-trend {
    font-size: 11px;
    margin-top: 4px;
    font-weight: 500;
    font-family: inherit;
}

.stat-trend.positive {
    color: #059669;
}

.stat-trend.negative {
    color: #dc2626;
}

.stat-trend.neutral {
    color: #6b7280;
}

/* Key Indicators */
.indicators-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.indicators-title {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
    text-align: center;
    font-family: inherit;
}

.indicators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.indicator-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.indicator-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
    background: #ffffff;
}

.indicator-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    font-family: inherit;
}

.indicator-value {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    font-family: inherit;
}

.indicator-value.gaining {
    color: #059669;
}

.indicator-value.gaining-strong {
    color: #047857;
}

.indicator-value.declining {
    color: #dc2626;
}

.indicator-value.declining-strong {
    color: #b91c1c;
}

.indicator-value.neutral {
    color: #6b7280;
}

/* Loading and Error States */
.mood-loading,
.mood-error {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-family: inherit;
}

.mood-error {
    color: #dc2626;
}

.mood-loading::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .coinremark-market-mood {
        padding: 16px;
        margin: 16px 0;
    }
    
    .mood-title {
        font-size: 16px;
    }
    
    .statistics-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .indicators-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .stat-item,
    .indicator-item {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .mood-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .stat-item {
        padding: 12px 8px;
    }
    
    .indicator-item {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}

/* Error state */
.coinremark-mood-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    color: #991b1b;
    font-size: 14px;
    margin: 20px 0;
    font-family: inherit;
}

/* ===========================================
   DARK MODE STYLES
   =========================================== */

.darkmode--activated .coinremark-market-mood {
    background: linear-gradient(135deg, #152401 0%, #051403 100%);
    border: 1px solid #A3FF00;
    box-shadow: 0 8px 32px rgba(163, 255, 0, 0.1);
    color: #e9fbdf;
}

.darkmode--activated .mood-title {
    color: #A3FF00;
}

.darkmode--activated .mood-cache-status {
    color: #D4FF87;
}

.darkmode--activated .health-title {
    color: #e9fbdf;
}

.darkmode--activated .health-status.bullish {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.darkmode--activated .health-status.bearish {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

.darkmode--activated .health-status.neutral {
    background: rgba(107, 114, 128, 0.2);
    color: #9CA3AF;
}

.darkmode--activated .health-bar {
    background: rgba(163, 255, 0, 0.1);
}

.darkmode--activated .health-fill.bullish {
    background: linear-gradient(90deg, #4CAF50, #2E7D32);
}

.darkmode--activated .health-fill.bearish {
    background: linear-gradient(90deg, #F44336, #C62828);
}

.darkmode--activated .health-fill.neutral {
    background: linear-gradient(90deg, #9CA3AF, #6B7280);
}

.darkmode--activated .stat-item {
    background: rgba(163, 255, 0, 0.05);
    border: 1px solid rgba(163, 255, 0, 0.2);
}

.darkmode--activated .stat-item:hover {
    border-color: #A3FF00;
    box-shadow: 0 4px 12px rgba(163, 255, 0, 0.15);
    background: rgba(163, 255, 0, 0.08);
}

.darkmode--activated .stat-label {
    color: #D4FF87;
}

.darkmode--activated .stat-value {
    color: #A3FF00;
}

.darkmode--activated .stat-unit {
    color: #D4FF87;
}

.darkmode--activated .stat-trend.positive {
    color: #4CAF50;
}

.darkmode--activated .stat-trend.negative {
    color: #F44336;
}

.darkmode--activated .stat-trend.neutral {
    color: #9CA3AF;
}

.darkmode--activated .indicators-section {
    border-top: 1px solid rgba(163, 255, 0, 0.2);
}

.darkmode--activated .indicators-title {
    color: #A3FF00;
}

.darkmode--activated .indicator-item {
    background: rgba(163, 255, 0, 0.05);
    border: 1px solid rgba(163, 255, 0, 0.2);
}

.darkmode--activated .indicator-item:hover {
    border-color: #A3FF00;
    box-shadow: 0 2px 8px rgba(163, 255, 0, 0.15);
    background: rgba(163, 255, 0, 0.08);
}

.darkmode--activated .indicator-label {
    color: #D4FF87;
}

.darkmode--activated .indicator-value {
    color: #e9fbdf;
}

.darkmode--activated .indicator-value.gaining {
    color: #4CAF50;
}

.darkmode--activated .indicator-value.gaining-strong {
    color: #2E7D32;
}

.darkmode--activated .indicator-value.declining {
    color: #F44336;
}

.darkmode--activated .indicator-value.declining-strong {
    color: #C62828;
}

.darkmode--activated .indicator-value.neutral {
    color: #9CA3AF;
}

.darkmode--activated .mood-loading,
.darkmode--activated .mood-error {
    color: #D4FF87;
}

.darkmode--activated .mood-error {
    color: #F44336;
}

.darkmode--activated .mood-loading::before {
    border: 2px solid rgba(163, 255, 0, 0.2);
    border-top: 2px solid #A3FF00;
}

.darkmode--activated .coinremark-mood-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #F44336;
    color: #F44336;
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */
@media (max-width: 768px) {
    .coinremark-market-mood {
        padding: 16px;
    }

    .performers-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .mood-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .mood-title {
        font-size: 16px;
    }

    .performer-item {
        padding: 6px 8px;
    }

    .performer-symbol {
        font-size: 12px;
    }

    .performer-price {
        font-size: 11px;
    }

    .performer-change {
        font-size: 12px;
        min-width: 50px;
    }
}

@media (max-width: 480px) {
    .coinremark-market-mood {
        padding: 12px;
        margin: 16px 0;
    }

    .mood-title {
        font-size: 15px;
    }

    .performers-header {
        margin-bottom: 8px;
    }

    .performers-list {
        gap: 6px;
    }
}