/* Scoped styles: independent of both sites' themes and typography. */
.parish-assistant {
  color-scheme: light;
  font: 1rem/1.5 Arial, sans-serif;
  color: #26332e;
}

.parish-assistant *, .parish-assistant *::before, .parish-assistant *::after {
  box-sizing: border-box;
}

.parish-assistant button, .parish-assistant input, .parish-assistant select {
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.parish-assistant button {
  cursor: pointer;
}

.parish-assistant button:disabled {
  cursor: wait;
  opacity: .65;
}

.parish-assistant :focus-visible {
  outline: 3px solid #a97620;
  outline-offset: 3px;
}

/* Round launcher: deep green, thin gold rim, light dialogue icon. */
.parish-assistant .pa-launcher {
  --pa-launcher-size: 62px;
  --pa-launcher-offset: 22px;

  position: fixed;
  z-index: 900;
  right: var(--pa-launcher-offset);
  bottom: max(var(--pa-launcher-offset), env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--pa-launcher-size);
  height: var(--pa-launcher-size);
  padding: 0;
  border: 1px solid #c9a65c;
  border-radius: 50%;
  color: #f6efdf;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.16), transparent 58%),
    linear-gradient(160deg, #2d5848 0%, #1f4235 55%, #15302a 100%);
  box-shadow:
    0 0 0 3px rgba(201, 166, 92, 0.18),
    0 10px 26px rgba(10, 24, 18, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.parish-assistant .pa-launcher-icon {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}

.parish-assistant .pa-launcher-icon__dots {
  stroke-width: 2.4;
}

.parish-assistant .pa-launcher:hover,
.parish-assistant .pa-launcher:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 4px rgba(201, 166, 92, 0.28),
    0 14px 30px rgba(10, 24, 18, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.parish-assistant .pa-launcher:hover .pa-launcher-icon {
  transform: scale(1.06);
}

.parish-assistant .pa-launcher:active {
  transform: translateY(0) scale(0.96);
  box-shadow:
    0 0 0 3px rgba(201, 166, 92, 0.22),
    0 6px 16px rgba(10, 24, 18, 0.3);
}

.parish-assistant .pa-launcher[aria-expanded="true"] {
  visibility: hidden;
}

/* Hint above the launcher: shown on hover and keyboard focus only. */
.parish-assistant .pa-hint {
  position: fixed;
  z-index: 899;
  right: 22px;
  bottom: calc(max(22px, env(safe-area-inset-bottom)) + 74px);
  display: grid;
  gap: 2px;
  max-width: min(280px, calc(100vw - 44px));
  padding: 10px 14px;
  border: 1px solid #d9d2c1;
  border-radius: 14px;
  color: #1d2f27;
  background: #fffdf7;
  box-shadow: 0 10px 28px rgba(10, 24, 18, 0.18);
  font-size: 0.9375rem;
  line-height: 1.35;
  text-align: right;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}

.parish-assistant .pa-hint::after {
  content: '';
  position: absolute;
  right: 22px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border: 1px solid #d9d2c1;
  border-width: 0 1px 1px 0;
  background: #fffdf7;
  transform: rotate(45deg);
}

.parish-assistant .pa-hint__title {
  font-weight: 700;
}

.parish-assistant .pa-hint__topics {
  color: #4a5a52;
  font-size: 0.875rem;
}

.parish-assistant .pa-launcher:hover + .pa-hint,
.parish-assistant .pa-launcher:focus-visible + .pa-hint {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (hover: none) {
  /* On touch screens the first tap opens the assistant; no hint step. */
  .parish-assistant .pa-hint {
    display: none;
  }
}

.parish-assistant .pa-dialog {
  position: fixed;
  inset: auto 20px 20px auto;
  width: 440px;
  max-width: calc(100vw - 32px);
  height: 700px;
  max-height: calc(100dvh - 40px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: #26332e;
  background: #faf8f3;
  border: 1px solid #c7cec8;
  border-radius: 20px;
  box-shadow: 0 20px 70px #0004;
}

.parish-assistant .pa-dialog[open] {
  display: flex;
  flex-direction: column;
}

.parish-assistant .pa-dialog::backdrop {
  background: #14241e50;
}

.parish-assistant .pa-header {
  display: flex;
  flex-shrink: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 21px 20px 18px;
  background: #254b3e;
  color: #fff;
}

.parish-assistant .pa-heading {
  min-width: 0;
}

.parish-assistant .pa-title {
  font: 600 1.4375rem/1.25 Georgia, serif;
  color: #fff;
  margin: 6px 0 0;
}

.parish-assistant .pa-eyebrow {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #ecf0e9;
  margin: 0;
}

.parish-assistant .pa-close {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #8da99a;
  border-radius: 50%;
  color: #fff;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
}

.parish-assistant .pa-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid #d9dfd7;
}

.parish-assistant .pa-language select {
  border: 1px solid #b9c5bc;
  border-radius: 7px;
  background: #fff;
  color: #26332e;
  padding: 6px;
  min-height: 40px;
  max-width: 145px;
  font-size: 0.875rem;
}

.parish-assistant .pa-clear {
  background: transparent;
  color: #354c40;
  border: 0;
  padding: 9px 5px;
  font-size: 0.8125rem;
  min-height: 40px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.parish-assistant .pa-mode {
  margin: 0;
  padding: 9px 18px 0;
  color: #566057;
  font-size: 0.8125rem;
}

.parish-assistant .pa-transcript {
  position: relative;
  flex: 1 1 auto;
  min-height: 70px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
}

.parish-assistant .pa-message {
  margin: 0 20px 14px 0;
  padding: 13px 14px;
  border: 1px solid #d9dfd7;
  border-radius: 4px 16px 16px;
  background: #fff;
  overflow-wrap: anywhere;
}

.parish-assistant .pa-message--user {
  margin-right: 0;
  margin-left: 32px;
  border: 1px solid #c9d8cc;
  border-radius: 16px 4px 16px 16px;
  background: #eaf0e8;
}

.parish-assistant .pa-author {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #53604e;
  margin-bottom: 5px;
}

.parish-assistant .pa-text {
  margin: 5px 0;
  color: #26332e;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.parish-assistant .pa-events {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: grid;
  gap: 12px;
}

.parish-assistant .pa-event {
  border-left: 3px solid #a97620;
  padding: 0 0 0 11px;
  margin: 0;
}

.parish-assistant .pa-event-date {
  display: block;
  color: #566057;
  font-size: 0.8125rem;
}

.parish-assistant .pa-event-title {
  margin: 3px 0;
  font-size: 0.9375rem;
  line-height: 1.4;
  font-weight: 700;
  color: #26332e;
}

.parish-assistant .pa-event-note, .parish-assistant .pa-meta {
  margin: 4px 0;
  color: #566057;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.parish-assistant .pa-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 13px;
  margin-top: 10px;
}

.parish-assistant .pa-link {
  color: #245340;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.parish-assistant .pa-footer {
  flex-shrink: 0;
  padding: 12px 16px 14px;
  border-top: 1px solid #d9dfd7;
  background: #faf8f3;
}

.parish-assistant .pa-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.parish-assistant .pa-chip {
  padding: 7px 10px;
  min-height: 36px;
  border: 1px solid #b6c6b9;
  border-radius: 14px;
  background: #fff;
  color: #254b3e;
  font-size: 0.8125rem;
  line-height: 1.4;
  text-align: left;
}

.parish-assistant .pa-chip:hover {
  background: #eaf0e8;
}

.parish-assistant .pa-status {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #566057;
  margin: 7px 0;
}

.parish-assistant .pa-status:empty {
  display: none;
}

.parish-assistant .pa-form {
  display: flex;
  align-items: stretch;
  gap: 7px;
  margin-top: 11px;
}

.parish-assistant .pa-input {
  width: 100%;
  min-width: 0;
  border: 1px solid #aab9ae;
  border-radius: 10px;
  padding: 11px;
  background: #fff;
  color: #26332e;
  font-size: 1rem;
}

.parish-assistant .pa-input::placeholder {
  color: #656b64;
}

.parish-assistant .pa-send {
  border: 1px solid #254b3e;
  border-radius: 10px;
  background: #254b3e;
  color: #fff;
  padding: 9px 12px;
  font-size: 0.875rem;
  min-height: 46px;
}

.parish-assistant .pa-privacy {
  margin: 10px 0 0;
  color: #566057;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.parish-assistant .pa-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 520px) {
  .parish-assistant .pa-suggestions {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .parish-assistant .pa-chip {
    flex-shrink: 0;
  }

  .parish-assistant .pa-dialog {
    inset: auto 8px max(8px, env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 16px;
  }

  .parish-assistant .pa-header {
    padding: 15px;
  }

  .parish-assistant .pa-footer {
    padding: 10px 12px 12px;
  }

  .parish-assistant .pa-transcript {
    padding: 12px;
  }

  .parish-assistant .pa-title {
    font-size: 1.3125rem;
  }

  .parish-assistant .pa-launcher {
    --pa-launcher-size: 58px;
    --pa-launcher-offset: 14px;
  }

  .parish-assistant .pa-hint {
    right: 14px;
    bottom: calc(max(14px, env(safe-area-inset-bottom)) + 68px);
  }
}

/* While the cookie banner is on screen the launcher moves above it on
   narrow screens, where the banner spans the full width. */
@media (max-width: 600px) {
  .has-consent-banner .parish-assistant .pa-launcher {
    bottom: calc(max(14px, env(safe-area-inset-bottom)) + var(--consent-height, 0px) + 12px);
  }

  .has-consent-banner .parish-assistant .pa-hint {
    bottom: calc(max(14px, env(safe-area-inset-bottom)) + var(--consent-height, 0px) + 80px);
  }
}

@media (max-height: 520px) {
  .parish-assistant .pa-privacy, .parish-assistant .pa-eyebrow, .parish-assistant .pa-mode {
    display: none;
  }

  .parish-assistant .pa-suggestions {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .parish-assistant .pa-chip {
    flex-shrink: 0;
  }

  .parish-assistant .pa-header {
    padding: 8px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .parish-assistant * {
    transition: none;
    scroll-behavior: auto;
  }

  .parish-assistant .pa-launcher:hover,
  .parish-assistant .pa-launcher:focus-visible,
  .parish-assistant .pa-launcher:active,
  .parish-assistant .pa-launcher:hover .pa-launcher-icon {
    transform: none;
  }
}

@media print {
  .parish-assistant {
    display: none;
  }
}

/* Optional online assistant: accessible forms in the existing scrolling panel. */
.parish-assistant [hidden] {
  display: none !important;
}

.parish-assistant textarea {
  font: inherit;
  resize: vertical;
}

.parish-assistant .pa-online-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px 0;
  flex-shrink: 0;
}

.parish-assistant .pa-online-panel {
  min-width: 0;
}

.parish-assistant .pa-request-form {
  display: grid;
  gap: 14px;
  position: relative;
}

.parish-assistant .pa-field {
  display: grid;
  gap: 6px;
  font-size: 0.9375rem;
}

.parish-assistant .pa-field select {
  max-width: 100%;
}

.parish-assistant .pa-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
  font-size: 0.9375rem;
}

.parish-assistant .pa-consent input {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin: 3px 0;
}

.parish-assistant .pa-data {
  margin: 12px 0;
  font-size: 0.875rem;
}

.parish-assistant .pa-data summary {
  cursor: pointer;
  padding: 8px 0;
}

.parish-assistant .pa-preserve {
  white-space: pre-wrap;
}

.parish-assistant .pa-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

