/**
 * WP CryptoPulse - Public-Facing Styles
 *
 * All styles for the content blocks displayed on the front-end.
 */

/* --- General Wrapper & Font --- */
.wpc-sentiment-meter,
.wpc-price-ticker,
.wpc-chart-container,
.wpc-pros-cons,
.wpc-faq {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 2em 0;
}

/* --- Sentiment Meter --- */
.wpc-sentiment-meter {
    border-left: 5px solid;
    background: #f8fafc;
    padding: 20px;
}
.wpc-sentiment-meter h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
}
.wpc-sentiment-meter .wpc-sentiment-content {
    display: flex;
    align-items: center;
    gap: 15px;
}
.wpc-sentiment-meter .wpc-sentiment-score {
    font-size: 24px;
    font-weight: bold;
}
.wpc-sentiment-meter .wpc-sentiment-details strong,
.wpc-sentiment-meter .wpc-sentiment-details em {
    display: block;
    line-height: 1.4;
}
.wpc-sentiment-meter.wpc-sentiment-neutral { border-left-color: #64748b; }
.wpc-sentiment-meter.wpc-sentiment-neutral .wpc-sentiment-score,
.wpc-sentiment-meter.wpc-sentiment-neutral .wpc-sentiment-details strong { color: #64748b; }
.wpc-sentiment-meter.wpc-sentiment-bullish { border-left-color: #22c55e; }
.wpc-sentiment-meter.wpc-sentiment-bullish .wpc-sentiment-score,
.wpc-sentiment-meter.wpc-sentiment-bullish .wpc-sentiment-details strong { color: #22c55e; }
.wpc-sentiment-meter.wpc-sentiment-bearish { border-left-color: #ef4444; }
.wpc-sentiment-meter.wpc-sentiment-bearish .wpc-sentiment-score,
.wpc-sentiment-meter.wpc-sentiment-bearish .wpc-sentiment-details strong { color: #ef4444; }

/* --- Price Ticker --- */
.wpc-price-ticker {
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    text-align: center;
    gap: 15px;
}
.wpc-price-ticker .wpc-ticker-label {
    font-size: 14px;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 0.25em;
}
.wpc-price-ticker .wpc-ticker-value {
    font-size: 28px;
    font-weight: bold;
}
.wpc-price-ticker .wpc-ticker-positive { color: #22c55e; }
.wpc-price-ticker .wpc-ticker-negative { color: #ef4444; }

/* --- Price Chart --- */
.wpc-chart-container .wpc-chart-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 10px;
    gap: 10px;
}
.wpc-chart-container h3 {
    margin: 0;
    font-size: 1.17em;
}
.wpc-chart-timeframes a {
    margin: 0 8px;
    text-decoration: none;
    color: #555;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
}
.wpc-chart-timeframes a.active {
    font-weight: bold;
    color: #0073aa;
    border-bottom-color: #0073aa;
}
#wpc-tv-chart {
    position: relative;
    min-height: 400px;
    width: 100%;
}
.wpc-chart-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Pros & Cons --- */
.wpc-pros-cons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 768px) {
    .wpc-pros-cons {
        grid-template-columns: 1fr 1fr;
    }
}
.wpc-pros-cons h3 {
    margin-top: 0;
}
.wpc-pros-cons ul {
    margin: 0;
    padding-left: 20px;
}
.wpc-pros {
    border: 1px solid #dcfce7;
    background-color: #f0fdf4;
    border-radius: 8px;
    padding: 20px;
}
.wpc-pros h3 {
    color: #166534;
}
.wpc-cons {
    border: 1px solid #fee2e2;
    background-color: #fef2f2;
    border-radius: 8px;
    padding: 20px;
}
.wpc-cons h3 {
    color: #991b1b;
}

/* --- Add this to your existing wpc-public.css file --- */

/* Style for the error message when chart data fails to load */
.wpc-chart-error {
    height: 400px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #777;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 20px;
    box-sizing: border-box;
}