/* Titration Curve Comparison - Chart.js MicroSim stylesheet
   Layout: two charts side by side (or one overlay chart) on the standard
   aliceblue drawing background, a readout row, then a white control row.
   Fixed total height of 540px; no inner scrolling regions. */

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

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

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

.container {
    width: 100%;
    height: 540px;
    border: 1px solid silver;
    display: flex;
    flex-direction: column;
}

.draw-panel {
    background-color: aliceblue;
    height: 490px;
    padding: 8px 10px 8px 10px;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid silver;
}

.sim-title {
    font-size: 24px;
    font-weight: normal;
    color: black;
    text-align: center;
    line-height: 30px;
    height: 30px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
}

.chart-row {
    display: flex;
    gap: 10px;
    height: 338px;
}

.chart-card {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    background: white;
    border: 1px solid silver;
    border-radius: 8px;
    padding: 4px 6px 2px 2px;
}

.chart-card.hidden {
    display: none;
}

.readout-row {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    height: 94px;
}

.readout {
    flex: 1 1 0;
    min-width: 0;
    background: white;
    border: 1px solid silver;
    border-left-width: 6px;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 14.5px;
    line-height: 1.35;
    color: #222;
    overflow: hidden;
}

.readout.strong { border-left-color: #6a1b9a; }
.readout.weak { border-left-color: #2e7d32; }

.readout .who {
    font-weight: bold;
    font-size: 15px;
}

.readout .ph {
    font-weight: bold;
    font-size: 19px;
    margin-right: 6px;
}

.readout.strong .ph { color: #6a1b9a; }
.readout.weak .ph { color: #2e7d32; }

.control-panel {
    background: white;
    height: 48px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px;
    font-size: 16px;
}

.control-panel label {
    white-space: nowrap;
    min-width: 168px;
}

.control-panel input[type="range"] {
    flex: 1;
    min-width: 60px;
}

.control-panel button {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    padding: 4px 10px;
    white-space: nowrap;
}

/* Narrow screens: smaller type so both charts still fit side by side */
@media (max-width: 620px) {
    .sim-title { font-size: 15px; }
    .readout { font-size: 11.5px; padding: 5px 6px; line-height: 1.3; }
    .readout .who { font-size: 12px; }
    .readout .ph { font-size: 15px; }
    .control-panel { font-size: 13px; gap: 6px; padding: 0 6px; }
    .control-panel label { min-width: 0; }
    .control-panel button { font-size: 12px; padding: 4px 5px; }
    .chart-row, .readout-row { gap: 6px; }
}
