/* Keep these measurements aligned with AppLoading and custom_snackbar.dart. */
body {
    --feedback-brand: var(--brand, var(--member-brand, #2563EB));
    --feedback-secondary: var(--brand-secondary, var(--member-secondary, #1D4ED8));
    --feedback-ink: var(--ink, var(--member-text, #14243B));
    --feedback-surface: var(--canvas, var(--member-background, #FFFFFF));
}
.church-loading-overlay { box-sizing: border-box; position: fixed; z-index: 2200; inset: 0; display: grid; place-items: center; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 24px; border: 0; background: rgba(0, 0, 0, .54); }
.church-loading-overlay::backdrop { background: transparent; }
.church-loading-overlay[hidden] { display: none; }
.church-loading-card { display: grid; justify-items: center; gap: 10px; width: max-content; max-width: 100%; padding: 20px; border-radius: 12px; background: var(--feedback-brand); color: #fff; text-align: center; }
.church-loading-dots { display: flex; align-items: center; justify-content: center; gap: 4px; width: 60px; height: 60px; }
.church-loading-dots span { --wave-height: 24px; width: 7.8px; height: 7.8px; border-radius: 99px; background: #fff; animation: church-loading-wave 1.6s ease-in-out infinite; }
.church-loading-dots span:nth-child(even) { --wave-height: 42px; }
.church-loading-dots span:nth-child(2) { animation-delay: .144s; }
.church-loading-dots span:nth-child(3) { animation-delay: .288s; }
.church-loading-dots span:nth-child(4) { animation-delay: .432s; }
.church-loading-dots span:nth-child(5) { animation-delay: .576s; }
.church-loading-message { max-width: 100%; font-size: 16px; font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; }
@keyframes church-loading-wave {
    0%, 57%, 100% { height: 7.8px; transform: translateY(0); }
    10%, 18% { height: var(--wave-height); transform: translateY(0); }
    28% { height: var(--wave-height); transform: translateY(-12px); }
    38%, 47% { height: 7.8px; transform: translateY(-12px); }
}
.church-feedback-dialog {
    --feedback-start: color-mix(in srgb, var(--feedback-brand) 92%, white);
    --feedback-end: color-mix(in srgb, var(--feedback-secondary) 94%, black);
    box-sizing: border-box; width: min(360px, calc(100vw - 48px)); max-width: none; max-height: calc(100dvh - 48px); margin: auto; padding: 0; overflow: auto; border: 0; border-radius: 28px;
    background: linear-gradient(135deg, var(--feedback-start), var(--feedback-end)); color: #fff; font-family: inherit; box-shadow: 0 18px 28px rgba(0, 0, 0, .15);
}
.church-feedback-dialog[data-variant="success"] { --feedback-start: var(--feedback-brand); --feedback-end: var(--feedback-secondary); }
.church-feedback-dialog[data-variant="warning"] { --feedback-start: color-mix(in srgb, var(--feedback-brand) 78%, #f59e0b); --feedback-end: color-mix(in srgb, var(--feedback-secondary) 76%, #d97706); }
.church-feedback-dialog[data-variant="error"] { --feedback-start: color-mix(in srgb, var(--feedback-brand) 70%, #b42318); --feedback-end: color-mix(in srgb, var(--feedback-secondary) 66%, #7a271a); }
.church-feedback-dialog::backdrop { background: rgba(0, 0, 0, .18); }
.church-feedback-dialog[open] { animation: church-dialog-in .18s ease-out; }
@keyframes church-dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.church-dialog-body { display: grid; justify-items: center; padding: 24px 22px; text-align: center; }
.church-dialog-icon { display: grid; width: 68px; height: 68px; place-items: center; margin-bottom: 18px; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; }
.church-dialog-icon svg { width: 34px; height: 34px; }
.church-dialog-title { margin: 0; color: inherit; font-size: 20px; font-weight: 700; line-height: 1.3; }
.church-dialog-message { margin: 10px 0 0; color: inherit; font-size: 15px; font-weight: 400; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.church-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; width: 100%; margin-top: 20px; }
.church-dialog-actions:empty { display: none; }
.church-dialog-button { box-sizing: border-box; min-height: 44px; margin: 0; padding: 10px 16px; border: 0; border-radius: 12px; background: transparent; color: var(--feedback-brand); font: inherit; font-size: 14px; font-weight: 600; line-height: 1.4; cursor: pointer; }
.church-dialog-button:hover { background: color-mix(in srgb, var(--feedback-brand) 8%, transparent); }
.church-dialog-button:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.church-feedback-dialog:not([data-confirmation="true"]) .church-dialog-button { width: 100%; padding: 14px; border: 1px solid rgba(255, 255, 255, .75); border-radius: 18px; background: transparent; color: #fff; }
.church-feedback-dialog:not([data-confirmation="true"]) .church-dialog-button:hover { background: rgba(255, 255, 255, .12); }
.church-feedback-dialog[data-confirmation="true"] { width: min(420px, calc(100vw - 48px)); border-radius: 20px; background: var(--feedback-surface); color: var(--feedback-ink); box-shadow: 0 12px 32px rgba(0, 0, 0, .2); }
.church-feedback-dialog[data-confirmation="true"]::backdrop { background: rgba(0, 0, 0, .54); }
.church-feedback-dialog[data-confirmation="true"] .church-dialog-body { justify-items: start; padding: 24px; text-align: left; }
.church-feedback-dialog[data-confirmation="true"] .church-dialog-icon { display: none; }
.church-feedback-dialog[data-confirmation="true"] .church-dialog-message { margin-top: 16px; }
.church-feedback-dialog[data-confirmation="true"] .church-dialog-button-primary { background: var(--feedback-brand); color: var(--member-on-primary, #fff); }
.church-feedback-dialog[data-confirmation="true"] .church-dialog-button-primary:hover { background: color-mix(in srgb, var(--feedback-brand) 90%, black); }
.church-spinner { display: inline-block; flex: none; width: 20px; height: 20px; color: inherit; vertical-align: middle; animation: church-spinner-turn 1.4s linear infinite; }
.church-spinner circle { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 28 56; transform-origin: center; animation: church-spinner-arc 1.4s ease-in-out infinite; }
.church-submitting { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: wait; }
@keyframes church-spinner-turn { to { transform: rotate(360deg); } }
@keyframes church-spinner-arc { 0% { stroke-dasharray: 1 56; stroke-dashoffset: 0; } 50% { stroke-dasharray: 40 56; stroke-dashoffset: -14; } 100% { stroke-dasharray: 1 56; stroke-dashoffset: -55; } }
@media (prefers-reduced-motion: reduce) {
    .church-loading-dots span, .church-feedback-dialog[open], .church-spinner, .church-spinner circle { animation: none; }
    .church-loading-dots span:nth-child(2), .church-loading-dots span:nth-child(4) { height: 24px; }
}
