/* Before-you-go note. Colors match site/css/styles.css (deep water, warm, mist). */

.bwrf-exit {
  border: 0;
  padding: 1.25rem 1.25rem 1rem;
  margin: auto;
  width: min(26.5rem, calc(100vw - 1.5rem));
  max-height: calc(100vh - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  overflow: auto;
  color: #1A1A1A;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(11, 61, 92, 0.22);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  color-scheme: light;
}

.bwrf-exit::backdrop {
  background: rgba(7, 42, 64, 0.64);
}

.bwrf-exit[open] {
  animation: bwrf-exit-in 180ms ease-out;
}

@keyframes bwrf-exit-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.bwrf-exit-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.bwrf-exit h2 {
  margin: 0.35rem 0 0;
  color: #0B3D5C;
  font-size: 1.55rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.bwrf-exit-x {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 2px solid #0B3D5C;
  background: #FFFFFF;
  color: #0B3D5C;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}

.bwrf-exit-x:hover { background: #E8F4F8; }

#bwrf-exit-body {
  margin: 0.85rem 0 1rem;
  color: #1A1A1A;
  font-size: 1.05rem;
}

.bwrf-exit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.bwrf-exit-call,
.bwrf-exit-text {
  flex: 1 1 9.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  text-align: center;
}

.bwrf-exit-call {
  background: #F4A261;
  color: #072A40;
  border-color: #F4A261;
}

.bwrf-exit-call:hover {
  background: #E0762F;
  border-color: #E0762F;
  color: #FFFFFF;
}

.bwrf-exit-text {
  background: #FFFFFF;
  color: #0B3D5C;
  border-color: #0B3D5C;
}

.bwrf-exit-text:hover {
  background: #E8F4F8;
  color: #0B3D5C;
}

.bwrf-exit-no {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin: 0.35rem 0 0;
  padding: 0.55rem 1rem;
  border: 0;
  background: transparent;
  color: #0B3D5C;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.bwrf-exit-no:hover { color: #072A40; }

.bwrf-exit-num {
  margin: 0.15rem 0 0.15rem;
  text-align: center;
  color: #0B3D5C;
  font-weight: 700;
  font-size: 0.98rem;
}

.bwrf-exit:focus,
.bwrf-exit:focus-visible {
  outline: none;
}

.bwrf-exit :focus-visible {
  outline: 3px solid #FFBF47;
  outline-offset: 2px;
}

body.bwrf-exit-open { overflow: hidden; }

@media (max-width: 420px) {
  .bwrf-exit-call,
  .bwrf-exit-text { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .bwrf-exit[open] { animation: none; }
}

@media (forced-colors: active) {
  .bwrf-exit { border: 1px solid CanvasText; }
  .bwrf-exit-call,
  .bwrf-exit-text,
  .bwrf-exit-x { border: 2px solid ButtonText; }
}

@media print {
  .bwrf-exit { display: none !important; }
}
