/* Contact widget (bcw) — photographer card. Isolated from Wfolio. */
.bcw {
  --bcw-ink: #373737;
  --bcw-ink-strong: #2d2d2d;
  --bcw-paper: #ffffff;
  --bcw-muted: #373737;
  --bcw-line: #373737;
  --bcw-focus: #1b4fd8;
  --bcw-fab: rgb(55, 55, 55);
  --bcw-fab-size: 60px;
  --bcw-label-gap: 10px;
  --bcw-z-fab: 45;
  --bcw-z-modal: var(--gs-z-modal, 20040);
  font-family: var(--gs-font-ui, "Graphik", system-ui, -apple-system, sans-serif);
  box-sizing: border-box;
  overflow: visible;
}
.bcw *,
.bcw *::before,
.bcw *::after {
  box-sizing: border-box;
}

html.bcw-noscroll,
html.bcw-noscroll body {
  overflow: hidden;
}

/* ----- Floating trigger ----- */
.bcw-fab {
  position: fixed;
  right: max(20px, env(safe-area-inset-right, 0px));
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  z-index: var(--bcw-z-fab);
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  overflow: visible;
  transition: bottom 200ms ease;
}
.bcw-fab[hidden] {
  display: none !important;
}
.bcw-fab:focus {
  outline: none;
}
.bcw-fab:focus-visible {
  outline: 2px solid var(--bcw-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.bcw-fab__hit {
  position: relative;
  display: block;
  width: var(--bcw-fab-size);
  height: var(--bcw-fab-size);
  min-width: 44px;
  min-height: 44px;
  overflow: visible;
}

/* Invisible 10px bridge left of the circle — keeps hover when crossing the gap.
   Does not extend under the collapsed label, so page content stays clickable. */
.bcw-fab__hit::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 0;
  bottom: 0;
  width: var(--bcw-label-gap);
  pointer-events: auto;
}

.bcw-fab__icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--bcw-fab-size);
  height: var(--bcw-fab-size);
  border-radius: 50%;
  background: var(--bcw-fab);
  color: #fff;
  box-shadow: 0 3px 8px 1px rgba(0, 0, 0, 0.15);
}
.bcw-fab__icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

.bcw-fab__label {
  position: absolute;
  right: calc(100% + var(--bcw-label-gap));
  top: 50%;
  margin: 0;
  padding: 14px 15px;
  height: 45px;
  border-radius: 50px;
  background: var(--bcw-fab);
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  transform: translate(0, -50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 300ms ease,
    opacity 150ms ease,
    visibility 0s linear 150ms;
}

/* Desktop fine pointer: label slides in on hover / keyboard focus */
@media (hover: hover) and (pointer: fine) {
  .bcw-fab:hover .bcw-fab__label,
  .bcw-fab:focus-visible .bcw-fab__label {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(0, -50%);
    transition-delay: 0s, 0s, 0s;
  }
}

/* Touch / coarse: always-visible capsule with full rounding + 10px gap */
@media (hover: none), (pointer: coarse) {
  .bcw-fab__hit {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: var(--bcw-label-gap);
    width: auto;
    height: auto;
    min-height: 44px;
  }
  .bcw-fab__hit::before {
    display: none;
  }
  .bcw-fab__label {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    height: 45px;
    margin: 0;
    border-radius: 50px;
    padding: 14px 15px;
    transition: none;
    order: 1;
  }
  .bcw-fab__icon {
    order: 2;
    flex: 0 0 var(--bcw-fab-size);
  }
}

.bcw.is-sticky-lift .bcw-fab {
  bottom: calc(var(--bcw-sticky-h, 0px) + 12px + env(safe-area-inset-bottom, 0px));
}

/* When sticky panel owns the contact entry, hide floating trigger */
.bcw.is-sticky-owns .bcw-fab {
  display: none !important;
}

/* Card open: keep circle visible under backdrop (Wfolio-like), not interactive.
   Label stays collapsed; do not use [disabled] (it greys the circle). */
.bcw.is-open .bcw-fab {
  pointer-events: none;
}
.bcw.is-open .bcw-fab__label {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translate(0, -50%) !important;
}

.sticky-cta .bcw-sticky[aria-expanded="true"] {
  pointer-events: none;
}

/* ----- Overlay + dialog ----- */
.bcw-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--bcw-z-modal);
  background: rgba(35, 35, 35, 0.6);
  opacity: 0;
  transition: opacity 200ms ease;
}
.bcw-backdrop[hidden] {
  display: none;
}
.bcw.is-open .bcw-backdrop {
  opacity: 1;
}

.bcw-dialog {
  position: fixed;
  z-index: calc(var(--bcw-z-modal) + 1);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.98);
  width: min(600px, calc(100vw - 32px));
  max-width: 600px;
  max-height: min(92dvh, calc(100vh - 32px));
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--bcw-paper);
  color: var(--bcw-ink);
  border-radius: 0;
  padding: 64px;
  box-sizing: border-box;
  box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.06);
  opacity: 0;
  transition: opacity 200ms ease, transform 220ms ease;
}
.bcw-dialog[hidden] {
  display: none;
}
.bcw.is-open .bcw-dialog {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.bcw-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bcw-ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bcw-close:hover {
  color: #000;
}
.bcw-close:focus-visible {
  outline: 2px solid var(--bcw-focus);
  outline-offset: 2px;
}
.bcw-close svg {
  width: 18px;
  height: 18px;
  display: block;
}

.bcw-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}

.bcw-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  background: #eee;
  margin: 0 0 32px;
}
.bcw-avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--bcw-ink-strong);
}

.bcw-name {
  margin: 0 0 8px;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--bcw-ink-strong);
}
.bcw-role {
  margin: 0;
  font-size: 17px;
  font-weight: 400;
  color: var(--bcw-muted);
  line-height: 1.25;
}
.bcw-phone {
  margin: 20px 0 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--bcw-ink-strong);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}
.bcw-phone:hover {
  text-decoration: underline;
}
.bcw-phone:focus-visible {
  outline: 2px solid var(--bcw-focus);
  outline-offset: 2px;
}

.bcw-actions {
  margin-top: 32px;
  width: 300px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bcw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 47px;
  width: 100%;
  padding: 12px 32px;
  border-radius: 0;
  font-size: 17px;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--bcw-line);
  background: transparent;
  color: var(--bcw-ink);
  font-family: inherit;
  line-height: 1.2;
}
.bcw-btn:hover {
  background: rgba(55, 55, 55, 0.04);
}
.bcw-btn:focus-visible {
  outline: 2px solid var(--bcw-focus);
  outline-offset: 2px;
}
.bcw-btn svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: block;
}
.bcw-btn--solid {
  background: #000;
  color: #fff;
  border-color: transparent;
}
.bcw-btn--solid:hover {
  background: #111;
  color: #fff;
}

/* Mobile sheet */
@media (max-width: 768px) {
  .bcw-dialog {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    max-width: none;
    max-height: 92dvh;
    border-radius: 0;
    transform: translateY(12px);
    padding: 40px 24px calc(24px + env(safe-area-inset-bottom, 0px));
  }
  .bcw.is-open .bcw-dialog {
    transform: translateY(0);
  }
  .bcw-name {
    font-size: 28px;
  }
  .bcw-phone {
    font-size: 22px;
  }
  .bcw-role {
    font-size: 16px;
  }
  .bcw-avatar {
    width: 88px;
    height: 88px;
    margin-bottom: 24px;
  }
  .bcw-actions {
    width: min(300px, 100%);
    margin-top: 24px;
  }
}

@media (max-width: 390px) {
  .bcw-dialog {
    padding: 32px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  }
  .bcw-name {
    font-size: 26px;
  }
  .bcw-phone {
    font-size: 20px;
  }
}

@media (max-height: 560px) {
  .bcw-dialog {
    padding: 28px 24px;
  }
  .bcw-avatar {
    width: 72px;
    height: 72px;
    margin-bottom: 16px;
  }
  .bcw-name {
    font-size: 24px;
  }
  .bcw-phone {
    font-size: 20px;
    margin-top: 12px;
  }
  .bcw-actions {
    margin-top: 16px;
    gap: 12px;
  }
  .bcw-btn {
    min-height: 44px;
    padding: 10px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bcw-fab,
  .bcw-fab__label,
  .bcw-backdrop,
  .bcw-dialog {
    transition: none !important;
  }
}

/* Sticky CTA: Contacts replaces TG secondary */
.sticky-cta .bcw-sticky {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.25rem;
  min-height: 46px;
  padding: 0 0.85rem;
  border: 1px solid var(--line, #dcd6cb);
  border-radius: 2px;
  background: transparent;
  font: inherit;
  font-size: var(--fs-xs, 0.75rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted, #5b564e);
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sticky-cta .bcw-sticky:hover {
  color: var(--ink, #16130f);
  border-color: var(--ink, #16130f);
}
.sticky-cta .bcw-sticky:focus-visible {
  outline: 2px solid var(--bcw-focus);
  outline-offset: 2px;
}
