/* RiverSong Church — phone Church Center pop-up (test site).
   Used only on phones/tablets; desktops keep the official Church Center modal. */

.cc-phone-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  flex-direction: column;
  background: #fff;
  color: #14242e;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
  /* Fold fix (2026-11-25): never wider than the visible screen */
  box-sizing: border-box;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  max-width: 100dvw;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

.cc-phone-modal *,
.cc-phone-modal *::before,
.cc-phone-modal *::after {
  box-sizing: border-box;
}

.cc-phone-modal.is-open {
  display: flex;
}

.cc-phone-modal-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
  flex-wrap: wrap;
  min-height: 52px;
  max-width: 100%;
  padding: 0.45rem 0.7rem;
  background: #1c1513;
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cc-phone-modal-title {
  flex: 1 1 auto;
  margin: 0;
  min-width: 0;
  font-family: "Sora", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-phone-modal-fallback,
.cc-phone-modal-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cc-phone-modal-fallback {
  padding: 0.45rem 0.75rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.cc-phone-modal-fallback:hover,
.cc-phone-modal-fallback:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

.cc-phone-modal-close {
  padding: 0.45rem 0.85rem;
  color: #1c1513;
  background: #fff;
  border: 2px solid #fff;
}

.cc-phone-modal-close:hover,
.cc-phone-modal-close:focus-visible {
  background: #e3f4fb;
}

.cc-phone-modal-fallback:focus-visible,
.cc-phone-modal-close:focus-visible {
  outline: 3px solid #00a6e2;
  outline-offset: 2px;
}

.cc-phone-modal-error {
  display: none;
  flex: 0 0 auto;
  padding: 0.75rem 1rem;
  background: #f3f6f8;
  color: #14242e;
  font-size: 0.95rem;
  line-height: 1.45;
  border-bottom: 1px solid rgba(28, 21, 19, 0.12);
}

.cc-phone-modal-error.is-visible {
  display: block;
}

.cc-phone-modal-error a {
  color: #0078a6;
  font-weight: 600;
}

.cc-phone-modal-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

.cc-phone-modal-frame {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  transform-origin: 0 0;
  /* iOS Safari sizes iframes to their content width; this pins it to the screen */
  width: 1px;
  min-width: 100%;
  max-width: 100%;
  min-height: 0;
  display: block;
  border: 0;
  background: #fff;
}

body.cc-phone-modal-lock {
  overflow: hidden;
  touch-action: none;
}

/* Narrow screens (folded phones): smaller header pills so the bar fits */
@media (max-width: 480px) {
  .cc-phone-modal-bar { gap: 0.4rem; padding: 0.4rem 0.5rem; }
  .cc-phone-modal-fallback { padding: 0.4rem 0.6rem; font-size: 0.78rem; }
  .cc-phone-modal-close { padding: 0.4rem 0.7rem; font-size: 0.8rem; }
}
