.lchs-giving {
    --lchs-navy: #19396c;
    --lchs-ink: #17293e;
    --lchs-muted: #475b74;
    --lchs-match: #72b8ef;
    --lchs-border: #d8e2ee;
    --lchs-width: 1200px;
    box-sizing: border-box;
    width: min(var(--lchs-width), calc(100% - 2 * clamp(1rem, 4vw, 3.5rem)));
    margin: clamp(1.75rem, 4.5vw, 4rem) auto;
    color: var(--lchs-ink);
    font-family: "MonaSans-Regular", "Montserrat", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.55;
}

.lchs-giving *, .lchs-giving *::before, .lchs-giving *::after { box-sizing: border-box; }
.lchs-giving[hidden], .lchs-giving [hidden] { display: none !important; }

.lchs-giving__card {
    padding: clamp(1.25rem, 4vw, 3.25rem);
    border: 1px solid var(--lchs-border);
    border-top: 4px solid var(--lchs-navy);
    border-radius: 6px;
    background: #f5f8fc;
}

.lchs-giving .lchs-giving__header {
    display: flex;
    gap: 1.25rem 2rem;
    align-items: end;
    justify-content: space-between;
}

.lchs-giving h2 {
    margin: 0 0 .35em;
    color: var(--lchs-navy);
    font: 400 clamp(1.6rem, 3.2vw, 2.75rem)/1.17 "Cinzel", Georgia, serif;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.lchs-giving p { margin: 0 0 1em; }

.lchs-giving .lchs-giving__eyebrow {
    margin: 0 0 .7rem;
    color: var(--lchs-muted);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.lchs-giving .lchs-giving__tagline { margin: 0; color: var(--lchs-muted); }
.lchs-giving .lchs-giving__preview { margin: 0 0 .5rem; font-weight: 700; }

.lchs-giving__actions { display: flex; flex-wrap: wrap; gap: .65rem; flex: 0 0 auto; }

.lchs-giving .lchs-giving__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .65rem 1.25rem;
    border: 1px solid var(--lchs-navy);
    border-radius: 30px;
    background: transparent;
    color: var(--lchs-navy);
    font: 700 .95rem/1.3 "MonaSans-Regular", "Montserrat", Arial, sans-serif;
    letter-spacing: normal;
    text-decoration: none;
    text-transform: none;
    cursor: pointer;
}

.lchs-giving .lchs-giving__button--primary { background: var(--lchs-navy); color: white; }
.lchs-giving .lchs-giving__button:hover { background: #e4eef9; color: var(--lchs-navy); }
.lchs-giving .lchs-giving__button--primary:hover { background: #102b52; color: white; }
.lchs-giving :is(a, button):focus-visible { outline: 2px solid #006dd2; outline-offset: 3px; }

.lchs-giving__progress { margin-top: clamp(1.4rem, 3vw, 2.25rem); }
.lchs-giving__amounts { display: flex; justify-content: space-between; gap: .45rem 1.25rem; flex-wrap: wrap; align-items: baseline; margin-bottom: .6rem; }
.lchs-giving__amounts strong, .lchs-giving__result-total strong {
    color: var(--lchs-navy);
    font-size: clamp(1.6rem, 3.1vw, 2.6rem);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.lchs-giving__goal { color: var(--lchs-muted); font-weight: 700; }

.lchs-giving__track {
    display: flex;
    height: 22px;
    overflow: hidden;
    border: 1px solid #d0ddec;
    border-radius: 20px;
    background: #e2eaf4;
}
.lchs-giving__segment { flex: 0 0 auto; width: 0; }
.lchs-giving__segment--gifts, .lchs-giving__swatch--gifts { background: var(--lchs-navy); }
.lchs-giving__segment--match, .lchs-giving__swatch--match { background: var(--lchs-match); }

.lchs-giving__legend { display: flex; flex-wrap: wrap; gap: .35rem 1.35rem; margin-top: .7rem; }
.lchs-giving__swatch { display: inline-block; width: .78rem; height: .78rem; margin-inline-end: .4rem; border: 1px solid #19396c; border-radius: 50%; }
.lchs-giving .lchs-giving__note { margin: .75rem 0 0; color: var(--lchs-muted); }
.lchs-giving .lchs-giving__timestamp { margin: .65rem 0 0; color: var(--lchs-muted); font-size: .8rem; }

.lchs-giving .lchs-giving__dialog {
    position: fixed;
    inset: 0;
    width: min(43rem, calc(100% - 2rem));
    max-height: calc(100% - 2rem);
    padding: 0;
    margin: auto;
    overflow: auto;
    border: 1px solid var(--lchs-border);
    border-top: 4px solid var(--lchs-navy);
    border-radius: 6px;
    background: white;
    color: var(--lchs-ink);
    box-shadow: 0 14px 50px #0d203849;
}

.lchs-giving__dialog:not([open]) { display: none; }
.lchs-giving__dialog::backdrop { background: rgb(13 29 50 / 70%); }
.lchs-giving__dialog-content { position: relative; padding: clamp(1.25rem, 4vw, 2.5rem); }
.lchs-giving__dialog-content h2 { padding-right: 2rem; font-size: clamp(1.45rem, 3vw, 2.25rem); }
.lchs-giving__dialog-content ul { margin: 0 0 1.1em; padding-inline-start: 1.25em; list-style: disc; }
.lchs-giving__dialog-content .lchs-giving__tagline { margin: 0 0 1em; font-weight: 700; }
.lchs-giving__dialog-content p:last-of-type { margin-bottom: 0; }
.lchs-giving__dialog-content a.lchs-giving__button { margin-top: 1.1rem; }

.lchs-giving .lchs-giving__close {
    position: absolute;
    top: .65rem;
    right: .65rem;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #edf3fa;
    color: var(--lchs-navy);
    font: 1.65rem/1 Arial, sans-serif;
    cursor: pointer;
}
.lchs-giving .lchs-giving__close:hover { background: #dce9f6; }

@media (max-width: 800px) {
    .lchs-giving .lchs-giving__header { display: block; }
    .lchs-giving__actions { margin-top: 1rem; }
}

.lchs-giving--site-only { display: contents; }

.lchs-giving .lchs-giving__mini {
    position: fixed;
    z-index: 1000;
    inset-inline-start: calc(.75rem + env(safe-area-inset-left, 0px));
    bottom: calc(.75rem + env(safe-area-inset-bottom, 0px));
    display: grid;
    gap: .3rem;
    width: min(12rem, calc(100vw - 1.5rem));
    padding: .55rem .75rem;
    border: 1px solid #d8e2ee;
    border-radius: 9px;
    background: white;
    box-shadow: 0 3px 18px #0d203833;
    color: var(--lchs-navy);
    font: 700 .83rem/1.2 "MonaSans-Regular", "Montserrat", Arial, sans-serif;
    text-align: start;
    text-transform: none;
    cursor: pointer;
}

.lchs-giving .lchs-giving__mini:hover { background: #f5f8fc; }
.lchs-giving__mini-title { display: flex; justify-content: space-between; gap: .25rem; }
.lchs-giving__track.lchs-giving__mini-track { height: 8px; }
.lchs-giving__mini-total { color: var(--lchs-muted); font-size: .76rem; }

.lchs-giving .lchs-giving__dialog {
    max-height: calc(100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    overscroll-behavior: contain;
}

html.lchs-giving-modal-open { overflow: hidden; }
.lchs-giving__dialog--popup .lchs-giving__actions { margin-top: 1.25rem; }
.lchs-giving__dialog--popup .lchs-giving__progress { margin-top: 1.25rem; }
.lchs-giving__dialog--popup .lchs-giving__eyebrow { padding-right: 2.25rem; }

@media (max-width: 480px) {
    .lchs-giving .lchs-giving__mini { width: min(10.5rem, calc(100vw - 1.5rem)); }
    .lchs-giving__dialog--popup .lchs-giving__actions { display: grid; grid-template-columns: 1fr 1fr; }
    .lchs-giving__dialog--popup .lchs-giving__button { padding-inline: .5rem; }
}
