/* Anvoy Give (/give and /g/{PW})
   ---------------------------------------------------------------------------
   Colours are Bootstrap --bs-* variables throughout, never literals, so the
   whole app follows the viewer's light/dark choice with no second palette to
   keep in step. Linked through anvoy_css_link() so filemtime busts the cache.

   NOTE: give-embed.php does NOT use this file. It renders inside somebody
   else's page, inherits none of our stylesheets, and carries its own handful
   of rules inline. If a meter change is made here, make it there too. */

/* --- The meter -------------------------------------------------------------
   Two segments in phase 1: money taken online, and money given by check or
   cash that somebody entered by hand. They are the same hue deliberately --
   a gift is a gift, and the lighter half is a note about how it arrived, not
   a lesser kind of money. A third, matched segment joins them in phase 4. */
.gv-meter {
	height: 1.1rem;
	border-radius: .55rem;
	background: var(--bs-secondary-bg);
	overflow: hidden;
	display: flex;
}
.gv-seg-on  { background: var(--bs-success); }
.gv-seg-off { background: var(--bs-success); opacity: .55; }

.gv-raised {
	font-size: 1.7rem;
	font-weight: 700;
	line-height: 1.1;
	color: var(--bs-success);
}
.gv-sub {
	font-size: .86rem;
	color: var(--bs-secondary-color);
}
/* Compact meters sit inside a list row, where a 1.7rem number would shout. */
.gv-card .gv-raised,
.list-group-item .gv-raised,
.gv-entity-card .gv-raised {
	font-size: 1.1rem;
}
.gv-card .gv-meter,
.list-group-item .gv-meter,
.gv-entity-card .gv-meter {
	height: .55rem;
	border-radius: .3rem;
}

/* --- Headline numbers on the two home screens ---------------------------- */
.gv-stat {
	border: 1px solid var(--bs-border-color);
	border-radius: .5rem;
	padding: .6rem .4rem;
	height: 100%;
}
.gv-stat .n {
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.15;
}
.gv-stat .l {
	font-size: .78rem;
	color: var(--bs-secondary-color);
}

.gv-lbl {
	font-size: .78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--bs-secondary-color);
	margin-bottom: .35rem;
}

/* --- Campaign cards ------------------------------------------------------ */
.gv-card {
	border: 1px solid var(--bs-border-color);
	border-radius: .5rem;
	padding: .8rem .85rem;
}
.gv-card:hover { border-color: var(--bs-success); }

/* --- The kind picker ------------------------------------------------------
   A button rather than a link because each one submits the form above it,
   carrying the name and goal already typed in. Mirrors .ev-tpl in Events. */
.gv-tpl {
	display: flex;
	gap: .7rem;
	align-items: flex-start;
	width: 100%;
	height: 100%;
	padding: .8rem .85rem;
	border: 1px solid var(--bs-border-color);
	border-radius: .5rem;
	background: var(--bs-body-bg);
	color: var(--bs-body-color);
	text-align: left;
}
.gv-tpl:hover {
	border-color: var(--bs-success);
	background: var(--bs-success-bg-subtle);
}
.gv-tpl-ic { color: var(--bs-success); flex: 0 0 auto; }
.gv-tpl-body { display: block; }
.gv-tpl .nm { display: block; font-weight: 600; }
.gv-tpl .ds { display: block; font-size: .82rem; color: var(--bs-secondary-color); }
.gv-new-step { font-size: .95rem; }

/* --- The public page's hero ------------------------------------------------
   Three rungs, the same ladder Events uses: an uploaded photo, the entity's
   own banner, and finally a wash keyed to what kind of campaign it is -- so
   a general fund, a building campaign and a mission trip do not all look like
   the same page with nothing uploaded. */
.gv-hero {
	position: relative;
	min-height: 190px;
	display: flex;
	align-items: flex-end;
	border-radius: .6rem;
	overflow: hidden;
	margin-bottom: 1rem;
	background-size: cover;
	background-position: center;
}
/* The scrim is why a title stays readable whatever photo the admin uploads.
   White here is deliberate: it sits on the gradient, not on the page. */
.gv-scrim {
	position: relative;
	width: 100%;
	padding: 3rem 1rem .9rem;
	background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.45) 55%, rgba(0,0,0,0) 100%);
	color: #fff;
}
.gv-hero-tint {
	min-height: 0;
	border: 1px solid var(--bs-border-color);
}
.gv-hero-plain { width: 100%; padding: 1.6rem 1.1rem 1.3rem; }
.gv-hero-org {
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .06em;
	opacity: .92;
}
.gv-hero-title {
	font-size: 1.7rem;
	font-weight: 700;
	line-height: 1.15;
	margin: 0;
}
.gv-tint-general  { background: var(--bs-success-bg-subtle); }
.gv-tint-campaign { background: var(--bs-primary-bg-subtle); }
.gv-tint-project  { background: var(--bs-warning-bg-subtle); }
.gv-tint-event    { background: var(--bs-info-bg-subtle); }
.gv-tint-person   { background: var(--bs-secondary-bg); }

/* The ask sits in its own card so the Give button never scrolls away with the
   story above it on a phone. */
.gv-ask { border-color: var(--bs-success); }

.gv-story img { max-width: 100%; height: auto; }
.gv-story { overflow-wrap: break-word; }

/* The copy boxes on the Share tab: monospace so a pasted snippet is legible,
   and small, because nobody reads these -- they copy them. */
.gv-copy-src {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: .76rem;
}

/* --- The matched segment, and the offer badge -------------------------------
   Warning-tinted rather than a third green: matched money is real money the
   campaign will receive, but it is not money a donor gave, and the meter should
   not claim otherwise at a glance. */
.gv-seg-mat { background: var(--bs-warning); }

.gv-match {
	display: flex;
	gap: .7rem;
	align-items: center;
	border: 1px solid var(--bs-warning);
	background: var(--bs-warning-bg-subtle);
	border-radius: .5rem;
	padding: .6rem .75rem;
	margin-top: .9rem;
}
.gv-match-x {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1;
	flex: 0 0 auto;
}
/* An exhausted offer stops shouting. It stays on the page -- the sponsor did
   the thing, and the record of it belongs there -- but it is no longer an
   invitation. */
.gv-match-done {
	border-color: var(--bs-border-color);
	background: var(--bs-tertiary-bg);
}
.gv-match-done .gv-match-x { opacity: .45; }

/* --- The year-end statement -------------------------------------------------
   A print page, not a PDF: this repo has no PDF library, and adding one means a
   composer dependency hand-copied to production for every release after, for a
   document whose only job is to be printed or saved -- which every browser
   already does from a page. */
.gv-stmt { max-width: 42rem; }
.gv-stmt table th { font-weight: 600; }

@media print {
	/* Everything that is navigation rather than the document itself. Bootstrap
	   supplies .d-print-none for our own controls; these are the platform's. */
	#SiteNavbar, #AppNavbar, .av-subnav, nav.navbar, footer, .breadcrumb { display: none !important; }
	.gv-stmt { max-width: none; }
	a[href]:after { content: ""; }   /* no "(https://...)" after every link */
}

/* --- The setup checklist ----------------------------------------------------
   Numbered, because it is a sequence rather than a menu: the steps genuinely
   have to happen in order, and only the next one carries a solid button. */
.gv-steps { list-style: none; margin: 0; padding: 0; }
.gv-step {
	display: flex;
	gap: .75rem;
	align-items: flex-start;
	padding: .7rem 0;
	border-top: 1px solid var(--bs-border-color);
}
.gv-steps > .gv-step:first-child { border-top: 0; padding-top: 0; }
.gv-step-mark {
	flex: 0 0 1.9rem;
	height: 1.9rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: .9rem;
	background: var(--bs-secondary-bg);
	color: var(--bs-secondary-color);
}
.gv-step-done .gv-step-mark { background: var(--bs-success); color: #fff; }
.gv-step-next .gv-step-mark { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis);
                              box-shadow: 0 0 0 2px var(--bs-success); }
/* A finished step is a receipt, not an instruction. */
.gv-step-done .gv-step-body { color: var(--bs-secondary-color); }
.gv-step-body { min-width: 0; }
