/* Scoped to the audited pages on the explicitly allowed staging site. */
body.chs-phone-preview {
  --chs-booking-space: calc(76px + env(safe-area-inset-bottom, 0px));
}

/* Clara service and hours tables; limited to the four named page-content sections. */
body.chs-phone-preview section[aria-labelledby^="clara-"] table {
  box-sizing: border-box;
  width: 100%;
  max-width: 720px;
  table-layout: fixed;
  border-collapse: collapse;
  border-spacing: 0;
  margin: 0 0 28px;
  border: 1px solid #cbd7cf;
  background: #fff;
  color: #222;
}

body.chs-phone-preview section[aria-labelledby^="clara-"] table th,
body.chs-phone-preview section[aria-labelledby^="clara-"] table td {
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #cbd7cf;
  color: #222;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

body.chs-phone-preview section[aria-labelledby^="clara-"] table tr > :first-child {
  width: 70%;
}

body.chs-phone-preview section[aria-labelledby^="clara-"] table tr > :nth-child(2) {
  width: 30%;
}

body.chs-phone-preview section[aria-labelledby^="clara-"] table thead th {
  background: #eef4f0;
  font-weight: 700;
}

body.chs-phone-preview section[aria-labelledby^="clara-"] table tbody th {
  background: #fff;
  font-weight: 500;
}

/* Keep the semantic table name available without repeating the visible H2. */
body.chs-phone-preview section[aria-labelledby^="clara-"] table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Layout polish is limited to the new, explicitly named Clara content sections. */
body.chs-phone-preview section[aria-labelledby^="clara-"] {
  padding-top: clamp(32px, 4vw, 56px);
  padding-bottom: clamp(40px, 5vw, 64px);
}

body.chs-phone-preview section[aria-labelledby^="clara-"] h1 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.2;
}

body.chs-phone-preview section[aria-labelledby^="clara-"] h2 {
  margin-top: 32px;
  margin-bottom: 14px;
  line-height: 1.3;
}

body.chs-phone-preview section[aria-labelledby^="clara-"] p {
  max-width: 72ch;
  margin-bottom: 18px;
  line-height: 1.7;
}

body.chs-phone-preview section[aria-labelledby^="clara-"] .chs-booking-button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: 100%;
  padding: 12px 20px;
  border: 1px solid #15563f;
  border-radius: 4px;
  background: #15563f;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

body.chs-phone-preview section[aria-labelledby^="clara-"] .chs-booking-button:hover {
  background: #103f2f;
  border-color: #103f2f;
  color: #fff;
}

/* Existing menu item only: keep Fortuna's menu positioning and behavior intact. */
body.chs-phone-preview #header #menu-item-23884 > a,
body.chs-phone-preview #header #mobile_menu .menu-item-23884 > a {
  background: #15563f !important;
  border-color: #15563f !important;
  color: #fff !important;
  text-shadow: none;
}

body.chs-phone-preview #header #menu-item-23884 > a:hover,
body.chs-phone-preview #header #mobile_menu .menu-item-23884 > a:hover {
  background: #103f2f !important;
  border-color: #103f2f !important;
  color: #fff !important;
}

body.chs-phone-preview a:focus-visible,
body.chs-phone-preview button:focus-visible,
body.chs-phone-preview input:focus-visible,
body.chs-phone-preview textarea:focus-visible,
body.chs-phone-preview select:focus-visible {
  outline: 3px solid #111 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px #fff !important;
}

body.chs-phone-preview #mobile_menu_toggler.chs-menu-enhanced {
  position: relative;
  width: 44px;
  height: 44px;
  margin-top: 14px;
  background: #fff;
  border-radius: 4px;
}

body.chs-phone-preview #mobile_menu_toggler .chs-menu-button {
  display: block;
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  appearance: none;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid #666;
  border-radius: 4px;
  background: transparent;
  color: #222;
  font: inherit;
  cursor: pointer;
}

body.chs-phone-preview #mobile_menu_toggler .m_nav_ham {
  background: #222;
}

body.chs-phone-preview #mobile_menu_toggler #m_nav_menu {
  padding-top: 6px;
}

body.chs-phone-preview .chs-field-label {
  display: block;
  margin: 0 0 6px;
  color: #333;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

body.chs-phone-preview .wpcf7[data-wpcf7-id="22591"] input:not([type="hidden"]):not([type="submit"]),
body.chs-phone-preview .wpcf7[data-wpcf7-id="22591"] textarea {
  color: #222;
  background-color: #fff;
  border-color: #666;
  font-size: 16px;
}

body.chs-phone-preview .wpcf7[data-wpcf7-id="22591"] input::placeholder,
body.chs-phone-preview .wpcf7[data-wpcf7-id="22591"] textarea::placeholder {
  color: #555;
  opacity: 1;
}

body.chs-phone-preview .wpcf7[data-wpcf7-id="22591"] .wpcf7-submit {
  color: #fff;
  background: #15563f;
  min-height: 44px;
}

body.chs-phone-preview .chs-phone-link {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: inherit;
}

body.chs-phone-preview #footer .chs-phone-link {
  color: #fff;
}

body.chs-phone-preview.page-id-22551 .post_content .chs-phone-link {
  color: #15563f;
}

body.chs-phone-preview #chs-mobile-booking,
body.chs-phone-preview .chs-booking-spacer {
  display: none;
}

@media only screen and (max-width: 1017px) {
  html:has(body.chs-phone-preview) {
    scroll-padding-bottom: calc(var(--chs-booking-scroll-space, 96px) + 20px);
  }

  body.chs-phone-preview .chs-booking-spacer {
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid transparent;
    visibility: hidden;
  }

  body.chs-phone-preview #chs-mobile-booking {
    box-sizing: border-box;
    display: flex;
    position: fixed;
    z-index: 99990;
    left: 0;
    right: 0;
    bottom: 0;
    justify-content: center;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid #ccc;
    box-shadow: 0 -2px 8px rgb(0 0 0 / 12%);
  }

  body.chs-phone-preview #chs-mobile-booking a,
  body.chs-phone-preview .chs-booking-spacer > div {
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    gap: 0 12px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 520px;
    min-height: 54px;
    padding: 10px 14px;
    border-radius: 4px;
    background: #15563f;
    color: #fff;
    font: 700 17px/1.5 Arial, sans-serif;
    text-decoration: none;
  }

  body.chs-phone-preview #chs-mobile-booking a:hover {
    background: #103f2f;
  }

  body.chs-phone-preview #chs-mobile-booking a span,
  body.chs-phone-preview .chs-booking-spacer > div span {
    font-size: 15px;
    font-weight: 400;
    white-space: nowrap;
  }

  body.chs-phone-preview.chs-menu-open #chs-mobile-booking {
    visibility: hidden;
  }

  body.chs-phone-preview a,
  body.chs-phone-preview input,
  body.chs-phone-preview button,
  body.chs-phone-preview textarea {
    scroll-margin-bottom: calc(var(--chs-booking-space) + 20px);
  }
}
