/* Phulpur Blood Network — public components. Works with any theme; the bundled theme refines it. */
:root {
	--pbn-red: #b3122e;
	--pbn-red-dark: #8c0d22;
	--pbn-rose: #fbf1f2;
	--pbn-rose-line: #efd3d7;
	--pbn-ink: #1f1a1c;
	--pbn-mute: #6b5f62;
	--pbn-line: #e7e1e2;
	--pbn-green: #1e7a4c;
	--pbn-green-bg: #e6f3ec;
	--pbn-amber: #8a4b00;
	--pbn-amber-bg: #fdf0dc;
	--pbn-radius: 10px;
}

.pbn-form, .pbn-cards, .pbn-stats, .pbn-groups, .pbn-alert, .pbn-filter { font-size: 1rem; line-height: 1.55; color: var(--pbn-ink); }
.pbn-form { margin: 0 0 2rem; }
.pbn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem 1.25rem; margin-bottom: 1rem; }
.pbn-grid--search { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
.pbn-field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.pbn-field label { font-weight: 600; font-size: .95rem; }
.pbn-field small, .pbn-help { color: var(--pbn-mute); font-size: .875rem; margin: 0 0 .75rem; }
.pbn-req { color: var(--pbn-red); }
.pbn-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.pbn-form input[type=text], .pbn-form input[type=tel], .pbn-form input[type=email], .pbn-form input[type=number],
.pbn-form input[type=date], .pbn-form select, .pbn-form textarea {
	width: 100%; box-sizing: border-box; min-height: 48px; padding: .6rem .8rem;
	border: 1.5px solid #cfc6c8; border-radius: 8px; background: #fff; color: var(--pbn-ink);
	font: inherit; font-size: 1rem;
}
.pbn-form textarea { min-height: 96px; }
.pbn-form input:focus, .pbn-form select:focus, .pbn-form textarea:focus { outline: 3px solid rgba(179, 18, 46, .25); border-color: var(--pbn-red); outline-offset: 0; }
.pbn-check { display: flex; gap: .6rem; align-items: flex-start; margin: .5rem 0; cursor: pointer; font-size: .975rem; }
.pbn-check input { width: 20px; height: 20px; margin: .15rem 0 0; accent-color: var(--pbn-red); flex: none; }
.pbn-check--urgent { font-weight: 600; color: var(--pbn-red-dark); }

.pbn-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	min-height: 48px; padding: .65rem 1.4rem; border: 0; border-radius: 8px;
	background: var(--pbn-red); color: #fff !important; font: inherit; font-weight: 700; font-size: 1rem;
	text-decoration: none !important; cursor: pointer; margin-top: .5rem;
}
.pbn-btn:hover { background: var(--pbn-red-dark); }
.pbn-btn:focus-visible, .pbn-call:focus-visible, .pbn-group:focus-visible { outline: 3px solid var(--pbn-ink); outline-offset: 2px; }
.pbn-btn--ghost { background: transparent; color: var(--pbn-red) !important; box-shadow: inset 0 0 0 2px var(--pbn-red); }
.pbn-btn--ghost:hover { background: var(--pbn-rose); }
.pbn-field--btn .pbn-btn { width: 100%; margin: 0; }

.pbn-alert { padding: .9rem 1.1rem; border-radius: 8px; margin: 0 0 1.25rem; }
.pbn-alert ul { margin: 0; padding-left: 1.1rem; }
.pbn-alert--error { background: #fdecee; border-left: 4px solid var(--pbn-red); }
.pbn-alert--ok { background: var(--pbn-green-bg); border-left: 4px solid var(--pbn-green); font-weight: 600; }
.pbn-empty { padding: 1.25rem; background: var(--pbn-rose); border-radius: 8px; color: var(--pbn-mute); }
.pbn-count { margin: 0 0 .5rem; color: var(--pbn-mute); }
.pbn-count strong { color: var(--pbn-ink); font-size: 1.15rem; }
.pbn-muted { color: var(--pbn-mute); font-weight: 400; }

/* The blood drop — the one signature shape of the site. */
.pbn-badge {
	position: relative; isolation: isolate; flex: none;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	width: 58px; height: 58px; margin-top: 6px;
	color: #fff; font-weight: 700; font-size: 1.05rem; line-height: 1.1; text-align: center;
}
.pbn-badge::before {
	content: ""; position: absolute; inset: 3px; z-index: -1;
	background: var(--pbn-red); border-radius: 50% 0 50% 50%; transform: rotate(-45deg);
}
.pbn-badge small { font-size: .68rem; font-weight: 600; opacity: .95; }

/* Result lists: rows, not tiles — fast to scan on a phone. */
.pbn-cards { border-top: 1px solid var(--pbn-line); margin: 0 0 1.5rem; }
.pbn-card { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem .25rem; border-bottom: 1px solid var(--pbn-line); }
.pbn-card__body { flex: 1; min-width: 0; }
.pbn-card h3 { margin: 0 0 .15rem; font-size: 1.1rem; line-height: 1.35; }
.pbn-meta { margin: 0; color: var(--pbn-mute); font-size: .925rem; }
.pbn-note { margin: .4rem 0 0; font-size: .925rem; background: var(--pbn-rose); padding: .4rem .6rem; border-radius: 6px; }
.pbn-card__action { flex: none; align-self: center; }
.pbn-tag { display: inline-block; margin-top: .4rem; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--pbn-rose); color: var(--pbn-red-dark); }
.pbn-tag--ok { background: var(--pbn-green-bg); color: var(--pbn-green); }
.pbn-tag--wait { background: var(--pbn-amber-bg); color: var(--pbn-amber); }
.pbn-tag--urgent { background: var(--pbn-red); color: #fff; margin: 0 0 .3rem; }
.pbn-request.is-urgent { box-shadow: inset 4px 0 0 var(--pbn-red); padding-left: 1rem; background: linear-gradient(90deg, var(--pbn-rose), transparent 60%); }

.pbn-call {
	display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .45rem .95rem;
	border-radius: 999px; background: var(--pbn-green); color: #fff !important; font-weight: 700;
	text-decoration: none !important; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.pbn-call svg { width: 18px; height: 18px; }
.pbn-call:hover { background: #17603c; }
.pbn-call--muted { background: #fff; color: var(--pbn-ink) !important; box-shadow: inset 0 0 0 1.5px var(--pbn-line); font-weight: 600; }

.pbn-cards--2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 2rem; border-top: 0; }
.pbn-cards--2 .pbn-card { border-top: 1px solid var(--pbn-line); border-bottom: 0; }
.pbn-h2 { font-size: 1.25rem; margin: 2rem 0 .5rem; }

.pbn-pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1rem 0 2rem; }
.pbn-pager a { padding: .5rem 1rem; border-radius: 8px; box-shadow: inset 0 0 0 1.5px var(--pbn-line); text-decoration: none; color: var(--pbn-ink); }

.pbn-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.pbn-filter a { min-width: 44px; padding: .4rem .8rem; border-radius: 999px; text-align: center; text-decoration: none; color: var(--pbn-ink); box-shadow: inset 0 0 0 1.5px var(--pbn-line); font-weight: 600; }
.pbn-filter a.is-active { background: var(--pbn-ink); color: #fff; box-shadow: none; }

.pbn-stats { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin: 0 0 1.5rem; }
.pbn-stat strong { display: block; font-size: 2rem; line-height: 1.1; color: var(--pbn-red); font-variant-numeric: tabular-nums; }
.pbn-stat span { color: var(--pbn-mute); font-size: .925rem; }

.pbn-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.pbn-group {
	display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .9rem .25rem .7rem;
	border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--pbn-rose-line);
	text-decoration: none !important; color: var(--pbn-ink);
}
.pbn-group b {
	position: relative; isolation: isolate; display: grid; place-items: center;
	width: 56px; height: 56px; margin: 4px 0 .2rem; color: #fff; font-size: 1.1rem;
}
.pbn-group b::before { content: ""; position: absolute; inset: 4px; z-index: -1; background: var(--pbn-red); border-radius: 50% 0 50% 50%; transform: rotate(-45deg); transition: transform .2s ease; }
.pbn-group span { font-size: .85rem; color: var(--pbn-mute); font-variant-numeric: tabular-nums; }
.pbn-group:hover { box-shadow: inset 0 0 0 2px var(--pbn-red); }
.pbn-group:hover b::before { transform: rotate(-45deg) scale(1.08); }

.pbn-lang { display: inline-flex; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--pbn-line); padding: 3px; gap: 2px; }
.pbn-lang a { padding: .25rem .7rem; border-radius: 999px; text-decoration: none !important; color: inherit; font-size: .875rem; font-weight: 600; }
.pbn-lang a.is-active { background: var(--pbn-red); color: #fff; }

@media (max-width: 560px) {
	.pbn-card { flex-wrap: wrap; gap: .75rem; }
	.pbn-card__action { width: 100%; padding-left: calc(58px + .75rem); }
	.pbn-groups { gap: .5rem; }
	.pbn-group b { width: 48px; height: 48px; font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .pbn-group b::before { transition: none; } }
