/* Donacja Core – komponenty. Kolory z motywu „donacja” (theme.json), z wartościami awaryjnymi. */
:root {
	--fd-plum: var(--wp--preset--color--plum, #2B1A3A);
	--fd-plum-2: var(--wp--preset--color--plum-2, #3D2A52);
	--fd-red: var(--wp--preset--color--red, #C8102E);
	--fd-red-dark: var(--wp--preset--color--red-dark, #A50D26);
	--fd-coral: var(--wp--preset--color--coral, #FF6F59);
	--fd-lav: var(--wp--preset--color--lavender, #C9B8F2);
	--fd-lav-bg: var(--wp--preset--color--lavender-bg, #EFE9FC);
	--fd-cream: var(--wp--preset--color--cream, #FFF4EA);
	--fd-muted: var(--wp--preset--color--muted, #5E4E6E);
	--fd-border: var(--wp--preset--color--border, #EADFEF);
	--fd-head: var(--wp--preset--font-family--poppins, Poppins, system-ui, sans-serif);
}

.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }

/* Przyciski */
.fd-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; background: var(--fd-red); color: #fff; font-family: var(--fd-head); font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid var(--fd-red); cursor: pointer; }
.fd-btn:hover { background: var(--fd-red-dark); border-color: var(--fd-red-dark); color: #fff; }
.fd-btn--outline { background: transparent; color: var(--fd-plum); border-color: var(--fd-plum); }
.fd-btn--outline:hover { background: var(--fd-plum); color: var(--fd-cream); border-color: var(--fd-plum); }
.fd-btn--coral { background: var(--fd-coral); color: var(--fd-plum); border-color: var(--fd-coral); }
.fd-btn--coral:hover { background: #ff8a78; border-color: #ff8a78; color: var(--fd-plum); }
.fd-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.fd-tag { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--fd-lav); color: var(--fd-plum); font-size: .8125rem; font-weight: 600; }
.fd-empty { color: var(--fd-muted); }
.fd-code { font-family: var(--fd-head); font-weight: 700; letter-spacing: .06em; }

/* Stan krwi */
.fd-blood { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr)); gap: 24px; }
.fd-blood__card { background: #fff; border: 1px solid var(--fd-border); border-radius: 20px; padding: clamp(20px, 3vw, 28px); }
.fd-blood__head { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 20px; }
.fd-blood__head h3 { margin: 0; font-size: 1.25rem; }
.fd-blood__date { margin: 0; font-size: .875rem; color: var(--fd-muted); }
.fd-blood__groups { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 10px; }
.fd-blood__group { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.fd-blood__name { font-family: var(--fd-head); font-size: 1.125rem; }
.fd-blood__level { font-size: .8125rem; color: var(--fd-muted); line-height: 1.3; }
.fd-blood__badge { font-size: .75rem; font-weight: 600; color: #fff; background: var(--fd-red-dark); padding: 1px 8px; border-radius: 999px; }
.fd-blood__note { margin: 20px 0 0; font-size: .875rem; color: var(--fd-muted); }
.fd-blood__legend { margin: 16px 0 0; font-size: .875rem; color: var(--fd-muted); }

.fd-drop { position: relative; display: block; width: 46px; height: 60px; }
.fd-drop::before, .fd-drop__fill { position: absolute; inset: 0; clip-path: path('M23 2 C23 2 4 27 4 39.5 a19 19 0 0 0 38 0 C42 27 23 2 23 2 Z'); }
.fd-drop::before { content: ""; background: var(--fd-lav-bg); }
.fd-drop__fill { background: linear-gradient(to top, var(--fd-red) var(--fd-fill, 0%), transparent var(--fd-fill, 0%)); }
.fd-drop::after { content: ""; position: absolute; inset: 0; background: no-repeat center/100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 60'%3E%3Cpath d='M23 2 C23 2 4 27 4 39.5 a19 19 0 0 0 38 0 C42 27 23 2 23 2 Z' fill='none' stroke='%232B1A3A' stroke-width='1.6'/%3E%3C/svg%3E"); }
.fd-drop--empty::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 60'%3E%3Cpath d='M23 2 C23 2 4 27 4 39.5 a19 19 0 0 0 38 0 C42 27 23 2 23 2 Z' fill='none' stroke='%235E4E6E' stroke-width='1.6' stroke-dasharray='3 3'/%3E%3C/svg%3E"); }
.fd-drop--alert::before { background: #FCE4E8; }
.fd-drop--alert .fd-drop__fill { background: none; }
.fd-drop--alert .fd-drop__fill::after { content: "!"; position: absolute; left: 0; right: 0; bottom: 9px; text-align: center; font: 700 1.25rem/1 var(--fd-head); color: var(--fd-red); }
.fd-drop--alert::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 60'%3E%3Cpath d='M23 2 C23 2 4 27 4 39.5 a19 19 0 0 0 38 0 C42 27 23 2 23 2 Z' fill='none' stroke='%23C8102E' stroke-width='2.5'/%3E%3C/svg%3E"); }
.fd-blood__empty { margin: 0; font-size: .9375rem; color: var(--fd-muted); }
@media (max-width: 520px) { .fd-blood__groups { gap: 16px 6px; } .fd-blood__level { font-size: .75rem; hyphens: auto; overflow-wrap: anywhere; } }
@media (max-width: 340px) { .fd-blood__groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Wydarzenia */
.fd-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 20px; }
.fd-event { display: flex; flex-direction: column; gap: 12px; padding: 24px; border: 1px solid var(--fd-border); border-radius: 20px; background: var(--fd-cream); }
.fd-event--past { opacity: .85; }
.fd-event[hidden] { display: none; }
.fd-event__top { display: flex; gap: 16px; align-items: center; }
.fd-event__date { margin: 0; width: 72px; min-width: 72px; height: 76px; border-radius: 16px; background: var(--fd-plum); color: var(--fd-cream); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.fd-event__day { font-family: var(--fd-head); font-weight: 700; font-size: 1.75rem; }
.fd-event__month { font-size: .8125rem; font-weight: 600; color: var(--fd-coral); }
.fd-event__title { margin: 0; font-size: 1.1875rem; line-height: 1.3; }
.fd-event__title a { color: inherit; text-decoration: none; }
.fd-event__title a:hover { text-decoration: underline; color: var(--fd-red-dark); }
.fd-event__meta { margin: 0; color: var(--fd-muted); font-size: .9375rem; }
.fd-event__actions { margin: auto 0 0; font-size: .9375rem; }

.fd-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.fd-filter__btn { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--fd-plum); background: transparent; color: var(--fd-plum); font: inherit; font-weight: 600; cursor: pointer; }
.fd-filter__btn[aria-pressed="true"] { background: var(--fd-plum); color: var(--fd-cream); }
.fd-calendar__month { margin: 0 0 40px; }
.fd-calendar__month[hidden] { display: none; }
.fd-calendar__label { font-size: 1.5rem; margin: 0 0 16px; }
.fd-calendar__past ul { padding-left: 1.2em; }
.fd-past__date { color: var(--fd-muted); }

.fd-facts { margin-top: 1.5rem !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 12px; margin: 0 0 24px; }
.fd-facts > div { background: #fff; border: 1px solid var(--fd-border); border-radius: 16px; padding: 14px 18px; }
.fd-facts dt { font-size: .8125rem; color: var(--fd-muted); font-weight: 600; }
.fd-facts dd { margin: 4px 0 0; }

/* Relacje */
.fd-reports { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 20px; }
.fd-report { position: relative; border-radius: 20px; overflow: hidden; background: var(--fd-plum-2); color: var(--fd-cream); min-height: 260px; display: flex; flex-direction: column; justify-content: flex-end; }
.fd-report__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fd-report:not(.fd-report--noimg) .fd-report__body { background: rgba(43, 26, 58, .82); }
.fd-report__body { position: relative; padding: 18px 20px; }
.fd-report__date { margin: 0; font-size: .8125rem; color: var(--fd-lav); }
.fd-report__title { margin: 4px 0 0; font-size: 1.125rem; }
.fd-report__title a { color: #fff; text-decoration: none; }
.fd-report__title a::after { content: ""; position: absolute; inset: 0; }
.fd-report__title a:hover { text-decoration: underline; }
.fd-report__title a:focus-visible { outline: none; }
.fd-report:focus-within { outline: 3px solid var(--fd-plum); outline-offset: 2px; box-shadow: 0 0 0 2px var(--fd-cream); }

/* Wpłaty */
.fd-support { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fd-support__item { background: var(--fd-plum-2); color: var(--fd-cream); border-radius: 18px; padding: 18px 22px; }
.fd-support__item--wide { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.fd-support__item--wide .fd-support__label { margin: 0; }
.fd-support__label { margin: 0 0 4px; font-size: .875rem; color: #D9CCE6; }
.fd-support__value { margin: 0; font-family: var(--fd-head); font-weight: 700; font-size: 1.125rem; letter-spacing: .02em; overflow-wrap: anywhere; }
.fd-support__value a { color: var(--fd-coral); }
.fd-support__hint { margin: 0; font-size: .8125rem; color: #D9CCE6; }
.fd-support__soon { margin: 16px 0 0; font-size: .9375rem; color: var(--fd-muted); }
.fd-support-band .fd-support__soon { color: #D9CCE6; }
@media (max-width: 560px) { .fd-support { grid-template-columns: 1fr; } }

.fd-social { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.fd-form-fallback { background: #fff; border: 1px dashed var(--fd-muted); border-radius: 16px; padding: 20px 24px; }

/* Kalendarium: wiersze zamiast kart */
.fd-calendar .fd-events { grid-template-columns: 1fr; gap: 12px; }
.fd-calendar .fd-event { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "date tag act" "date title act" "date meta act"; column-gap: 24px; row-gap: 4px; align-items: center; padding: 18px 24px; background: #fff; }
.fd-calendar .fd-event[hidden] { display: none; }
.fd-calendar .fd-event__top { display: contents; }
.fd-calendar .fd-event__date { grid-area: date; }
.fd-calendar .fd-tag { grid-area: tag; justify-self: start; }
.fd-calendar .fd-event__title { grid-area: title; }
.fd-calendar .fd-event__meta { grid-area: meta; }
.fd-calendar .fd-event__actions { grid-area: act; margin: 0; }
@media (max-width: 640px) {
	.fd-calendar .fd-event { grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "date tag" "title title" "meta meta" "act act"; row-gap: 10px; }
}
