/* Historical weather calendar widget — extracted from _historical-weather-calendar.scss
   (legacy weather.css). Loaded on tw_city_graph temp/rain pages; classes are unique
   to the historic/historicCityMonthCalendar component, so no scope prefix needed. */
.weather-history-component{margin:0 0 20px 0;background:#fff}
.weather-history-panel{border:1px solid #e5e7eb;padding:20px;position:relative}
.weather-history-header{margin-bottom:20px;display:flex;flex-direction:row;align-items:center;gap:12px}
.weather-history-controls{display:flex;align-items:center;gap:20px;flex-wrap:nowrap;flex:1;justify-content:space-between}
.weather-history-year-nav{display:flex;align-items:center;gap:8px}
.tw-graph-body .weather-history-year-select,.tw-graph-body .weather-history-mode-select{padding:6px 32px 6px 12px !important;border:1px solid #e5e7eb;border-radius:8px;background:#fff url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='10'%20height='6'%20viewBox='0%200%2010%206'%3E%3Cpath%20fill='%236b7280'%20d='M0%200l5%206%205-6z'/%3E%3C/svg%3E") no-repeat right 10px center !important;background-size:10px 6px !important;appearance:none !important;-webkit-appearance:none !important;-moz-appearance:none !important;cursor:pointer;font-size:16px;font-weight:400;color:#000 !important;margin-right:0}
.weather-history-year-nav{position:relative}
.weather-history-month-nav{display:flex}
.weather-history-mode-select{max-width:200px}
.weather-history-nav-btn{background:#fff;border:1px solid #e5e7eb;border-radius:8px;width:36px;height:32px;font-size:20px;font-weight:400;font-family:inherit;line-height:1;cursor:pointer;transition:all .2s;padding:0;display:flex;align-items:center;justify-content:center}
.weather-history-calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;min-height:620px}
/* Column labels (not selectable) — prominent uppercase headers with an underline rule, no box. */
.weather-history-dow{font-weight:800;text-align:center;padding:2px 0 10px;margin-bottom:2px;color:#1f2937;font-size:13px;letter-spacing:.06em;text-transform:uppercase;border-bottom:2px solid #e5e7eb;position:relative}
.weather-history-day{background:#fff;border-radius:6px;padding:10px 6px 8px;min-height:94px;box-shadow:0 1px 3px rgba(0,0,0,0.08);position:relative;text-align:center;cursor:pointer}
.weather-history-date-num{position:absolute;top:5px;left:6px;font-size:11px;opacity:.65;font-weight:600}
.weather-history-icon{width:40px;height:40px;margin:4px auto 3px;display:flex;align-items:center;justify-content:center}
.weather-history-icon img{width:100%;height:100%}
.weather-history-temp{font-weight:700;font-size:16px;margin:6px 0 3px 0;line-height:1}
.weather-history-rain{font-size:12px;opacity:.8;line-height:1}
.weather-history-rain.precip-mode{font-size:11px}
.weather-history-loading-overlay{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,0.7);display:flex;align-items:center;justify-content:center;z-index:100}
.weather-history-loading-popup{background:white;padding:24px 32px;border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,0.15);text-align:center}
.weather-history-spinner{width:36px;height:36px;border:3px solid #f3f3f3;border-top:3px solid #3498db;border-radius:50%;animation:spin 1s linear infinite;margin:0 auto 12px}
.weather-history-loading-text{font-size:14px;color:#666}
.weather-history-error-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.3);display:flex;align-items:center;justify-content:center;z-index:9999}
.weather-history-error-popup{background:white;padding:24px 32px;border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,0.2);text-align:center;max-width:400px}
.weather-history-error-icon{width:48px;height:48px;margin:0 auto 16px;background:#fee;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#dc2626;font-size:24px;font-weight:bold}
.weather-history-error-text{font-size:16px;color:#374151;margin-bottom:20px}
.weather-history-error-btn{background:#3b82f6;color:white;border:0;padding:8px 20px;border-radius:6px;cursor:pointer;font-size:14px;transition:background .2s}
.weather-history-error-btn:hover{background:#2563eb}
.score-0 .weather-history-date-num,.score-1 .weather-history-date-num{opacity:.75}
.weather-history-legend{display:flex;gap:20px;align-items:center;font-size:14px;margin-top:20px;justify-content:space-between;flex-wrap:wrap}
.weather-history-legend-type{font-weight:600;color:#374151}
.weather-history-legend-items{display:flex;gap:20px;align-items:center;flex-wrap:wrap}
.weather-history-legend-item{display:flex;align-items:center;gap:6px}
.weather-history-dot{width:14px;height:14px;border-radius:3px;display:inline-block}
.weather-history-dot.score-0{background:#37474f}
.weather-history-dot.score-1{background:#78909c}
.weather-history-dot.score-2{background:#b9f6ca}
.weather-history-dot.score-3{background:#69f0ae}
.weather-history-dot.score-4{background:#00c853}
.weather-history-dot.temp-very-warm{background:#eb7d44}
.weather-history-dot.temp-warm{background:#fca952}
.weather-history-dot.temp-pleasant{background:#fcd96a}
.weather-history-dot.temp-moderate{background:#f6f09f}
.weather-history-dot.temp-cold{background:#b6d4f3}
.weather-history-dot.temp-very-cold{background:#91b9e7}
.weather-history-dot.rain-heavy{background:#7297d1}
.weather-history-dot.rain-high{background:#8fb5e6}
.weather-history-dot.rain-moderate{background:#adcdf5}
.weather-history-dot.rain-low{background:#e7e9ee;border:1px solid #d5d7db}
.weather-history-dot.rain-none{background:#f1f2f5;border:1px solid #e0e1e3}
.weather-history-question{font-size:24px;opacity:.4;font-weight:900;text-shadow:0 0 1px rgba(0,0,0,0.3)}
.weather-history-no-data{font-size:13px;margin-top:16px;opacity:.6}
.weather-history-popup-conditions{margin:8px 0;padding:8px 0;border-top:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb}
.weather-history-popup-condition-row{display:flex;align-items:center;gap:8px;margin:4px 0;font-size:13px}
.weather-history-popup-condition-icon{width:12px;height:12px;border-radius:2px;flex-shrink:0}
@media(max-width:600px){.weather-history-panel{padding:12px}.weather-history-header{flex-direction:column;align-items:stretch}.weather-history-controls{flex-direction:column;gap:12px;align-items:stretch;justify-content:flex-start}.weather-history-month-nav{width:100%;justify-content:space-between}.weather-history-month-dropdown{flex:1}.weather-history-mode-select{order:-1;width:100% !important;max-width:none !important;color:#000 !important}.weather-history-year-nav{width:100%;justify-content:space-between}.weather-history-year-select{flex:1;max-width:none !important;color:#000 !important}.weather-history-calendar{gap:2px;min-height:490px}.weather-history-day{height:74px;min-height:74px;padding:8px 4px 6px;box-shadow:none;border:1px solid #f3f4f6}.weather-history-icon{width:24px;height:24px}.weather-history-temp{font-size:12px;margin:2px 0 3px 0}.weather-history-rain{font-size:10px}.weather-history-rain.precip-mode{font-size:9px}.weather-history-dow{font-size:11px;padding:3px 0}.weather-history-legend{font-size:11px;gap:10px}.weather-history-legend-items{gap:10px}.weather-history-dot{width:12px;height:12px}.weather-history-date-num{font-size:9px}.weather-history-question{font-size:16px}.weather-history-no-data{font-size:10px;margin-top:8px}}
@media(max-width:400px){.weather-history-panel{padding:10px}.weather-history-calendar{gap:1px;min-height:420px}.weather-history-day{height:64px;min-height:64px;padding:6px 3px 5px}.weather-history-icon{width:20px;height:20px}.weather-history-temp{font-size:10px;margin:1px 0 2px 0}.weather-history-rain{font-size:9px}.weather-history-rain.precip-mode{font-size:8px}.weather-history-dow{font-size:10px}.weather-history-legend{gap:8px}.weather-history-legend-items{gap:8px}.weather-history-date-num{font-size:8px}.weather-history-question{font-size:14px}.weather-history-no-data{font-size:9px;margin-top:6px}}


/* Daily precipitation/temperature normals section — extracted from _charts.scss,
   scoped under .tw-graph-body ('.chart-controls'/'.chart-title' are generic names). */
.tw-graph-body .daily-normals-section{margin-top:2rem;margin-bottom:1.5rem}
.tw-graph-body .daily-normals-section:first-child{margin-top:0}
.tw-graph-body .daily-normals-section .subtitle{margin-bottom:.25rem}
.tw-graph-body .daily-normals-section .normals-year-range{font-size:13px;color:#666}
.tw-graph-body .daily-chart-wrapper{border:1px solid #e5e7eb;padding:20px}
.tw-graph-body .daily-chart-wrapper .chart-description{margin:8px 0 0 0;font-size:14px;line-height:1.5;color:#4b5563}
.tw-graph-body .daily-chart-wrapper .chart-title{margin:0;font-size:16px;font-weight:600;color:#374151}
.tw-graph-body .daily-chart-wrapper .chart-controls{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin-bottom:.5rem}
.tw-graph-body .daily-chart-wrapper .year-nav-btn{background:#fff;border:1px solid #e5e7eb;border-radius:8px;width:36px;height:32px;font-size:20px;font-weight:400;font-family:inherit;line-height:1;cursor:pointer;transition:all .2s;padding:0;display:flex;align-items:center;justify-content:center}
.tw-graph-body .daily-chart-wrapper .year-nav-btn:hover:not(:disabled){background:#f5f5f5}
.tw-graph-body .daily-chart-wrapper .year-nav-btn:disabled{cursor:not-allowed;opacity:.4}
.tw-graph-body .daily-chart-wrapper .year-compare-selector{display:flex;align-items:center;gap:8px}
.tw-graph-body .daily-chart-wrapper .year-compare-selector .year-compare-select{padding:6px 32px 6px 12px;border:1px solid #e5e7eb;border-radius:8px;background:#fff url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='10'%20height='6'%20viewBox='0%200%2010%206'%3E%3Cpath%20fill='%236b7280'%20d='M0%200l5%206%205-6z'/%3E%3C/svg%3E") no-repeat right 10px center !important;background-size:10px 6px !important;appearance:none !important;-webkit-appearance:none !important;-moz-appearance:none !important;cursor:pointer;font-size:16px;font-weight:400;color:#000 !important;min-width:110px;margin-right:0}
.tw-graph-body .daily-chart-wrapper .year-compare-selector .year-compare-select:hover{border-color:#d1d5db}
.tw-graph-body .daily-chart-wrapper .year-compare-selector .year-compare-select:focus{outline:0;border-color:#2196f3}
.tw-graph-body .daily-chart-wrapper .year-compare-selector .year-compare-select.has-year{background-color:#e3f2fd;border-color:#2196f3}
.tw-graph-body .daily-chart-wrapper .year-compare-selector .year-compare-select.loading{color:#999 !important}
.tw-graph-body .daily-chart-wrapper .month-selector{display:flex;flex-wrap:nowrap;width:100%;gap:4px}
.tw-graph-body .daily-chart-wrapper .month-selector .month-btn{flex:1;padding:6px 4px;border:1px solid #e5e7eb;background:#fff;cursor:pointer;font-size:13px;border-radius:8px;transition:background .15s,border-color .15s}
.tw-graph-body .daily-chart-wrapper .month-selector .month-btn:hover{background:#f5f5f5}
.tw-graph-body .daily-chart-wrapper .month-selector .month-btn.active{background:#2196f3;color:white;border-color:#2196f3}
.tw-graph-body .daily-chart-wrapper .month-selector .month-btn:disabled{cursor:not-allowed;opacity:.5}
.tw-graph-body .daily-chart-wrapper .month-dropdown-wrapper{display:none}
.tw-graph-body .daily-chart-wrapper .month-dropdown-wrapper .month-dropdown-select{padding:6px 32px 6px 12px;border:1px solid #e5e7eb;border-radius:8px;background:#fff url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='10'%20height='6'%20viewBox='0%200%2010%206'%3E%3Cpath%20fill='%236b7280'%20d='M0%200l5%206%205-6z'/%3E%3C/svg%3E") no-repeat right 10px center !important;background-size:10px 6px !important;appearance:none !important;-webkit-appearance:none !important;-moz-appearance:none !important;cursor:pointer;font-size:16px;font-weight:400;color:#000 !important;min-width:130px;margin-right:0}
@media only screen and (max-width:767px){.tw-graph-body .daily-chart-wrapper{padding:12px}.tw-graph-body .daily-chart-wrapper .chart-controls{flex-direction:column;align-items:stretch;gap:8px}.tw-graph-body .daily-chart-wrapper .month-selector{display:none}.tw-graph-body .daily-chart-wrapper .month-dropdown-wrapper{display:block;width:100%}.tw-graph-body .daily-chart-wrapper .month-dropdown-wrapper .month-dropdown-select{width:100%}.tw-graph-body .daily-chart-wrapper .month-dropdown-wrapper{display:flex;align-items:center;gap:8px;order:-1}.tw-graph-body .daily-chart-wrapper .month-dropdown-wrapper .month-dropdown-select{flex:1;min-width:0;max-width:none !important}.tw-graph-body .daily-chart-wrapper .year-compare-selector{order:0;width:100%}.tw-graph-body .daily-chart-wrapper .year-compare-selector .year-compare-select{flex:1;min-width:0;max-width:none !important}.tw-graph-body .daily-chart-wrapper .chart-title{order:-2;text-align:center;margin-bottom:8px}}
@media(max-width:600px){.tw-graph-body .weather-history-month-dropdown{flex:1}}
