/* ============================================================
   Townhall Wetter-Widget
   Alle Selektoren unter .th-wetter-widget geschachtelt, damit
   Elementor / Theme-Resets nicht greifen. Buttons mit all:unset.
   ============================================================ */

/* ── Box-Sizing Reset für Widget-Kinder ── */
.th-wetter-widget *,
.th-wetter-widget *::before,
.th-wetter-widget *::after {
    box-sizing: border-box;
}

/* ── Wrapper ── */
.th-wetter-widget {
    z-index: 1;
    display: inline-flex;
    flex-direction: column;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1;

    width: fit-content;
    padding: 10px 22px;
    box-shadow: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-radius: var(--th-border-radius);
    backdrop-filter: blur(5px);
}
.th-wetter-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    z-index: -1;
    pointer-events: none;
}

/* ── Current ── */
.th-wetter-widget .th-wetter-current {
    display: flex;
    align-items: center;
    gap: 12px;
}

.th-wetter-widget .th-wetter-current--clickable {
    cursor: pointer;
}

.th-wetter-widget .th-wetter-current--clickable:focus-visible {
    outline: 2px solid #4a7fc1;
    outline-offset: 4px;
    border-radius: 4px;
}

.th-wetter-widget .th-wetter-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.th-wetter-widget .th-wetter-temp {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: inherit;
    margin: 0;
    padding: 0;
    color:white;
}

.th-wetter-widget .th-wetter-desc {
    font-size: 0.85rem;
    line-height: 1.2;
    color: #aaa;
    margin: 0;
    padding: 0;
}

/* ── Icons ── */
.th-wetter-widget .th-wetter-icon {
    display: inline-flex;
    flex-shrink: 0;
    color: #4a7fc1;
    line-height: 0;
}

.th-wetter-widget .th-wetter-icon--lg svg {
    width: 48px;
    height: 48px;
}

.th-wetter-widget .th-wetter-icon--sm svg {
    width: 28px;
    height: 28px;
}

.th-wetter-widget .th-wetter-icon--01 { color: #e8a020; }
.th-wetter-widget .th-wetter-icon--02 { color: #e8a020; }
.th-wetter-widget .th-wetter-icon--11 { color: #6a5acd; }
.th-wetter-widget .th-wetter-icon--13 { color: #89b4d8; }
.th-wetter-widget .th-wetter-icon--50 { color: #94a3b8; }

/* ── Popup-Overlay ── */
.th-wetter-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.th-wetter-popup[hidden] {
    display: none;
}

.th-wetter-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.th-wetter-popup-inner {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
}

body.th-wetter-scroll-lock {
    overflow: hidden;
}

/* ── Aktuelle Details ── */
.th-wetter-popup-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.th-wetter-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 60px;
    padding: 10px 8px;
    background: #f8fafc;
    border-radius: 8px;
}

.th-wetter-detail-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
    white-space: nowrap;
}

.th-wetter-detail-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #222;
    line-height: 1;
    white-space: nowrap;
}

/* ── Sonnenaufgang / -untergang ── */
.th-wetter-sun-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.th-wetter-sun-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.th-wetter-sun-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #e8a020;
}

.th-wetter-sun-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
}

.th-wetter-sun-time {
    font-size: 0.9rem;
    font-weight: 700;
    color: #222;
    line-height: 1;
    margin-left: auto;
}

/* ── Popup-Titel ── */
.th-wetter-popup-title {
    all: unset;
    display: block;
    margin-bottom: 20px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Schließen-Button ── */
.th-wetter-popup .th-wetter-close {
    all: unset;
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    cursor: pointer;
    color: #888;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
}

.th-wetter-popup .th-wetter-close svg {
    width: 18px;
    height: 18px;
}

body .th-wetter-popup .th-wetter-close:hover,
body .th-wetter-popup .th-wetter-close:focus {
    background: #f3f4f6 !important;
    color: #333 !important;
    border: none !important;
}

/* ── Forecast Grid ── */
.th-wetter-forecast-grid {
    display: flex;
    gap: 4px;
    justify-content: space-between;
    margin: 0;
    padding: 0;
    list-style: none;
}

.th-wetter-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    padding: 10px 4px;
    border-radius: var(--th-border-radius);
    background: #f8fafc;
    margin: 0;
}

.th-wetter-day-name {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.th-wetter-max {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    color: #222;
}

.th-wetter-min {
    font-size: 0.82rem;
    line-height: 1;
    color: #999;
}

.th-wetter-day-pop {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    color: #4a7fc1;
}

/* ── Icons im Popup ── */
.th-wetter-popup .th-wetter-icon {
    display: inline-flex;
    flex-shrink: 0;
    color: #4a7fc1;
    line-height: 0;
}

.th-wetter-popup .th-wetter-icon--sm svg {
    width: 28px;
    height: 28px;
}

.th-wetter-popup .th-wetter-icon--01 { color: #e8a020; }
.th-wetter-popup .th-wetter-icon--02 { color: #e8a020; }
.th-wetter-popup .th-wetter-icon--11 { color: #6a5acd; }
.th-wetter-popup .th-wetter-icon--13 { color: #89b4d8; }
.th-wetter-popup .th-wetter-icon--50 { color: #94a3b8; }

