/* Responsive header sizing; no control is hidden off the viewport edge. */
@media (max-width: 1199.98px) {
  .recovery-static .hdr__logo {
    display: block;
    flex: 0 0 108px;
    width: 108px;
    min-width: 0;
  }
  .recovery-static .hdr__logo svg {
    display: block;
    width: 100%;
    height: 30px;
  }
  .recovery-static .hdr__contacts { flex: 0 0 auto; min-width: 0; }
}

@media (max-width: 767.98px) {
  .recovery-static .hdr { min-width: 0; }
  .recovery-static .hdr__logo {
    flex-basis: clamp(78px, 20vw, 108px);
    width: clamp(78px, 20vw, 108px);
  }
  /* The consultation action is present in the existing mobile action bar. */
  .recovery-static .hdr__feedback { display: none !important; }
  .recovery-static .hdr__search-toggle { margin-left: auto !important; flex: 0 0 44px; }
  .recovery-static .hdr__contacts { margin-left: 8px; }
}

@media (max-width: 430px) {
  .recovery-static .hdr__contacts { display: none; }
}

/* Match the source site's orange outlined callback control. */
.recovery-static .hdr__feedback[data-order] {
  border: 1px solid #fb6420 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #fb6420 !important;
}
.recovery-static .hdr__feedback[data-order]:hover,
.recovery-static .hdr__feedback[data-order]:focus-visible {
  background: #fff5ef !important;
  color: #e65315 !important;
}
.recovery-static .hdr-btn_max {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 38px;
  min-height: 38px;
  padding: 0 8px;
  border-radius: 9px;
  background: #25313a;
  color: #fff;
  font: 700 11px/1 Arial, sans-serif;
  text-decoration: none;
}
.recovery-static .hdr-btn_max:hover,
.recovery-static .hdr-btn_max:focus-visible { background: #fb6420; color: #fff; }
.recovery-static .hdr-btn_max { width: 40px; height: 40px; padding: 8px; flex: 0 0 40px; }
.recovery-static .hdr-btn_max img { display: block; width: 24px; height: 24px; }
.recovery-static .hdr__feedback[data-order] svg { display: none !important; }

/* When the existing catalog menu is open, expose the direct mailto/tel
   actions in a fixed contact strip above the bottom mobile navigation. */
@media (max-width: 1199.98px) {
  .recovery-static .hdr:has(.hdr-catalog.recovery-open) .hdr__contacts {
    position: fixed;
    z-index: 100;
    right: 12px;
    bottom: 16px;
    left: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 8px;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #e1e4e6;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 30px #17212b22;
  }
  .recovery-static .hdr:has(.hdr-catalog.recovery-open) .hdr__contacts > .hdr-btn_whatsapp,
  .recovery-static .hdr:has(.hdr-catalog.recovery-open) .hdr__contacts > .hdr-btn_telegram {
    display: none !important;
  }
  .recovery-static .hdr:has(.hdr-catalog.recovery-open) .hdr__contacts > a.d-none.d-xl-flex {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #e2e5e7;
    border-radius: 8px;
    background: #fff;
    color: #25313a;
    font-family: "Rock Star", Arial, sans-serif;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    overflow-wrap: anywhere;
  }
  .recovery-static .hdr:has(.hdr-catalog.recovery-open) .hdr-catalog-list { padding-bottom: 112px; }
  .recovery-static .hdr:has(.hdr-catalog.recovery-open) .hdr__contacts > .hdr__feedback[data-order] {
    display: flex !important;
    align-items: center;
    grid-column: 1 / -1;
    justify-content: center;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 10px 12px;
    border-color: #fb6420 !important;
    color: #fb6420 !important;
    overflow-wrap: anywhere;
  }
  .recovery-static .hdr:has(.hdr-catalog.recovery-open) .hdr__contacts > .hdr-btn_max {
    min-width: 0;
    min-height: 44px;
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .recovery-static .hdr:has(.hdr-catalog.recovery-open) .hdr__contacts {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
  .recovery-static .hdr:has(.hdr-catalog.recovery-open) .hdr-catalog-list { padding-bottom: 136px; }
}

@media (max-width: 430px) {
  .recovery-static .hdr:has(.hdr-catalog.recovery-open) .hdr__contacts {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }
  .recovery-static .hdr:has(.hdr-catalog.recovery-open) .hdr__contacts > .hdr__feedback[data-order] { grid-column: 1 / -1; }
  .recovery-static .hdr:has(.hdr-catalog.recovery-open) .hdr__contacts > a.d-none.d-xl-flex { grid-column: 1; width: 100%; }
  .recovery-static .hdr:has(.hdr-catalog.recovery-open) .hdr__contacts:has(.hdr-btn_max) { grid-template-columns: 42px minmax(0, 1fr); }
  .recovery-static .hdr:has(.hdr-catalog.recovery-open) .hdr__contacts:has(.hdr-btn_max) > .hdr-btn_max { grid-column: 1; grid-row: 1; }
  .recovery-static .hdr:has(.hdr-catalog.recovery-open) .hdr__contacts:has(.hdr-btn_max) > .hdr__feedback[data-order] { grid-column: 2; grid-row: 1; }
  .recovery-static .hdr:has(.hdr-catalog.recovery-open) .hdr__contacts:has(.hdr-btn_max) > a.d-none.d-xl-flex { grid-column: 1 / -1; }
}

/* Header controls are UI dimensions, not editorial rem sizes. The archived
   theme scales html between desktop breakpoints; mixing that scale with a
   fixed MAX button created mismatched rows. Keep one 44px row throughout. */
.recovery-static .s-hdr .container.hdr {
  box-sizing: border-box;
  min-height: 68px;
  padding: 12px 15px;
  align-items: center;
}
.recovery-static .s-hdr .hdr__logo {
  flex: 0 0 108px;
  width: 108px;
  min-width: 0;
  margin-right: 16px;
}
.recovery-static .s-hdr .hdr__logo svg { display:block; width:108px; height:30px; }
.recovery-static .s-hdr .hdr-btn,
.recovery-static .s-hdr .hdr-catalog-link,
.recovery-static .s-hdr .hdr-dropdown-link,
.recovery-static .s-hdr .hdr-catalog-panel-link {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
}
.recovery-static .s-hdr .hdr-btn {
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  flex-shrink: 0;
  padding: 0 12px;
  border-radius: 10px;
  white-space: nowrap;
  align-items: center;
  justify-content: center;
}
.recovery-static .s-hdr .hdr__controls { gap: 6px; }
.recovery-static .s-hdr .hdr__search-toggle {
  width: 44px;
  min-width: 44px;
  flex: 0 0 44px;
  padding: 10px;
  margin-left: 6px;
}
.recovery-static .s-hdr .hdr-btn svg { flex-shrink:0; width:24px; height:24px; }
.recovery-static .s-hdr .hdr__contacts {
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.recovery-static .s-hdr .hdr__feedback[data-order] { padding:0 16px; }
.recovery-static .s-hdr .hdr-btn_max,
.recovery-static .s-hdr .hdr-btn_whatsapp,
.recovery-static .s-hdr .hdr-btn_telegram {
  width:44px;
  min-width:44px;
  height:44px;
  flex:0 0 44px;
  padding:10px;
}
.recovery-static .s-hdr .hdr-btn_max img { width:24px; height:24px; }
/* Local vector marks, optically sized inside the unchanged 44px controls. */
.recovery-static .s-hdr .hdr-btn_max,
.recovery-static .s-hdr .hdr-btn_whatsapp,
.recovery-static .s-hdr .hdr-btn_telegram { padding:8px; }
.recovery-static .s-hdr .hdr-btn_max { background:linear-gradient(135deg,#00bfff 0%,#471aff 55%,#9500ff 100%); }
.recovery-static .s-hdr .hdr-btn_max:hover,
.recovery-static .s-hdr .hdr-btn_max:focus-visible { background:linear-gradient(135deg,#00bfff 0%,#471aff 55%,#9500ff 100%); filter:brightness(1.08); }
.recovery-static .s-hdr .hdr-btn_max img,
.recovery-static .s-hdr .hdr-btn_whatsapp img,
.recovery-static .s-hdr .hdr-btn_telegram img {
  display:block;
  flex:0 0 28px;
  width:28px;
  height:28px;
  object-fit:contain;
}
/* Keep the original Telegram logo canvas and its native optical position. */
.recovery-static .s-hdr .hdr-btn_telegram { padding:0; }
.recovery-static .s-hdr .hdr-btn_telegram img { width:44px; height:44px; flex-basis:44px; }
.recovery-static .s-hdr .hdr__contacts a[href^="tel:"] { min-width:180px; gap:10px; }
.recovery-static .s-hdr .hdr__contacts a[href^="tel:"] small {
  display:block;
  font-size:10px;
  line-height:1.2;
  margin-bottom:2px;
}
/* Switch navigation mode when the complete row no longer fits. Do not scale
   down individual controls or clip contact details to keep a desktop row. */
@media (min-width:1200px) and (max-width:1439.98px) {
  .recovery-static .s-hdr .hdr__controls .d-xl-flex,
  .recovery-static .s-hdr .hdr__controls .hdr-control-wrap,
  .recovery-static .s-hdr .burger .d-xl-block { display:none !important; }
  .recovery-static .s-hdr .hdr__controls { display:flex; width:auto; }
  .recovery-static .s-hdr .burger { width:44px; padding:10px; }
}
@media (max-width:1199.98px) {
  .recovery-static .s-hdr .hdr__contacts { margin-left:8px; }
  .recovery-static .s-hdr .hdr__search-toggle { margin-left:auto; }
}
@media (max-width:767.98px) {
  .recovery-static .s-hdr .hdr__logo { flex-basis:92px; width:92px; margin-right:0; }
  .recovery-static .s-hdr .hdr__logo svg { width:92px; height:30px; }
}
/* Preserve the accessible contact strip when the catalog menu is open. */
@media (max-width:1199.98px) {
  .recovery-static .s-hdr .hdr:has(.hdr-catalog.recovery-open) .hdr__contacts { margin-left:0; }
  .recovery-static .s-hdr .hdr:has(.hdr-catalog.recovery-open) .hdr-btn_max { min-width:0; width:100%; }
}
