/* CAMPER CHINA 116 — approved compact motorhome contact button, 2026-10-20.
 * Styles the existing data-contact-dock control. No JavaScript or new contacts.
 * Keep camper.svg next to this file. */

html body [data-contact-dock="true"] {
  left: auto;
  right: clamp(14px, 2vw, 28px);
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: min(368px, calc(100% - 28px));
  max-width: calc(100vw - 28px);
  justify-items: end;
  gap: 12px;
  pointer-events: none;
}

html body [data-contact-dock="true"] > section {
  width: 100%;
  max-width: 100%;
  max-height: min(560px, calc(100vh - 132px));
  max-height: min(560px, calc(100dvh - 132px));
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: auto;
}

html body [data-contact-dock="true"] > button[aria-controls][aria-expanded] {
  box-sizing: border-box;
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 88px;
  height: 80px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  gap: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #ebcd90;
  box-shadow: none;
  transform: none;
  transition: none;
  overflow: visible;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

html body [data-contact-dock="true"] > button[aria-controls][aria-expanded]::before {
  content: "";
  display: block;
  flex: none;
  width: 88px;
  height: 58px;
  background: center / contain no-repeat url("./camper.svg");
  filter: drop-shadow(0 5px 7px #0008);
  transition: transform 180ms ease;
}

html body [data-contact-dock="true"] > button[aria-controls][aria-expanded]::after {
  content: "Связь";
  display: block;
  color: #ebcd90;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: .5px;
  text-align: center;
  text-shadow: 0 2px 3px #000;
}

/* Original text remains available to screen readers; React markup is untouched. */
html body [data-contact-dock="true"] > button[aria-controls][aria-expanded] > span {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  pointer-events: none;
}

html body [data-contact-dock="true"] > button[aria-controls][aria-expanded]:focus-visible {
  outline: 3px solid #f3c57c;
  outline-offset: 4px;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  html body [data-contact-dock="true"] > button[aria-controls][aria-expanded]:hover::before {
    transform: translateY(-3px);
  }
}

@media (max-width: 600px) {
  html body [data-contact-dock="true"] {
    right: 14px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  html body [data-contact-dock="true"] > button[aria-controls][aria-expanded] {
    width: 76px;
    height: 72px;
  }
  html body [data-contact-dock="true"] > button[aria-controls][aria-expanded]::before {
    width: 76px;
    height: 51px;
  }
  html body [data-contact-dock="true"] > button[aria-controls][aria-expanded]::after {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body [data-contact-dock="true"] > button[aria-controls][aria-expanded]::before {
    transition: none;
    transform: none;
  }
}
