.reher-callback {
  width: min(100%, 48rem);
  max-width: none;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.8);
  background: var(--card);
  color: var(--card-foreground);
  box-shadow: var(--shadow-xl);
}

.reher-callback::backdrop {
  background: color-mix(in srgb, var(--foreground) 58%, transparent);
  backdrop-filter: blur(0.25rem);
}

.reher-callback.is-enhanced {
  --reher-callback-max-height: calc(
    var(--reher-callback-viewport-height, 100dvh) -
      max(1rem, env(safe-area-inset-top))
  );

  max-height: var(--reher-callback-max-height);
  overflow: hidden;
}

.reher-callback[open]:not(.is-enhanced) {
  position: relative;
  inset: auto;
  display: block;
  margin: 2rem auto;
  box-shadow: none;
}

.reher-callback__surface {
  display: flex;
  max-height: calc(var(--reher-callback-max-height, 100dvh) - 2px);
  flex-direction: column;
  overflow: hidden;
}

.reher-callback:not(.is-enhanced) .reher-callback__surface {
  max-height: none;
}

.reher-callback__header {
  display: flex;
  flex: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.reher-callback__eyebrow {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.reher-callback__header h2 {
  margin: 0.25rem 0 0;
  color: inherit;
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.reher-callback__close {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--background);
  color: var(--foreground);
  cursor: pointer;
}

.reher-callback.is-enhanced .reher-callback__close {
  display: inline-flex;
}

.reher-callback__close:hover {
  background: var(--accent);
}

.reher-callback__close:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.reher-callback__close svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-width: 2;
}

.reher-callback__body {
  min-height: 0;
  padding: 1.25rem max(1.25rem, env(safe-area-inset-right))
    max(1.25rem, env(safe-area-inset-bottom))
    max(1.25rem, env(safe-area-inset-left));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.reher-callback__intro {
  margin: 0 0 1.25rem;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  line-height: 1.6;
}

body.is-reher-callback-open {
  overflow: hidden;
}

@media (max-width: 47.999rem) {
  .reher-callback.is-enhanced {
    inset: auto 0 0;
    width: 100%;
    margin: auto 0 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: calc(var(--radius) * 1.8) calc(var(--radius) * 1.8) 0 0;
  }
}

@media (min-width: 48rem) {
  .reher-callback.is-enhanced {
    inset: 0;
    width: min(48rem, calc(100% - 2rem));
    margin: auto;
  }

  .reher-callback__header,
  .reher-callback__body {
    padding-right: 1.75rem;
    padding-left: 1.75rem;
  }
}
