/* Shared by every private preview route; mirrors the published site's contact control. */
.ef-contact-widget {
  --ef-contact-right: max(24px, env(safe-area-inset-right));
  --ef-contact-bottom: calc(24px + env(safe-area-inset-bottom));
  --ef-contact-size: 52px;
  --ef-contact-green: #07583f;
  position: fixed;
  right: var(--ef-contact-right);
  bottom: var(--ef-contact-bottom);
  z-index: 45;
  font-family: inherit;
}
.ef-contact-toggle,
.ef-contact-circle {
  width: var(--ef-contact-size);
  height: var(--ef-contact-size);
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: var(--ef-contact-green);
  color: #fff;
  box-shadow: 0 4px 14px #143a2729;
}
.ef-contact-toggle {
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out, cubic-bezier(.23,1,.32,1));
}
.ef-contact-toggle svg,
.ef-contact-circle svg {
  display: block;
  width: 23px;
  height: 23px;
  fill: currentColor;
}
.ef-contact-toggle .ef-contact-close { display: none; fill: none; }
.ef-contact-widget[data-open="true"] .ef-contact-toggle { background: #fff; color: #153b2c; }
.ef-contact-widget[data-open="true"] .ef-contact-phone { display: none; }
.ef-contact-widget[data-open="true"] .ef-contact-close { display: block; }
.ef-contact-options {
  position: fixed;
  inset: auto var(--ef-contact-right) calc(var(--ef-contact-bottom) + var(--ef-contact-size) + 14px) auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #173c2c;
  overflow: visible;
  width: max-content;
  max-width: calc(100vw - 32px);
  transform-origin: bottom right;
  opacity: 0;
  transform: translateY(8px) scale(.97);
  transition: opacity 180ms var(--ease-out, cubic-bezier(.23,1,.32,1)),
              transform 180ms var(--ease-out, cubic-bezier(.23,1,.32,1)),
              display 180ms allow-discrete, overlay 180ms allow-discrete;
}
.ef-contact-options:popover-open,
.ef-contact-options[data-fallback-open="true"] {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  opacity: 1;
  transform: none;
}
@starting-style {
  .ef-contact-options:popover-open { opacity: 0; transform: translateY(8px) scale(.97); }
}
.ef-contact-options::backdrop { background: transparent; }
.ef-contact-option {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 28px;
  color: #173c2c;
  text-decoration: none;
  min-height: 48px;
}
.ef-contact-label {
  background: #fff;
  padding: 10px 16px;
  border-radius: 24px;
  box-shadow: 0 3px 12px #143a2724;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  white-space: nowrap;
}
.ef-contact-circle { width: 48px; height: 48px; transition: transform 160ms var(--ease-out, cubic-bezier(.23,1,.32,1)); }
.ef-contact-toggle:focus-visible,
.ef-contact-option:focus-visible { outline: 3px solid #4f8e6e; outline-offset: 4px; }
.ef-contact-toggle:active,
.ef-contact-option:active .ef-contact-circle { transform: scale(.97); }
/* The non-modal native popover supplies outside-click and Escape dismissal. */
.ef-contact-options[hidden] { display: none; }
body:has(.instagram-gallery-modal__overlay) .ef-contact-widget,
body:has(dialog[open]) .ef-contact-widget { visibility: hidden; }
@media (hover:hover) and (pointer:fine) {
  .ef-contact-toggle:hover,
  .ef-contact-option:hover .ef-contact-circle { transform: scale(1.05); }
  .ef-contact-option:hover .ef-contact-label { color: #07583f; text-decoration: underline; text-underline-offset: 3px; }
}
@media (max-width:600px) {
  .ef-contact-widget {
    --ef-contact-right: max(16px, env(safe-area-inset-right));
    --ef-contact-bottom: calc(16px + env(safe-area-inset-bottom));
    --ef-contact-size: 48px;
  }
  body:has(.mobile-calculate:not([hidden])) .ef-contact-widget {
    --ef-contact-bottom: calc(76px + env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion:reduce) {
  .ef-contact-options { transform: none; transition: opacity 125ms ease, display 125ms allow-discrete, overlay 125ms allow-discrete; }
  .ef-contact-toggle, .ef-contact-circle { transition: none; transform: none!important; }
  @starting-style { .ef-contact-options:popover-open { transform: none; } }
}
@media print { .ef-contact-widget { display: none; } }
