/* ============================================
   Block: Chart — FSM Brand-Aligned
   Primary: FinStrat Green #3F9036
   Secondary: FinStrat Blue #355195
   Headings: Noticia Text (fallback Roboto Serif)
   Body: Source Sans 3 (fallback Arial)
   ============================================ */

.Block-Chart {
    max-width: 100%;
    margin: 2rem 0;
    padding: 2rem;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-sizing: border-box;
}

/* ============ Chart Title ============ */

.Block-Chart .Chart-Title {
    margin: 0 0 1.5rem 0;
    font-family: 'Noticia Text', 'Roboto Serif', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #15442A; /* Forest Green for headings */
    text-align: center;
    line-height: 1.3;
}

/* ============ Canvas wrappers ============ */

.Block-Chart .Chart-Canvas-Wrapper {
    position: relative;
    width: 100%;
}

/* Bar / Line / Area — wider rectangular charts */
.Block-Chart .Chart-Type-bar,
.Block-Chart .Chart-Type-line {
    height: 420px;
}

/* Pie / Doughnut — square */
.Block-Chart .Chart-Type-pie,
.Block-Chart .Chart-Type-doughnut {
    height: 480px;
    max-width: 600px;
    margin: 0 auto;
}

/* ============ Empty state ============ */

.Block-Chart .Chart-Empty {
    color: #666;
    text-align: center;
    padding: 2rem;
    font-style: italic;
    font-family: 'Source Sans 3', Arial, sans-serif;
}

/* ============ Responsive ============ */

@media (max-width: 768px) {
    .Block-Chart {
        padding: 1.25rem;
    }

    .Block-Chart .Chart-Title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .Block-Chart .Chart-Type-bar,
    .Block-Chart .Chart-Type-line {
        height: 320px;
    }

    .Block-Chart .Chart-Type-pie,
    .Block-Chart .Chart-Type-doughnut {
        height: 380px;
    }
}

/* ============ Accessibility ============ */
.Block-Chart canvas {
    max-width: 100%;
}

/* ============================================
   FSM Logo Watermark — bottom-left of chart
   ============================================ */

.Block-Chart {
    position: relative;
    padding-bottom: 4rem; /* Make room for the logo */
}

.Block-Chart::after {
    content: '';
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    width: 100px;
    height: 32px;
    background-image: url('/wp-content/uploads/2026/03/finStratLogo-fullColor.webp');
    background-repeat: no-repeat;
    background-position: left center;
    background-size: contain;
    opacity: 0.85;
    pointer-events: none; /* Don't block clicks */
}

/* Responsive: smaller logo on mobile */
@media (max-width: 768px) {
    .Block-Chart {
        padding-bottom: 3.5rem;
    }
    .Block-Chart::after {
        width: 80px;
        height: 28px;
        bottom: 1rem;
        left: 1rem;
    }
}