[data-wigney-intro] figure {
  position: relative;
}

button[data-wigney-open][hidden] {
  display: none !important;
}

.ww-booking-options {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: .55rem;
  margin-block: 1rem .5rem;
  scroll-margin-block-start: 6rem;
}
.ww-booking-options > .button {
  min-height: 46px;
  padding: .7rem 1rem;
  font-family: inherit;
  cursor: pointer;
}
.ww-booking-options .ww-booking-chat { background: #304c3d; border-color: #283d32; color: #fff; box-shadow: 0 2px 0 #22372b; }
.ww-booking-options .ww-booking-chat:hover { background: #224033; }
.ww-booking-options .ww-booking-call { background: #fffaf4; border-color: #675f54; color: #211b16; box-shadow: 0 2px 0 #61594e; }
.ww-booking-options .ww-booking-call:hover { background: #eee9df; }
.ww-booking-options > :focus-visible { outline: 3px solid #117b88; outline-offset: 3px; }
.ww-booking-detail { max-width: 52ch; }
.ww-booking-guide { margin-block: .25rem; }
.ww-booking-guide > summary { width: fit-content; padding-block: .45rem; cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }
.actions.ww-booking-secondary { margin-top: .5rem; }
@media (max-width: 540px) {
  .ww-booking-options {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    max-width: 32rem;
  }
  .ww-booking-options > .button { min-width: 0; padding-inline: .55rem; text-align: center; }
  .ww-booking-options > :last-child { grid-column: 1 / -1; }
  .ww-booking-options > [hidden] + .ww-booking-call { grid-column: 1 / -1; }
}
@media (max-width: 359px) {
  .ww-booking-options { grid-template-columns: minmax(0, 1fr); }
}

.ww-wigney-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.ww-wigney-photo:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -6px;
  box-shadow: inset 0 0 0 8px #211c17;
}

.ww-wigney-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1rem;
  min-height: 44px;
  border: 0;
  border-radius: 30px;
  background: #211c17;
  color: #fff;
  font: 600 .9rem/1.4 system-ui, sans-serif;
  cursor: pointer;
}

.ww-wigney-open:hover { background: #8f3d12; }
.ww-wigney-open:focus-visible { outline: 3px solid #117b88; outline-offset: 4px; }

.ww-wigney-action,
.ww-wigney-card {
  appearance: none;
  font: inherit;
  color: inherit;
  text-align: start;
  cursor: pointer;
}

.ww-wigney-action {
  align-self: start;
  width: fit-content;
  background: transparent;
  border: 0;
  padding: .3rem 0;
}

.ww-wigney-action:hover { text-decoration: underline; }
.ww-wigney-action:focus-visible,
.ww-wigney-card:focus-visible { outline: 3px solid #117b88; outline-offset: 3px; }
.ww-wigney-card { width: 100%; }

.ww-wigney-inline-note {
  max-width: 44ch;
  margin: .75rem 0 .5rem;
  color: inherit;
  font: 500 .9375rem/1.45 system-ui, sans-serif;
}

/* CallPad owns the conversation. This stylesheet decorates its native controls. */
:host(#sc-root) .ww-wigney-launcher-note {
  position: fixed;
  right: calc(24px + env(safe-area-inset-right, 0px));
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 2147483000;
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  width: min(282px, calc(100vw - 32px));
  padding: 6px 4px 6px 12px;
  border: 1px solid #d7c5b2;
  border-radius: 12px;
  background: #faf1e6;
  color: #211c17;
  box-shadow: 0 3px 12px rgba(33, 28, 23, .15);
  font: 500 14px/1.4 system-ui, sans-serif;
}
:host(#sc-root) .ww-wigney-launcher-note.at-left {
  right: auto;
  left: calc(24px + env(safe-area-inset-left, 0px));
}
:host(#sc-root) .ww-wigney-launcher-note[hidden],
:host(#sc-root) button[aria-expanded="true"] ~ .ww-wigney-launcher-note {
  display: none;
}
:host(#sc-root) .ww-wigney-launcher-note span { padding-block: 4px; }
:host(#sc-root) .ww-wigney-launcher-note button {
  flex: 0 0 34px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: 22px/1 system-ui, sans-serif;
  cursor: pointer;
}
:host(#sc-root) .ww-wigney-launcher-note button:focus-visible {
  outline: 2px solid #117b88;
}

:host(#sc-root) button[aria-controls="sc-panel"][aria-expanded="false"] > svg {
  display: none;
}

:host(#sc-root) button[aria-controls="sc-panel"][aria-expanded="false"]::before,
:host(#sc-root) #sc-panel:has(> iframe)::after {
  content: "";
  display: block;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e39643 url("/assets/optimized/wigney-reception-935d90f6736a-320.webp") 48% 26% / 360% auto no-repeat;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .5);
}

:host(#sc-root) #sc-panel:has(> iframe)::before {
  content: "Wigney Useful · AI booking assistant";
  position: absolute;
  inset: 0 0 auto;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  height: 42px;
  padding: 4px 14px 4px 52px;
  background: #faf1e6;
  color: #211c17;
  font: 600 14px/1.2 system-ui, sans-serif;
  pointer-events: none;
}

:host(#sc-root) #sc-panel:has(> iframe)::after {
  position: absolute;
  top: 6px;
  left: 12px;
  width: 30px;
  height: 30px;
  pointer-events: none;
}

@supports selector(:has(*)) {
  :host(#sc-root) #sc-panel > iframe {
    position: absolute;
    top: 42px;
    left: 0;
    width: 100%;
    height: calc(100% - 42px);
  }
}

@media (max-height: 460px) {
  :host(#sc-root) #sc-panel:has(> iframe)::before,
  :host(#sc-root) #sc-panel:has(> iframe)::after { display: none; }
  :host(#sc-root) #sc-panel > iframe { top: 0; height: 100%; }
}

@media (max-width: 640px), (max-height: 500px) and (pointer: coarse) {
  html.ww-wigney-chat-open {
    overflow: hidden;
    overscroll-behavior: none;
  }
  .ww-wigney-action { min-height: 44px; }
  :host(#sc-root) .ww-wigney-launcher-note {
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(max(12px, env(safe-area-inset-bottom)) + 56px);
  }
  :host(#sc-root) .ww-wigney-launcher-note.at-left {
    right: auto;
    left: max(12px, env(safe-area-inset-left));
  }
  :host(#sc-root) button[aria-controls="sc-panel"][aria-expanded="false"] {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    width: auto;
    min-width: 48px;
    height: 48px;
    padding: 5px 13px 5px 5px;
    gap: 0;
    font-size: 0;
  }
  :host(#sc-root) button[aria-controls="sc-panel"][aria-expanded="false"] > span {
    display: none;
  }
  :host(#sc-root) button[aria-controls="sc-panel"][aria-expanded="false"]::after {
    content: "Ask Wigney";
    margin-left: 7px;
    font: 600 14px/1 system-ui, sans-serif;
  }
  :host(#sc-root) #sc-panel:has(> iframe) {
    top: calc(var(--wigney-view-top, 0px) + max(6px, env(safe-area-inset-top)));
    right: max(6px, env(safe-area-inset-right));
    bottom: auto;
    left: max(6px, env(safe-area-inset-left));
    width: auto;
    max-width: none;
    height: calc(100vh - 12px);
    height: calc(var(--wigney-view-height, 100dvh) - max(6px, env(safe-area-inset-top)) - max(6px, env(safe-area-inset-bottom)));
    max-height: none;
    min-height: 0;
    border-radius: 16px;
    overflow: hidden;
    overscroll-behavior: contain;
  }
  /* The embedded panel already has a minimise button. Keep the composer unobstructed. */
  :host(#sc-root) #sc-panel:has(> iframe) ~ button[aria-expanded="true"] { display: none; }
}
