.guest-assistant {
  --assistant-bottom: calc(1rem + env(safe-area-inset-bottom));
  --assistant-right: 1rem;
  font-family: inherit;
}

.guest-assistant-launch {
  position: fixed;
  right: var(--assistant-right);
  bottom: var(--assistant-bottom);
  z-index: 41;
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 54px;
  padding: .48rem 1rem .48rem .55rem;
  border: 1px solid #ffffff80;
  border-radius: 2rem;
  background: #174d43;
  color: #fff;
  box-shadow: 0 6px 24px #143b4a35;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.2;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.guest-assistant-launch[hidden] { display: none; }
.guest-assistant-launch:hover { background: #206456; }
.guest-assistant-launch small { display: block; margin-top: .15rem; font-size: .7rem; color: #d8f2e7; }
.guest-assistant-icon {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #d8f2e7;
  color: #174d43;
}
.guest-assistant-icon::before {
  content: '';
  position: absolute;
  inset: 10px 9px;
  border: 2px solid currentColor;
  border-radius: 7px 7px 7px 2px;
}

.guest-assistant-panel {
  position: fixed;
  inset: auto var(--assistant-right) var(--assistant-bottom) auto;
  box-sizing: border-box;
  width: min(24rem, calc(100vw - 2rem));
  max-height: calc(100dvh - var(--assistant-bottom) - 1rem);
  margin: 0;
  padding: 0;
  overflow: auto;
  border: 1px solid #c9ded5;
  border-radius: 1.2rem;
  background: #f7faf8;
  color: #143b4a;
  box-shadow: 0 16px 48px #102e4050;
}

.guest-assistant-panel::backdrop { background: #0f2e3938; }
.guest-assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: #174d43;
  color: #fff;
}

.guest-assistant-header p { margin: 0 0 .25rem; color: #d8f2e7; font-size: .75rem; }
.guest-assistant-header h2 { margin: 0; font-size: 1.23rem; line-height: 1.25; color: inherit; }
.guest-assistant-close {
  flex: 0 0 44px;
  height: 44px;
  border: 1px solid #ffffff80;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

.guest-assistant-body { padding: 1rem 1.2rem .5rem; }
.guest-assistant-body > p { margin: 0 0 .7rem; font-size: .88rem; }
.guest-assistant-topic {
  margin: .45rem 0;
  border: 1px solid #d5e4dc;
  border-radius: .65rem;
  background: #fff;
}

.guest-assistant-topic summary {
  box-sizing: border-box;
  min-height: 44px;
  padding: .7rem;
  color: #174d43;
  font-size: .875rem;
  font-weight: 650;
  cursor: pointer;
}

.guest-assistant-topic p { margin: 0; padding: 0 .75rem .75rem; font-size: .875rem; line-height: 1.5; }
.guest-assistant-contact { display: grid; gap: .35rem; padding: .35rem 1.2rem .9rem; }
.guest-assistant-contact a {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  border-radius: .65rem;
  font-size: .875rem;
  font-weight: 650;
  text-decoration: none;
}

.guest-assistant-whatsapp { background: #174d43; color: #fff; }
.guest-assistant-whatsapp:hover { background: #206456; }
.guest-assistant-call { color: #174d43; }
.guest-assistant :focus-visible { outline: 2px solid #2462ad; outline-offset: 2px; }
.guest-assistant-close:focus-visible { outline-color: #fff; }

body:has(.guest-assistant-launch:not([hidden])) .site-music {
  bottom: calc(4.75rem + env(safe-area-inset-bottom));
}

@media (max-width: 800px) {
  body {
    --floating-tools-bottom: calc(12px + env(safe-area-inset-bottom));
    --floating-tools-edge: 12px;
    --floating-tools-size: 44px;
    --floating-tools-gap: 8px;
  }

  .guest-assistant {
    --assistant-bottom: var(--floating-tools-bottom);
    --assistant-right: var(--floating-tools-edge);
  }

  .guest-assistant-launch {
    justify-content: center;
    width: var(--floating-tools-size);
    min-height: var(--floating-tools-size);
    padding: 0;
  }

  .guest-assistant-launch > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .guest-assistant-icon { width: 30px; height: 30px; }
  .guest-assistant-icon::before { inset: 8px 7px; }

  body:has(.guest-assistant-launch:not([hidden])) .site-music {
    inset-inline-end: calc(var(--floating-tools-edge) + var(--floating-tools-size) + var(--floating-tools-gap));
    bottom: var(--floating-tools-bottom);
  }
}

@media (max-width: 560px) {
  body:has(.mobile-contact-bar) {
    --floating-tools-bottom: calc(76px + env(safe-area-inset-bottom));
  }
}
