/* Three Years of Club Health Metrics - Chart.js MicroSim stylesheet
   Layout: chart panel left, notes panel right. Zero margin for iframe embedding. */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
}

main {
    display: block;
    width: 100%;
    height: 100%;
}

.container {
    display: flex;
    width: 100%;
    height: 100vh;
    /* Capped at CANVAS_HEIGHT so the layout never renders taller than the
       iframe it is embedded in. Keep in sync with CANVAS_HEIGHT. */
    max-height: 540px;
}

.chart-panel {
    width: 68%;
    height: 100%;
    background-color: aliceblue;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
}

.chart-title {
    font-size: 17px;
    color: #222;
    margin-bottom: 8px;
    flex: 0 0 auto;
}

/* Chart.js needs a parent with a definite size to size its canvas against. */
.chart-holder {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
}

.chart-note {
    flex: 0 0 auto;
    font-size: 12px;
    color: #555;
    font-style: italic;
    padding-top: 8px;
}

.controls {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    padding-top: 10px;
    font-size: 13px;
    color: #333;
}

.controls label {
    display: flex;
    align-items: center;
    gap: 5px;
}

.controls select {
    font-size: 13px;
    padding: 3px 5px;
}

.controls button {
    font-size: 13px;
    padding: 5px 12px;
    border: none;
    border-radius: 5px;
    background-color: #4A90D9;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.controls button:hover {
    background-color: #2E6BA8;
}

.info-panel {
    width: 32%;
    height: 100%;
    background-color: #f8f9fa;
    border-left: 1px solid #dee2e6;
    padding: 15px;
    overflow-y: auto;
}

.info-panel h3 {
    font-size: 17px;
    color: #333;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #4A90D9;
}

.annotation {
    background-color: #FFF8E8;
    border-left: 4px solid #F5A623;
    padding: 9px 11px;
    font-size: 13px;
    line-height: 1.5;
    color: #444;
    margin-bottom: 12px;
}

.insight {
    font-size: 13px;
    line-height: 1.55;
    color: #444;
}

.insight strong {
    color: #2E6BA8;
}

.ranked {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.6;
    color: #444;
}

.ranked ol {
    margin-left: 18px;
}

@media (max-width: 620px) {
    .chart-title { font-size: 15px; }
    .info-panel { width: 38%; }
    .chart-panel { width: 62%; }
}
