/* ===================================================================
   Ecowitt Weather Station — Dashboard Styles
   Clean, minimal, high-contrast
   =================================================================== */

.ecowitt-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 20px 0;
    color: #111;
    font-size: 14px;
}

/* ── Panel ──────────────────────────────────────────────────────── */
.ecowitt-panel {
    background: transparent;
    border: none;
    margin-bottom: 28px;
}

.ecowitt-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid #111;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.ecowitt-panel-header h3 {
    margin: 0;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #111;
    border: none;
    flex: 1;
}

.ecowitt-icon {
    font-size: 1rem;
    line-height: 1;
}

.ecowitt-updated {
    font-size: .72rem;
    color: #777;
    margin-left: auto;
    font-weight: normal;
}

/* ── Metric rows (table-style) ──────────────────────────────────── */
.ecowitt-cards {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.ecowitt-section-header {
    padding: 10px 0 4px;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #888;
    border-bottom: 1px solid #e0e0e0;
    margin-top: 4px;
}

.ecowitt-card {
    display: flex;
    align-items: baseline;
    gap: 0;
    padding: 7px 0;
    border-bottom: 1px solid #ebebeb;
    background: transparent;
}

.ecowitt-card:last-child {
    border-bottom: none;
}

.ecowitt-card-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-right: 10px;
    color: #888;
    display: flex;
    align-items: center;
}

.ecowitt-card-icon svg {
    width: 18px;
    height: 18px;
}

.ecowitt-card[data-type="temp"]     .ecowitt-card-icon { color: #c0392b; }
.ecowitt-card[data-type="indoor"]   .ecowitt-card-icon { color: #27ae60; }
.ecowitt-card[data-type="humidity"] .ecowitt-card-icon { color: #2980b9; }
.ecowitt-card[data-type="pressure"] .ecowitt-card-icon { color: #8e44ad; }
.ecowitt-card[data-type="wind"]     .ecowitt-card-icon { color: #16a085; }
.ecowitt-card[data-type="rain"]     .ecowitt-card-icon { color: #2471a3; }
.ecowitt-card[data-type="solar"]    .ecowitt-card-icon { color: #d4a017; }
.ecowitt-card[data-type="uv"]       .ecowitt-card-icon { color: #cb4335; }

.ecowitt-card-label {
    font-size: .85rem;
    color: #555;
    font-weight: 400;
    width: 200px;
    flex-shrink: 0;
}

.ecowitt-card-dash {
    color: #bbb;
    margin: 0 12px;
    flex-shrink: 0;
}

.ecowitt-card-value {
    font-size: .95rem;
    font-weight: 700;
    color: #111;
    flex: 1;
}

.ecowitt-card-unit {
    font-weight: 400;
    color: #555;
    font-size: .85rem;
    margin-left: 3px;
}

.ecowitt-card-sub {
    font-size: .78rem;
    color: #999;
    margin-left: 10px;
    font-weight: 400;
}

/* ── Wind Rose ──────────────────────────────────────────────────── */
.ecowitt-windrose-wrap {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 20px 0;
    width: 100%;
}

#ecowitt-windrose,
canvas[data-widget="windrose"] {
    width: 320px;
    height: 320px;
    flex-shrink: 0;
}

.ecowitt-wind-info {
    flex: 1;
}

.ecowitt-wind-info {
    font-size: .88rem;
    color: #333;
    line-height: 2;
    flex: 1;
}

.ecowitt-wind-direction-label {
    font-size: 2.2rem;
    font-weight: 800;
    color: #111;
    display: block;
    line-height: 1.1;
    margin-bottom: 4px;
}

.ecowitt-wind-speed-label {
    font-size: 1.3rem;
    font-weight: 700;
    color: #111;
    display: block;
}

/* ── Charts ─────────────────────────────────────────────────────── */
.ecowitt-chart-panel {
    width: 100%;
}

.ecowitt-chart-tabbar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 14px 0 2px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0;
}

.ecowitt-chart-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-left: auto;
}

.ecowitt-tab {
    background: transparent;
    border: 1.5px solid #bbb;
    color: #555;
    border-radius: 20px;
    padding: 3px 13px;
    font-size: .78rem;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
    font-family: inherit;
}

.ecowitt-tab:hover {
    border-color: #111;
    color: #111;
}

.ecowitt-tab.active {
    background: #111;
    border-color: #111;
    color: #fff;
    font-weight: 600;
}

.ecowitt-chart-container {
    padding: 16px 0 4px;
    height: 260px;
    position: relative;
}

#ecowitt-chart-main {
    width: 100% !important;
    height: 100% !important;
}

/* ── Demo badge ─────────────────────────────────────────────────── */
.ecowitt-demo-badge {
    background: #ff9800;
    color: #fff;
    font-size: .6rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 20px;
    letter-spacing: .08em;
    vertical-align: middle;
}

/* ── Loading state ──────────────────────────────────────────────── */
.ecowitt-loading {
    padding: 16px 0;
    color: #aaa;
    font-size: .85rem;
}

.ecowitt-two-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

@media (max-width: 480px) {
    .ecowitt-card-label { width: 140px; font-size: .8rem; }
    .ecowitt-card-value { font-size: .88rem; }
    .ecowitt-windrose-wrap { flex-direction: column; align-items: flex-start; }
    #ecowitt-windrose { width: 180px; height: 180px; }
}

/* ── Sidebar Wind Card ──────────────────────────────────────────── */
.ecowitt-windcard {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #111;
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
    box-sizing: border-box;
}

.ecowitt-wc-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 7px;
    border-bottom: 2px solid #111;
    margin-bottom: 10px;
}

.ecowitt-wc-title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #111;
}

.ecowitt-windcard .ecowitt-updated {
    font-size: .68rem;
    color: #999;
}

.ecowitt-wc-rose-wrap {
    display: flex;
    justify-content: center;
    padding: 8px 0 6px;
}

.ecowitt-wc-rose-wrap canvas {
    display: block;
    width: 180px;
    height: 180px;
}

.ecowitt-wc-data {
    border-top: 1px solid #e8e8e8;
    margin-top: 6px;
    padding-top: 4px;
}

.ecowitt-wc-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ecowitt-wc-row:last-child {
    border-bottom: none;
}

.ecowitt-wc-label {
    font-size: .82rem;
    color: #666;
    font-weight: 400;
}

.ecowitt-wc-value {
    font-size: .9rem;
    font-weight: 700;
    color: #111;
    text-align: right;
}

/* ── Sidebar Current Conditions Card ───────────────────────────── */
.ecowitt-currentcard {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #111;
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
    box-sizing: border-box;
}
