/*
 * The Pocket look, on the public website.
 *
 * The members' area and the office open every screen with a band in the
 * church's own color, sit their cards on the page with no outline, and use
 * pills for anything you choose between. A visitor who signs in should feel
 * they are still in the same place, so the website borrows those three
 * things and nothing else: the church's typeface, photographs and page
 * designs are its own.
 *
 * Loaded last, so it restates rather than rewrites the sheets before it.
 */

/* ---------- The band a page opens with ---------------------------------- */

.cong-page-head {
	border-radius: 0 0 28px 28px;
	background: var(--wp--preset--color--ink);
	color: #fff;
}

.cong-page-head :where(h1, h2, h3, p, li, span, time) {
	color: #fff;
}

/* Core's color classes carry !important, so the quieter lines need it too. */
.cong-page-head .cong-eyebrow,
.cong-page-head .has-ink-muted-color,
.cong-page-head .has-text-color:not(.wp-block-button__link) {
	color: rgb(255 255 255 / 0.82) !important;
}

.cong-page-head a:not(.wp-block-button__link):not(.cong-chip) {
	color: #fff;
	text-decoration-color: currentColor;
}

.cong-page-head .wp-block-button.is-style-outline > .wp-block-button__link {
	border-color: #fff;
	color: #fff;
}

.cong-page-head .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.cong-page-head .wp-block-button.is-style-outline > .wp-block-button__link:focus-visible {
	background: #fff;
	color: var(--wp--preset--color--ink);
}

.cong-page-head :focus-visible {
	outline-color: #fff;
}

@media (max-width: 640px) {
	.cong-page-head {
		border-radius: 0 0 20px 20px;
	}
}

/* ---------- Cards -------------------------------------------------------- */

/* No outline: the shadow and the corner are enough to say "card". */
.cong-card,
.cong-card--worded {
	border-color: transparent;
}

.cong-card--worded {
	border-radius: var(--wp--custom--radius--lg, 20px);
	background: var(--wp--preset--color--surface);
}

/* ---------- Pills you choose between ------------------------------------ */

.cong-chip {
	border-color: transparent;
	background: var(--wp--preset--color--surface);
	font-weight: 600;
}

.cong-chip.is-current,
.cong-chip[aria-current] {
	border-color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--ink);
	color: #fff;
}

/* The events page's view switcher is the same kind of choice. */
a.cong-views__tab:not(.is-on) {
	border-color: transparent;
	background: var(--wp--preset--color--surface);
}

a.cong-views__tab:not(.is-on):hover,
a.cong-views__tab:not(.is-on):focus-visible {
	border-color: var(--wp--preset--color--ink);
}

/* ---------- Dropdowns ---------------------------------------------------- */

/*
 * The browser's own dropdown is a small grey box that matches nothing. Every
 * one on the website gets the same shape as a text field, a thumb's height,
 * and a chevron drawn in its own text color. :where() keeps this at the
 * lowest weight, so a block that styles its own dropdown still wins.
 */
:where(body) select:not([multiple]):not([size]) {
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	min-height: 44px;
	max-width: 100%;
	padding: 0.5rem 2.4rem 0.5rem 0.9rem;
	border: 1px solid var(--cong-line, #d8e3ea);
	border-radius: var(--wp--custom--radius--md, 12px);
	background-color: var(--wp--preset--color--base, #fff);
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: calc(100% - 1.15rem) 50%, calc(100% - 0.8rem) 50%;
	background-repeat: no-repeat;
	background-size: 0.36rem 0.36rem;
	color: var(--wp--preset--color--ink);
	font: inherit;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
}

:where(body) select:not([multiple]):not([size]):hover {
	border-color: var(--wp--preset--color--ink);
}

:where(body) select:focus-visible {
	outline: 2px solid var(--wp--preset--color--ink);
	outline-offset: 2px;
}

:where(body) select:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}
