/* TravelAddon floated contact — SR-112/115/116 brand teal+orange AA; SR-84 open-by-default PC; SR-92 mobile bar */

/* Tour sticky owns bottom CTAs — never paint FAB / mobile WA+Anrufen bar underneath */
body.sr-has-tour-sticky .sr-fab,
body.sr-is-tour:has([data-sr-tour-sticky]) .sr-fab,
html body.sr-fab-on-tours.sr-has-tour-sticky .sr-fab {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.sr-fab {
  --sr-fab-size: 56px;
  --sr-fab-gap: 0.6rem;
  /* Brand fills (match mobile bar): WA cyan / phone terracotta / toggle terracotta */
  --sr-fab-wa: #36d2d3;
  --sr-fab-wa-hover: #2bbfc0;
  --sr-fab-phone: #b85a00;
  --sr-fab-phone-hover: #9a4c00;
  --sr-fab-toggle: #b85a00;
  --sr-fab-toggle-hover: #9a4c00;
  --sr-fab-shadow: 0 10px 28px rgba(15, 17, 20, 0.28);
  --sr-fab-shadow-hover: 0 14px 32px rgba(15, 17, 20, 0.34);

  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 99999;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: var(--sr-fab-gap);
  pointer-events: none;
}

.sr-fab__toggle,
.sr-fab__btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--sr-fab-size);
  height: var(--sr-fab-size);
  min-width: var(--sr-fab-size);
  min-height: var(--sr-fab-size);
  border-radius: 50%;
  border: 0;
  padding: 0;
  margin: 0;
  text-decoration: none !important;
  box-shadow: var(--sr-fab-shadow);
  cursor: pointer;
  line-height: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.sr-fab__toggle svg,
.sr-fab__btn svg {
  display: block;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.sr-fab__toggle:hover,
.sr-fab__btn:hover,
.sr-fab__toggle:focus-visible,
.sr-fab__btn:focus-visible {
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--sr-fab-shadow-hover);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.sr-fab__toggle:active,
.sr-fab__btn:active {
  transform: translateY(0) scale(0.98);
}

/* Primary toggle — orange (not same as WA/phone) */
.sr-fab__toggle {
  background: var(--sr-fab-toggle) !important;
  color: #fff !important;
  font-size: 1.45rem;
  font-weight: 700;
}

.sr-fab__toggle:hover,
.sr-fab__toggle:focus-visible {
  background: var(--sr-fab-toggle-hover) !important;
  color: #fff !important;
}

.sr-fab__btn--wa {
  background: var(--sr-fab-wa) !important;
  /* WA #36d2d3 + white fails AA (~1.86:1) → dark ink */
  color: #0f1114 !important;
}

.sr-fab__btn--wa:hover,
.sr-fab__btn--wa:focus-visible {
  background: var(--sr-fab-wa-hover) !important;
  color: #0f1114 !important;
}

.sr-fab__btn--phone {
  background: var(--sr-fab-phone) !important;
  color: #fff !important;
}

.sr-fab__btn--phone:hover,
.sr-fab__btn--phone:focus-visible {
  background: var(--sr-fab-phone-hover) !important;
  color: #fff !important;
}

/* SR-112: desktop phone = mobile bar terracotta (beats child theme html body fills) */
html body .sr-fab__btn--phone { background: #b85a00 !important; color: #fff !important; }
html body .sr-fab a.sr-fab__btn--phone { background: #b85a00 !important; color: #fff !important; }
html body .sr-fab__btn--wa { background: #36d2d3 !important; color: #0f1114 !important; }
html body .sr-fab a.sr-fab__btn--wa { background: #36d2d3 !important; color: #0f1114 !important; }

/* SR-116 WA brand teal both viewports */
html body .sr-fab__btn--wa,
html body .sr-fab a.sr-fab__btn--wa,
html body .sr-fab[data-sr-fab] .sr-fab__btn--wa,
html body .sr-fab[data-sr-fab] a.sr-fab__btn--wa {
  background: #36d2d3 !important;
  color: #0f1114 !important;
}
html body .sr-fab__btn--wa svg,
html body .sr-fab a.sr-fab__btn--wa svg,
html body .sr-fab[data-sr-fab] .sr-fab__btn--wa svg {
  color: #0f1114 !important;
  fill: currentColor !important;
}
html body .sr-fab__btn--wa:hover,
html body .sr-fab__btn--wa:focus-visible,
html body .sr-fab a.sr-fab__btn--wa:hover,
html body .sr-fab a.sr-fab__btn--wa:focus-visible,
html body .sr-fab[data-sr-fab] .sr-fab__btn--wa:hover,
html body .sr-fab[data-sr-fab] .sr-fab__btn--wa:focus-visible {
  background: #2bbfc0 !important;
  color: #0f1114 !important;
}


html body .sr-fab__btn--phone:hover,
html body .sr-fab__btn--phone:focus-visible,
html body .sr-fab a.sr-fab__btn--phone:hover,
html body .sr-fab a.sr-fab__btn--phone:focus-visible {
  background: #9a4c00 !important;
  color: #fff !important;
}
html body .sr-fab__btn--wa:hover,
html body .sr-fab__btn--wa:focus-visible,
html body .sr-fab a.sr-fab__btn--wa:hover,
html body .sr-fab a.sr-fab__btn--wa:focus-visible {
  background: #2bbfc0 !important;
  color: #0f1114 !important;
}

.sr-fab__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sr-fab-gap);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.sr-fab.is-open .sr-fab__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* SR-84: PC (≥1024) open by default before JS; .is-closed wins after user closes */
@media (min-width: 1024px) {
  .sr-fab[data-sr-fab-open="1"]:not(.is-closed) .sr-fab__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

.sr-fab__label {
  position: absolute;
  right: calc(var(--sr-fab-size) + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 17, 20, 0.9);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.sr-fab__btn {
  position: relative;
}

.sr-fab__btn:hover .sr-fab__label,
.sr-fab__btn:focus-visible .sr-fab__label {
  opacity: 1;
}

/* —— SR-92: mobile = fixed bottom contact bar (WhatsApp + Anrufen); FAB stack hidden —— */
@media (max-width: 1023px) {
  html body .sr-fab[data-sr-fab] {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    gap: 0 !important;
    padding: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    background: #152028 !important;
    box-shadow: 0 -8px 28px rgba(15, 17, 20, 0.28) !important;
    pointer-events: auto !important;
    z-index: 99999 !important;
  }

  /* Beat child theme SR-51 toggle-only mobile rule */
  html body .sr-fab[data-sr-fab] .sr-fab__toggle {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  html body .sr-fab[data-sr-fab] .sr-fab__panel,
  html body .sr-fab[data-sr-fab]:not(.is-open) .sr-fab__panel,
  html body .sr-fab[data-sr-fab].is-closed .sr-fab__panel {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    gap: 0 !important;
    width: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  html body .sr-fab[data-sr-fab] .sr-fab__btn {
    flex: 1 1 50% !important;
    width: auto !important;
    min-width: 0 !important;
    height: 56px !important;
    min-height: 56px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    gap: 0.55rem !important;
    line-height: 1.1 !important;
  }

  html body .sr-fab[data-sr-fab] .sr-fab__btn:hover,
  html body .sr-fab[data-sr-fab] .sr-fab__btn:focus-visible {
    transform: none !important;
    outline-offset: -2px;
  }

  html body .sr-fab[data-sr-fab] .sr-fab__label {
    position: static !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    opacity: 1 !important;
    background: transparent !important;
    color: #fff !important;
    font-size: 0.98rem !important;
    font-weight: 700 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    pointer-events: none !important;
    display: inline !important;
  }

  /* SR-105/SR-112 mobile bar brand (same as desktop FAB).
     WA #36d2d3 + white fails AA (~1.86:1) → dark ink #0f1114 (~10.2:1).
     Phone #b85a00 + white ~4.67:1 AA. */
  html body .sr-fab[data-sr-fab] .sr-fab__btn--wa {
    background: #36d2d3 !important;
    color: #0f1114 !important;
  }
  html body .sr-fab[data-sr-fab] .sr-fab__btn--wa .sr-fab__label {
    color: #0f1114 !important;
  }
  html body .sr-fab[data-sr-fab] .sr-fab__btn--wa:hover,
  html body .sr-fab[data-sr-fab] .sr-fab__btn--wa:focus-visible {
    background: #2bbfc0 !important;
    color: #0f1114 !important;
  }
  html body .sr-fab[data-sr-fab] .sr-fab__btn--phone,
  html body .sr-fab[data-sr-fab] a.sr-fab__btn--phone {
    background: #b85a00 !important;
    color: #fff !important;
  }
  html body .sr-fab[data-sr-fab] .sr-fab__btn--phone .sr-fab__label,
  html body .sr-fab[data-sr-fab] a.sr-fab__btn--phone .sr-fab__label {
    color: #fff !important;
  }
  html body .sr-fab[data-sr-fab] .sr-fab__btn--phone:hover,
  html body .sr-fab[data-sr-fab] .sr-fab__btn--phone:focus-visible,
  html body .sr-fab[data-sr-fab] a.sr-fab__btn--phone:hover,
  html body .sr-fab[data-sr-fab] a.sr-fab__btn--phone:focus-visible {
    background: #9a4c00 !important;
    color: #fff !important;
  }

  /* No side pad for corner FAB — bar owns the bottom edge */
  body:not(.sr-has-tour-sticky) .sr-related-tours,
  body:not(.sr-has-tour-sticky) .sr-article-cta,
  body:not(.sr-has-tour-sticky) .sr-related,
  body:not(.sr-has-tour-sticky) .sr-home-sec--cta_band .sr-home-sec__inner,
  body:not(.sr-has-tour-sticky) .entry-content .wp-block-buttons {
    padding-inline-end: 0;
  }

  /* Clear fixed bar so last content / CTAs stay tappable */
  body:not(.sr-has-tour-sticky) .site-content,
  body:not(.sr-has-tour-sticky) #content,
  body:not(.sr-has-tour-sticky) .ast-container {
    padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 640px) {
  .sr-fab {
    --sr-fab-size: 56px;
  }
}

/* SR-80: do NOT pad home .sr-cards with padding-inline-end — that left-biases
   the mobile card column (~66px empty right gutter for FAB). Home uses symmetric
   section padding + bottom FAB clearance in the child theme instead. */
@media (min-width: 1024px) {
  body:not(.sr-has-tour-sticky) .sr-related-tours,
  body:not(.sr-has-tour-sticky) .sr-article-cta,
  body:not(.sr-has-tour-sticky) .sr-related,
  body:not(.sr-has-tour-sticky) .sr-home-sec--cta_band .sr-home-sec__inner,
  body:not(.sr-has-tour-sticky) .entry-content .wp-block-buttons {
    padding-inline-end: 4.5rem;
  }
}

/* Explicit reset in case an older combined sheet still targets home cards */
body.home .sr-home-sec .sr-cards {
  padding-inline-end: 0;
  padding-right: 0;
}

body.sr-has-home-hero .ast-article-single,
body.sr-has-home-hero .entry-content,
body.home.sr-has-hero .ast-article-single,
body.home.sr-has-hero .entry-content {
  padding-inline-end: 0 !important;
  padding-right: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
  .sr-fab__toggle,
  .sr-fab__btn,
  .sr-fab__panel {
    transition: none;
  }
}


/* SR-98 — ensure mobile bottom bar never covers convert/form CTAs */
@media (max-width: 921px) {
  body:not(.sr-has-tour-sticky) {
    padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
  }
  body:not(.sr-has-tour-sticky) .sr-booking-convert,
  body:not(.sr-has-tour-sticky) .sr-convert-strip__actions {
    position: relative;
    z-index: 1;
  }
}
