/* Lock hint below action row */
.panel-lock-hint {
    margin: 5px auto 0 auto;
    padding: 8px 10px;
    max-width: 320px;
    background: #f1f4f6;
    color: #838383;
    border-radius: 6px;
    font-size: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(74,144,226,0.08);
    line-height: 1.6;
    display: none;
}
/* Unified style for export and unlock buttons */
.panel-export-btn,
 .panel-unlock-btn {
    margin-top: 0;
    margin-bottom: 0;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #4a90e2;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(74,144,226,0.08);
}
.panel-export-btn:hover,
.panel-unlock-btn:hover {
    background: #357abd;
}
.panel-export-btn:active,
.panel-unlock-btn:active {
    background: #2a5a8f;
}

.panel-export-btn:disabled,
.panel-unlock-btn:disabled {
    background: #c9d6e6;
    color: #eef3f9;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.85;
}
/* =========================================================
   Panel action row (export/unlock)
   ========================================================= */
.panel-action-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin-top: 4px;
    margin-bottom: 8px;
    padding-top: 0;
    gap: 10px;
    width: 100%;
    flex-shrink: 0;
}
/* =========================================================
   chart.css
   Chart and panel styles: SVG charts, typography and control styling; uses variables from theme.css.
   ========================================================= */

#tempChart,
#precipChart {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 12px;
    flex-shrink: 0;
}

/* Tab charts */
#climateComboChart,
#temperatureScatter,
#monthlyTemperature,
#precipitationScatter,
#monthlyPrecipitation {
    width: 100%;
    display: block;
    flex-shrink: 0;
}

#temperatureScatter {
    height: 392px;
    margin-bottom: 4px;
}

#monthlyTemperature {
    height: 352px;
    margin-top: 0;
    margin-bottom: 8px;
}

#precipitationScatter {
    height: 392px;
    margin-bottom: 4px;
}

#monthlyPrecipitation {
    height: 352px;
    margin-top: 0;
    margin-bottom: 8px;
}

/* Hemisphere month labels */
.hemisphere-month-label {
    margin: 8px;
    color: #888;
    font-size: 12px;
}

/* Panel hint styling */
.panel-hint {
    margin-bottom: 4px;
}

/* Climate coordinate display */
#climate-coord {
    font-size: 12px;
    line-height: 1;
    color: #5c5c5c;
    margin: 6px;
    font-weight: 700;
    letter-spacing: 0em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-align: center;
}

/* =========================================================
   Chart typography
   SVG text style consistency
   ========================================================= */

#tempChart,
#precipChart,
#tempChart text,
#precipChart text {
    font-family: var(--font-family);
    font-weight: 400;
} 

/* =========================================================
   Axis styles
   ========================================================= */

.chart-axis path,
.chart-axis line {
    stroke: var(--axis-stroke);
    stroke-width: 0.6;
    shape-rendering: crispEdges;
}

.chart-axis text {
    fill: var(--axis-text);
    font-size: 12px;
} 

/* =========================================================
   Data markers
   ========================================================= */

.temp-line {
    fill: none;
    stroke-width: 2.0;
    stroke-linejoin: miter;
    stroke-linecap: butt;
}

.precip-line {
    stroke-linejoin: miter;
    stroke-linecap: butt;
}

.temp-range,
.precip-range {
    shape-rendering: geometricPrecision;
}

.precip-bar {
    opacity: 0.75;
}

.chart-hover-dot {
    stroke: #ffffff;
    stroke-width: 1.2;
    opacity: 0.9;
}

.chart-hover-line-outline {
    fill: none;
    stroke: #ffffff;
    stroke-width: 4.0;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
}

.chart-hover-line {
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
}

/* =========================================================
   Panel body
   ========================================================= */

.panel-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: auto;
    gap: 0;
}

/* Climate stats display below chart */
#climate-stats {
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    gap: 14px;
    padding: 0 8px;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 13px;
}

#climate-stats span {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

#climate-stats .stat-label {
    font-size: 11px;
    color: #777;
    letter-spacing: 0.02em;
}

#climate-stats .stat-value {
    font-size: 14px;
    font-weight: 700;
}

/* Narrow panel layout: vertical stats + scrollbar */
@media (max-width: 520px) {
    #climate-stats {
        flex-direction: column;
        align-items: stretch;
        max-height: 190px;
        overflow-y: auto;
        padding-right: 12px;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.05);
    }

    #climate-stats span {
        align-items: flex-start;
        width: 100%;
        padding: 6px;
    }

    #climate-stats::-webkit-scrollbar {
        width: 6px;
    }
    #climate-stats::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 3px;
    }

    #climateComboChart {
        width: calc(100% - 16px);
    }
}

/* =========================================================
   Panel header and titles
   ========================================================= */

.panel-header {
    text-align: center;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.panel-title {
    font-size: 18px;
    font-weight: 700;
    margin-top: 8px;
    margin-bottom: 12px;
}

.panel-hint {
    font-size: 11px;
    color: var(--panel-hint-color);
    line-height: 1.2;
    text-align: center;
}

/* =========================================================
   Climate label and description
   ========================================================= */

#climate-type {
    font-size: 15px;
    font-weight: 700;
    margin-top: 10px;
    margin-bottom: 3px;
}

#climate-explain {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--climate-explain-color);
    text-align: center;
} 

#climate-coord .coord-line,
#climate-coord .country-line {
    display: block;
}

#climate-coord .country-line {
    margin-top: 4px;
}

#climate-explain .explain-line {
    margin-top: 2px;
    white-space: nowrap;
}

/* =========================================================
   Panel metadata and data source
   ========================================================= */

.panel-metadata {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--panel-border);
    flex-shrink: 0;

    font-size: 11px;
    line-height: 1.35;
    color: var(--metadata-color);
    text-align: center;
}

.panel-metadata a {
    color: var(--link-color);
    text-decoration: none;
}

.panel-metadata a:hover {
    text-decoration: underline;
}

.panel-metadata .metadata-line {
    margin-top: 4px;
}

.climate-stats {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    gap: 18px;
    font-size: 13px;
    color: #2a3a4d;
    background: none;
    border-top: 1px solid #e5e5e5;
    border-radius: 0 0 8px 8px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.climate-stats .stat-label {
    color: #888;
    font-size: 12px;
    font-weight: 400;
    margin-right: 2px;
}

.climate-stats .stat-value {
    color: #1a2a3a;
    font-size: 14px;
    font-weight: 700;
}

