.ambient-shadow {
  box-shadow: 0 4px 20px rgba(45, 71, 57, 0.08);
}

.btn-accent {
  background-color: #D4A373;
  color: #062014;
}
.btn-accent:hover {
  background-color: #c29161;
}

.chip-info {
  background-color: #ccead6;
  color: #062014;
}
.chip-warning {
  background-color: #ffdcbd;
  color: #2c1600;
}
.chip-urgent {
  background-color: #ffdad6;
  color: #690005;
}
.chip-neutral {
  background-color: #e4e2de;
  color: #1b1c1a;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.material-symbols-outlined.filled {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Hide Material icon name flash (e.g. "dashboard") while the icon font loads / on tab switch. */
.material-symbols-outlined {
  display: inline-block;
  line-height: 1;
  width: 1.25em;
  max-width: 1.25em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
  vertical-align: middle;
  font-display: block;
}

/* Avoid empty shell mounts flashing unstyled layout during admin navigation. */
#cepoch-header:empty,
#cepoch-sidebar:empty,
#cepoch-bottom-nav:empty,
#cepoch-footer:empty {
  display: none;
}

/* Teams-style typing indicator for AI chat bubbles */
.cepoch-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 18px;
  padding: 4px 2px;
}
.cepoch-typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
  animation: cepochTypingDot 1.25s infinite ease-in-out;
}
.cepoch-typing-dots span:nth-child(2) {
  animation-delay: 0.18s;
}
.cepoch-typing-dots span:nth-child(3) {
  animation-delay: 0.36s;
}
@keyframes cepochTypingDot {
  0%,
  80%,
  100% {
    opacity: 0.28;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

body {
  min-height: 100dvh;
  background-color: #fdfbf7;
  overflow-x: hidden;
}

/* Full-bleed fixed website header (avoids side “cut” boxes) */
.cepoch-site-header {
  width: 100%;
  left: 0;
  right: 0;
}

/* Clear fixed desktop header on content pages; home hero stays full-bleed */
@media (min-width: 768px) {
  body[data-cepoch-portal='website'] main {
    padding-top: 5rem;
  }

  body[data-cepoch-portal='website'][data-cepoch-page='home'] main {
    padding-top: 0;
  }

  /* Prayer crisis banner already clears the fixed header (mt-20). */
  body[data-cepoch-portal='website'][data-cepoch-page='prayer'] main {
    padding-top: 2rem;
  }
}

/* Dual UI: desktop website vs phone member-style (match Tailwind md = 768px) */
@media (max-width: 767px) {
  .cepoch-desktop-only {
    display: none !important;
  }

  /* Prevent login flash when a member/guest session already exists */
  html[data-cepoch-phone-boot='home'] #cepoch-phone-login {
    display: none !important;
  }
  html[data-cepoch-phone-boot='home'] #cepoch-phone-home {
    display: block !important;
  }
  html[data-cepoch-phone-boot='home'] #cepoch-phone-home.hidden {
    display: block !important;
  }
  html[data-cepoch-phone-boot='login'] #cepoch-phone-home {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .cepoch-phone-only {
    display: none !important;
  }

  html[data-cepoch-phone-boot] #cepoch-phone-login,
  html[data-cepoch-phone-boot] #cepoch-phone-home {
    /* Let .cepoch-phone-only hide on desktop */
  }
}

@media (max-width: 767px) {
  body[data-cepoch-portal='website'] #cepoch-footer {
    display: none !important;
  }

  /* Phone column on website routes — same look as member app */
  body[data-cepoch-portal='website'] {
    background-color: #e8e4dc;
  }

  body[data-cepoch-portal='website'][data-cepoch-phone-mode='login'] {
    background-color: #fdfbf7;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    min-height: 100dvh;
  }

  body[data-cepoch-portal='website'][data-cepoch-phone-mode='login'] #cepoch-header,
  body[data-cepoch-portal='website'][data-cepoch-phone-mode='login'] #cepoch-bottom-nav {
    display: none !important;
  }

  body[data-cepoch-portal='website'] .cepoch-phone-shell {
    width: 100%;
    max-width: 430px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    background-color: #fdfbf7;
    min-height: 100dvh;
    padding-bottom: 6.5rem !important;
  }

  body[data-cepoch-portal='website'] .cepoch-website-phone-tabbar {
    background-color: #fdfbf7;
  }

  /* Exact member phone column + topbar chrome on website URLs */
  body[data-cepoch-portal='website'] .cepoch-phone-only > main,
  body[data-cepoch-portal='website'] #cepoch-phone-home > main,
  body[data-cepoch-portal='website'] #cepoch-phone-login {
    width: 100%;
    max-width: 430px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    background-color: #fdfbf7;
    min-height: 100dvh;
  }

  body[data-cepoch-portal='website'] .cepoch-member-topbar,
  body[data-cepoch-portal='website'] .cepoch-member-tabbar {
    background-color: #fdfbf7;
  }
}

@media (min-width: 768px) {
  body[data-cepoch-portal='website'] {
    background-color: #fdfbf7;
  }
}

/* —— Admin shell: keep chrome clear of fixed sidebar —— */
body[data-cepoch-portal='admin'] {
  overflow-x: hidden;
}

@media (min-width: 768px) {
  body[data-cepoch-portal='admin'] #cepoch-header > header {
    margin-left: 16rem;
  }
}

/* —— Member mobile app shell —— */
body[data-cepoch-portal='member'] {
  min-height: 100dvh;
  background-color: #e8e4dc;
  overflow-x: hidden;
}

body[data-cepoch-portal='member'][data-cepoch-shell='off'] {
  background-color: #fdfbf7;
}

body[data-cepoch-portal='member'] main {
  padding-bottom: 6.5rem !important;
  width: 100%;
  max-width: 430px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  background-color: #fdfbf7;
  min-height: 100dvh;
}

body[data-cepoch-portal='member'][data-cepoch-page='home'] > header {
  width: 100%;
  max-width: 430px;
  margin-left: auto;
  margin-right: auto;
  background-color: #fdfbf7;
}

body[data-cepoch-portal='member'][data-cepoch-page='login'] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  min-height: 100dvh;
}

body[data-cepoch-portal='member'] .cepoch-member-topbar,
body[data-cepoch-portal='member'] .cepoch-member-tabbar {
  background-color: #fdfbf7;
}

/* Homepage hero: fill viewport without clipping info chips */
.cepoch-home-hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

/* Member Give confirmation (needed on website phone partial — page <style> is stripped) */
#confirmation-screen {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}
#confirmation-screen.active {
  display: flex;
  opacity: 1;
}
#giving-form.hidden-form {
  display: none;
}
.preset-btn.selected {
  background-color: #7d562d;
  color: #ffffff;
  border-color: #7d562d;
}
.fund-chip.selected {
  background-color: #2d4739;
  color: #fdfbf7;
  border-color: #2d4739;
}

/* Member phone chat sheet — keep behind-chrome quiet while open */
body.cepoch-member-chat-open {
  overflow: hidden;
}
#ai-chat-panel .cepoch-ai-chat-scroll {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
