/* HVAC.TM F137 — global country/language dropdown, visual flags, search and RTL */
[data-country-select] .select__menu{
  max-height:430px!important;
  overflow:hidden!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-width:thin!important;
  min-width:270px!important;
}
[data-country-select] .country-options-list{
  max-height:360px;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
}
[data-country-select] .select__option{
  width:100%;
  text-align:left;
  white-space:nowrap;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
}
/* F161 — the search filter uses the native HTML hidden attribute.
   This must override the flex !important rule above. */
[data-country-select] .select__option[hidden]{
  display:none!important;
}
.country-flag{
  display:inline-flex;
  width:22px;
  min-width:22px;
  height:16px;
  justify-content:center;
  align-items:center;
  line-height:1;
  border-radius:3px;
  overflow:hidden;
  box-shadow:0 0 0 1px rgba(20,54,62,.12);
  background:#f4f8f7;
}
.country-flag img{display:block;width:22px;height:16px;object-fit:cover;border-radius:3px}
.country-flag-fallback,.country-flag--emoji{font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif;font-size:15px;line-height:1}
.country-flag--selected{flex:0 0 22px}
.country-label-text,.country-option-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.country-option-name{flex:1;min-width:0}
.country-option-code{font-size:10px;line-height:1;opacity:.48;font-weight:800;letter-spacing:.06em}
.country-search-wrap{
  position:sticky;
  top:0;
  z-index:3;
  display:flex;
  align-items:center;
  gap:8px;
  padding:9px 10px;
  background:rgba(255,255,255,.98);
  border-bottom:1px solid rgba(10,48,57,.08);
  backdrop-filter:blur(12px);
}
.country-search-input{
  width:100%;
  min-width:0;
  height:36px;
  border:1px solid rgba(17,92,80,.16);
  border-radius:11px;
  padding:0 10px;
  outline:none;
  color:#15333a;
  background:#f8fcfb;
  font:600 13px/1.2 inherit;
}
.country-search-input:focus{border-color:#14a679;box-shadow:0 0 0 3px rgba(20,166,121,.10)}
[data-language-select] .select__menu{max-height:220px!important;overflow-y:auto!important}
html[dir="rtl"] body{direction:rtl}
html[dir="rtl"] .header-inner,html[dir="rtl"] .site-nav,html[dir="rtl"] .header-actions{direction:rtl}
html[dir="rtl"] input,html[dir="rtl"] textarea{text-align:right}
/* Header controls must stay clickable above page artwork and decorative layers. */
.site-header .header-actions,.site-header [data-hvac-select],.site-header .profile-btn{position:relative;z-index:1201;pointer-events:auto!important}
.site-header .select__button,.site-header .select__option,.site-header .profile-btn{pointer-events:auto!important;cursor:pointer!important}
.site-header [data-hvac-select].is-open{z-index:1400!important}
.site-header [data-hvac-select].is-open .select__menu{z-index:1500!important;pointer-events:auto!important}
.hvac-user-overlay{z-index:30000!important;pointer-events:auto!important}
@media (max-width:760px){
  [data-country-select] .select__menu{min-width:min(310px,calc(100vw - 28px))!important}
  [data-country-select] .country-options-list{max-height:330px}
}

/* F142 — selected market flag/name spacing */
[data-country-select] [data-select-label],
.country-switcher [data-select-label],
.tm-country-select [data-select-label] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
[data-country-select] [data-select-label] .tm-country-flag,
.country-switcher [data-select-label] .tm-country-flag,
.tm-country-select [data-select-label] .tm-country-flag {
  flex: 0 0 auto;
}

/* F142 — keep selected country readable while preserving header flex budget */
[data-country-select] [data-select-label]{flex:1 1 auto!important;max-width:none!important;overflow:visible!important}
[data-country-select] .country-label-text{flex:1 1 auto;min-width:0;max-width:150px}
@media (min-width:1451px){.header-actions [data-country-select] .select__button{min-width:190px!important;max-width:225px!important}}
@media (min-width:1181px) and (max-width:1450px){.header-actions [data-country-select] .select__button{min-width:165px!important;max-width:195px!important}.country-label-text{max-width:122px}}
