/* Tizgin Header Currency + Weather */
.tzhw, .tzhw * { box-sizing: border-box; }

.tzhw {
    --tzhw-accent: #0b2545;
    --tzhw-text: #202020;
    --tzhw-muted: #7e7e7e;
    --tzhw-line: #ececec;
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 760px;
    color: var(--tzhw-text);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.2;
}

.tzhw__row { display: flex; align-items: center; gap: 14px; min-width: 0; }

.tzhw__row--currency {
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--tzhw-line);
    justify-content: space-between;
    flex-wrap: nowrap;
}

.tzhw__row--weather { position: relative; justify-content: space-between; }

.tzhw__currency-item {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
    flex: 0 1 auto;
    min-width: 0;
}

.tzhw__currency-symbol { font-size: 19px; line-height: 1; }

.tzhw__currency-value {
    font-size: 15px;
    font-weight: 550;
    font-variant-numeric: tabular-nums;
}

.tzhw__weather-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
}

.tzhw__label { white-space: nowrap; font-size: 14px; font-weight: 500; }

.tzhw__city-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--tzhw-muted);
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font: inherit;
    white-space: nowrap;
}

.tzhw__city-button:hover, .tzhw__city-button:focus-visible { color: var(--tzhw-text); }

.tzhw__condition-icon { font-size: 15px; line-height: 1; white-space: nowrap; }

.tzhw__metric {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    color: var(--tzhw-muted);
    white-space: nowrap;
    font-size: 13px;
}

.tzhw__metric strong {
    color: var(--tzhw-text);
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.tzhw__metric--temp {
    color: var(--tzhw-text);
    font-size: 17px;
    font-weight: 700;
    margin-right: 4px;
}

.tzhw__chevron {
    width: 8px;
    height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-top: -3px;
    transition: transform .18s ease;
}

.tzhw.is-open .tzhw__chevron { transform: rotate(225deg); margin-top: 2px; }

.tzhw__dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(440px, 100vw - 24px);
    border: 1px solid var(--tzhw-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(0,0,0,.14);
    z-index: 9999;
    overflow: hidden;
}

.tzhw__dropdown[hidden] { display: none !important; }

.tzhw__dropdown-item {
    appearance: none;
    border: 0;
    border-bottom: 1px solid var(--tzhw-line);
    background: transparent;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.tzhw__dropdown-item:hover,
.tzhw__dropdown-item:focus-visible,
.tzhw__dropdown-item.is-active { background: #f7f8fa; }

.tzhw__dropdown-left,
.tzhw__dropdown-right {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.tzhw__dropdown-left { flex: 1 1 auto; }
.tzhw__dropdown-icon { width: 22px; text-align: center; font-size: 18px; line-height: 1; }

.tzhw__dropdown-city {
    font-size: 14px;
    font-weight: 600;
    white-space: normal;
    overflow-wrap: anywhere;
}

.tzhw__dropdown-right { flex: 0 0 auto; justify-content: flex-end; }

.tzhw__dropdown-desc { color: var(--tzhw-muted); font-size: 12px; white-space: nowrap; }

.tzhw__dropdown-right strong { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }

.tzhw__source {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 14px;
    font-size: 10px;
    color: var(--tzhw-muted);
}

.tzhw__source a { color: var(--tzhw-accent); text-decoration: underline; }

@media (max-width: 1100px) {
    .tzhw { max-width: 100%; }
    .tzhw__row--currency { gap: 10px; }
    .tzhw__weather-main { gap: 10px; }
    .tzhw__metric { font-size: 12px; }
    .tzhw__metric strong { font-size: 14px; }
}

@media (max-width: 920px) {
    .tzhw__row--currency { flex-wrap: wrap; row-gap: 6px; }
    .tzhw__weather-main { flex-wrap: wrap; justify-content: flex-start; row-gap: 8px; }
}

@media (max-width: 767px) {
    .tzhw__metric:nth-of-type(4) { display: none; }
}

@media (max-width: 560px) {
    .tzhw__metric:nth-of-type(3),
    .tzhw__metric:nth-of-type(4) { display: none; }
    .tzhw__currency-item { gap: 4px; }
    .tzhw__currency-symbol { font-size: 17px; }
    .tzhw__currency-value { font-size: 14px; }
}


/* Ашылған dropdown body-ге көшіріледі: theme nav/header stacking context-інен тәуелсіз */
body > .tzhw__dropdown--portal {
    position: fixed !important;
    z-index: 2147483000 !important;
    right: auto !important;
    max-height: min(620px, calc(100vh - 24px));
    overflow-y: auto;
    overscroll-behavior: contain;
}

body > .tzhw__dropdown--portal[hidden] {
    display: none !important;
}
