/* ==========================================================================
   Floating CTA — sitewide contact launcher, fixed bottom-right on every
   screen size. The trigger icon is a CSS mask (currentColor), same technique
   as the language switcher's globe in shared.css — no inline SVG markup and
   no admin-configurable icon field, by design (Phase: Floating CTA).
   ========================================================================== */

.mb-floating-cta {
  position: fixed;
  right: calc(1.25rem + env(safe-area-inset-right, 0px));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.mb-floating-cta__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.4rem;
  background: var(--mb-black);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
/* Keep the black pill / white icon in every interactive state. Without the
   focus/active states the theme's own button:focus rule (which clears the
   background and paints the text orange) wins once the button is clicked open,
   turning the X orange on a transparent pill. */
.mb-floating-cta__trigger:hover,
.mb-floating-cta__trigger:focus,
.mb-floating-cta__trigger:focus-visible,
.mb-floating-cta__trigger:active {
  background: var(--mb-black);
  color: #fff;
}

.mb-floating-cta__icon {
  width: 1.3rem;
  height: 1.3rem;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Open state: the trigger becomes a compact icon-only CLOSE button — the chat
   icon swaps to an X, and the label is dropped (on mobile it is already hidden),
   so a click on the trigger clearly reads as "close". Keyed off aria-expanded,
   which floating-cta.js toggles. */
.mb-floating-cta__trigger[aria-expanded="true"] {
  padding: 0.9rem;
}
.mb-floating-cta__trigger[aria-expanded="true"] .mb-floating-cta__label {
  display: none;
}
.mb-floating-cta__trigger[aria-expanded="true"] .mb-floating-cta__icon {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Icon-only on very small screens to save horizontal space. */
@media (max-width: 480px) {
  .mb-floating-cta__trigger {
    padding: 0.9rem;
  }
  .mb-floating-cta__label {
    display: none;
  }
}

.mb-floating-cta__panel[hidden] {
  display: none;
}

.mb-floating-cta__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-end;
}

.mb-floating-cta__link {
  display: inline-block;
  white-space: nowrap;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: #fff;
  color: var(--mb-black, #000);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}
.mb-floating-cta__link:hover {
  background: var(--mb-black);
  color: #fff;
}
