/* ============================================
   SENTIMENT SECTION - Additional Styles
   Append this to picture.css
   Uses existing .chart-card styles from Market Structure
   ============================================ */

/* Section label variants */
.section-label-burgundy {
    color: var(--burgundy);
}

/* Teal accent bar for Sentiment cards */
.card-accent-teal {
    background: var(--teal);
}

/* Teal variant for timeframe selector */
.card-timeframe-teal .tf-btn-sm.active {
    color: var(--teal);
}

/* Force 3-column grid for sentiment */
.chart-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
    .chart-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   MARKET MOOD MATRIX
   ============================================ */

.mood-matrix {
    display: flex;
    gap: 12px;
    margin: var(--md) 0;
}

.mood-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: var(--sans);
    font-size: 0.65rem;
    color: var(--ink-tertiary);
    padding: 4px 0;
    text-align: right;
    min-width: 55px;
}

.mood-axis-label {
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-secondary);
    margin-bottom: 4px;
}

.mood-y-axis .mood-axis-label {
    margin-bottom: 8px;
}

.mood-grid-wrapper {
    flex: 1;
    max-width: 220px;
}

.mood-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 3px;
    position: relative;
    aspect-ratio: 1;
}

.mood-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--sans);
    font-size: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ink-tertiary);
    background: var(--paper-dark);
    padding: 8px 4px;
    text-align: center;
    border-radius: 2px;
    line-height: 1.3;
}

.mood-cell.active {
    background: var(--teal);
    color: white;
}

.mood-cell.cell-gold { background: rgba(139, 115, 85, 0.12); }
.mood-cell.cell-green { background: rgba(45, 106, 106, 0.12); }
.mood-cell.cell-green-strong { background: rgba(45, 106, 106, 0.2); }
.mood-cell.cell-red { background: rgba(114, 47, 55, 0.12); }
.mood-cell.cell-red-strong { background: rgba(114, 47, 55, 0.2); }

/* Trail SVG */
.mood-trail-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.mood-trail-line {
    fill: none;
    stroke: url(#moodTrailGradient);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Dots */
.mood-dot {
    position: absolute;
    border-radius: 50%;
    z-index: 3;
    transform: translate(-50%, -50%);
    /* Default position in center - JS will update */
    left: 50%;
    top: 50%;
}

.mood-dot-teal {
    width: 14px;
    height: 14px;
    background: var(--teal);
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    /* Ensure visibility */
    display: block;
    opacity: 1;
}

.mood-dot-burgundy {
    width: 12px;
    height: 12px;
    background: var(--burgundy);
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.mood-dot-start {
    width: 8px;
    height: 8px;
    background: var(--teal);
    opacity: 0.5;
    display: block;
}

.mood-x-axis {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--sans);
    font-size: 0.65rem;
    color: var(--ink-tertiary);
    margin-left: 67px;
    max-width: 220px;
    padding: 4px 4px 0;
}

.mood-x-axis .mood-axis-label {
    font-size: 0.55rem;
    margin: 0;
}

.mood-number {
    color: var(--teal);
    font-style: italic;
}

/* Mood Legend */
.mood-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: var(--md) 0;
    padding-top: var(--sm);
    border-top: 1px solid var(--rule);
}

.mood-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mood-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mood-legend-dot-teal {
    background: var(--teal);
}

.mood-legend-dot-burgundy {
    background: var(--burgundy);
}

.mood-legend-text {
    font-family: var(--sans);
    font-size: 0.65rem;
    color: var(--ink-tertiary);
}

/* ============================================
   FEAR & GREED INDEX
   ============================================ */

.fg-chart-area {
    position: relative;
}

.fg-grid-line {
    stroke: var(--rule);
    stroke-width: 1;
}

.fg-neutral-line {
    stroke: var(--gold);
    stroke-width: 1;
    stroke-dasharray: 4, 4;
}

.fg-zones {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: var(--sans);
    font-size: 0.55rem;
    padding: 8px 0;
    text-align: right;
}

.fg-zone-label.greed { color: var(--teal); }
.fg-zone-label.neutral { color: var(--gold); }
.fg-zone-label.fear { color: var(--burgundy); }

.fg-value-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.fg-value-left {
    display: flex;
    flex-direction: column;
}

.fg-value-right {
    text-align: right;
    display: flex;
    flex-direction: column;
}

.fg-word {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--burgundy);
}

.fg-word.greed { color: var(--teal); }
.fg-word.neutral { color: var(--gold); }

#fg-value.fear { color: var(--burgundy); }
#fg-value.greed { color: var(--teal); }
#fg-value.neutral { color: var(--gold); }

/* Fear & Greed Tooltip */
.fg-hover-point {
    fill: transparent;
    cursor: pointer;
    transition: fill 0.15s ease;
}

.fg-hover-point:hover {
    fill: rgba(45, 106, 106, 0.2);
}

.fg-tooltip {
    position: fixed;
    background: var(--ink);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 4px;
    font-family: var(--sans);
    font-size: 12px;
    line-height: 1.4;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) translateY(5px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 1000;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.fg-tooltip.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.fg-tooltip strong {
    font-size: 14px;
    font-weight: 600;
}

.fg-tooltip-date {
    color: rgba(255,255,255,0.7);
    font-size: 11px;
}

/* ============================================
   MACRO CORRELATION
   ============================================ */

.regime-box {
    padding: 10px 14px;
    margin-bottom: var(--md);
    background: rgba(114, 47, 55, 0.06);
    border-left: 3px solid var(--burgundy);
}

.regime-box.transitional {
    border-left-color: var(--gold);
    background: rgba(139, 115, 85, 0.06);
}

.regime-box.decorrelated {
    border-left-color: var(--forest);
    background: rgba(45, 80, 22, 0.06);
}

.regime-label {
    font-family: var(--sans);
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--burgundy);
    margin-bottom: 2px;
}

.regime-box.transitional .regime-label { color: var(--gold); }
.regime-box.decorrelated .regime-label { color: var(--forest); }

.regime-title {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 600;
    font-style: italic;
    color: var(--ink);
}

.correlation-rows {
    margin-bottom: var(--sm);
}

.correlation-row {
    display: grid;
    grid-template-columns: 60px 1fr;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.corr-asset-name {
    text-align: right;
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--ink);
}

.corr-bar-container {
    display: flex;
    align-items: center;
}

.corr-bar-track {
    width: 100px;
    height: 14px;
    background: var(--paper-dark);
    border-radius: 2px;
    position: relative;
}

.corr-bar-center {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--rule);
}

.corr-bar-fill {
    position: absolute;
    top: 3px;
    height: 8px;
    border-radius: 1px;
}

.corr-bar-fill.positive {
    left: 50%;
    background: var(--burgundy);
}

.corr-bar-fill.negative {
    right: 50%;
    background: var(--forest);
}

.corr-bar-fill.neutral {
    background: var(--gold);
}

.corr-value-label {
    margin-left: 8px;
    font-family: var(--serif);
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 40px;
}

.corr-value-label.positive { color: var(--burgundy); }
.corr-value-label.negative { color: var(--forest); }
.corr-value-label.neutral { color: var(--gold); }

.correlation-legend {
    display: flex;
    gap: var(--md);
    padding-top: var(--sm);
    border-top: 1px solid var(--rule);
    margin-bottom: var(--lg);
}

.corr-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--sans);
    font-size: 0.55rem;
    color: var(--ink-tertiary);
}

.corr-legend-swatch {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

.corr-legend-swatch.correlated { background: var(--burgundy); }
.corr-legend-swatch.transitional { background: var(--gold); }
.corr-legend-swatch.decorrelated { background: var(--forest); }
