/*
 * oad-digest · blueprint Section 41.
 *
 * The popup itself is the theme's Contact dialog (oad-pf-contact__*); only
 * what that dialog does not have is here. Colours and faces are the theme's
 * own variables, with the blueprint values as fallbacks.
 */

.oad-dg-dialog,
.oad-dg-panel,
.oad-dg-side,
.oad-dg-lists,
.oad-dg-feet,
.oad-dg-page,
.oad-save,
.oad-follow {
	--oad-dg-ink: var(--wp--preset--color--ink, #000);
	--oad-dg-ground: var(--wp--preset--color--ground, #f9f9f9);
	--oad-dg-white: var(--wp--preset--color--white, #fff);
	--oad-dg-muted: var(--wp--preset--color--muted, #6b6b6b);
	--oad-dg-shout: var(--wp--preset--font-family--shout, "Barlow", "Arial Black", sans-serif);
	--oad-dg-speak: var(--wp--preset--font-family--speak, "Jost", "Helvetica Neue", sans-serif);
	--oad-dg-meter: var(--wp--preset--font-family--meter, "IBM Plex Mono", ui-monospace, monospace);
}

/* ------------------------------------------------------------------ */
/* Save square                                                         */
/* ------------------------------------------------------------------ */

/* A plain resting square; the theme sizes it where it sits (event head,
   guide foot) alongside Share. Outline at rest, filled once saved. */
.oad-save {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: var(--oad-dg-ground);
	color: var(--oad-dg-ink);
	cursor: pointer;
	transition-property: background-color, color;
	transition-duration: 100ms;
	transition-timing-function: ease-out;
}

.oad-save:hover {
	background: var(--oad-dg-ink);
	color: var(--oad-dg-white);
}

.oad-save__icon {
	display: block;
	width: 16px;
	height: 16px;
	background: currentcolor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.oad-save[aria-pressed="true"] .oad-save__icon {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------------ */
/* Follow cell                                                          */
/* ------------------------------------------------------------------ */

/* Ink at rest, inverts on hover (blueprint Rule 03). Following is Ground
   with a tick. */
.oad-follow {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	width: 100%;
	height: 44px;
	padding: 0 16px;
	border: 0;
	background: var(--oad-dg-ink);
	color: var(--oad-dg-white);
	font-family: var(--oad-dg-shout);
	font-weight: 800;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	transition-property: background-color, color;
	transition-duration: 100ms;
	transition-timing-function: ease-out;
}

.oad-follow:hover {
	background: var(--oad-dg-ground);
	color: var(--oad-dg-ink);
	outline: 2px solid var(--oad-dg-ink);
	outline-offset: -2px;
}

.oad-follow[aria-pressed="true"] {
	background: var(--oad-dg-ground);
	color: var(--oad-dg-ink);
}

.oad-follow[aria-pressed="true"]::before {
	content: "\2713";
	font-family: var(--oad-dg-meter);
}

.oad-follow[aria-pressed="true"]:hover {
	background: var(--oad-dg-ink);
	color: var(--oad-dg-white);
	outline: 0;
}

/* ------------------------------------------------------------------ */
/* Popup additions                                                      */
/* ------------------------------------------------------------------ */

.oad-dg-dialog .oad-dg-lede,
.oad-dg-dialog .oad-dg-login,
.oad-dg-dialog .oad-dg-done-text {
	margin: 0;
	font-family: var(--oad-dg-speak);
	font-weight: 500;
	font-size: 16px;
	line-height: 1.5;
	color: var(--oad-dg-ink);
}

.oad-dg-dialog .oad-dg-login a {
	color: var(--oad-dg-ink);
}

.oad-dg-dialog .oad-dg-step {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.oad-dg-dialog .oad-dg-step[hidden],
.oad-dg-dialog [data-oad-part][hidden] {
	display: none;
}

.oad-dg-dialog .oad-dg-label {
	display: block;
	margin-bottom: 8px;
	font-family: var(--oad-dg-meter);
	font-weight: 500;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--oad-dg-muted);
}

.oad-dg-dialog .oad-dg-words {
	margin: 0 0 16px;
	font-family: var(--oad-dg-speak);
	font-weight: 500;
	font-size: 16px;
	line-height: 1.4;
}

.oad-dg-choice {
	display: grid;
	grid-template-columns: 1fr 1fr;
	border: 2px solid var(--oad-dg-ink);
}

.oad-dg-choice button {
	height: 44px;
	padding: 0 8px;
	border: 0;
	background: var(--oad-dg-ground);
	color: var(--oad-dg-ink);
	font-family: var(--oad-dg-shout);
	font-weight: 800;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
}

.oad-dg-choice button + button {
	border-left: 2px solid var(--oad-dg-ink);
}

.oad-dg-choice button[aria-checked="true"] {
	background: var(--oad-dg-ink);
	color: var(--oad-dg-white);
}

.oad-dg-choice button[aria-checked="false"]:hover {
	background: var(--oad-dg-ink);
	color: var(--oad-dg-white);
}

.oad-dg-dialog .oad-dg-req {
	color: var(--wp--preset--color--warning, #f36300);
}

.oad-dg-dialog .oad-dg-done-head {
	margin: 0;
	font-family: var(--oad-dg-shout);
	font-weight: 800;
	font-size: 24px;
	line-height: 1;
	text-transform: uppercase;
}

/* Done alone fills the foot. */
.oad-dg-dialog .oad-pf-contact__cancel[hidden] {
	display: none;
}

.oad-dg-dialog .oad-pf-contact__send[disabled],
.oad-dg-dialog .oad-pf-contact__cancel[disabled] {
	cursor: progress;
	opacity: 0.6;
}

/* ------------------------------------------------------------------ */
/* Saved panel                                                          */
/* ------------------------------------------------------------------ */

.oad-dg-panel {
	color: var(--oad-dg-ink);
}

.oad-dg-tabs {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	border: 2px solid var(--oad-dg-ink);
}

.oad-dg-tabs button {
	height: 44px;
	padding: 0 4px;
	border: 0;
	background: var(--oad-dg-ground);
	color: var(--oad-dg-ink);
	font-family: var(--oad-dg-shout);
	font-weight: 800;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
}

.oad-dg-tabs button + button {
	border-left: 2px solid var(--oad-dg-ink);
}

.oad-dg-tabs button[aria-selected="true"] {
	background: var(--oad-dg-ink);
	color: var(--oad-dg-white);
}

.oad-dg-tabs button[aria-selected="false"]:hover {
	background: var(--oad-dg-ink);
	color: var(--oad-dg-white);
}

.oad-dg-list {
	border: 2px solid var(--oad-dg-ink);
	border-top: 0;
}

.oad-dg-list[hidden] {
	display: none;
}

.oad-dg-row {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px;
	min-height: 64px;
	padding: 8px 16px;
	box-sizing: border-box;
}

.oad-dg-row + .oad-dg-row {
	border-top: 2px solid var(--oad-dg-ink);
}

.oad-dg-row--ent {
	grid-template-columns: 44px minmax(0, 1fr) auto;
}

.oad-dg-row__when {
	font-family: var(--oad-dg-meter);
	font-weight: 500;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.oad-dg-row__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.oad-dg-row__title {
	font-family: var(--oad-dg-shout);
	font-weight: 800;
	font-size: 15px;
	line-height: 1.1;
	text-transform: uppercase;
	color: var(--oad-dg-ink);
	text-decoration: none;
	overflow-wrap: anywhere;
}

.oad-dg-row__sub {
	font-family: var(--oad-dg-speak);
	font-weight: 500;
	font-size: 14px;
	color: var(--oad-dg-muted);
}

.oad-dg-row.is-ended .oad-dg-row__title,
.oad-dg-row.is-ended .oad-dg-row__when {
	color: var(--oad-dg-muted);
}

.oad-dg-row__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--oad-dg-ink);
	color: var(--oad-dg-white);
	font-family: var(--oad-dg-shout);
	font-weight: 800;
	font-size: 13px;
}

.oad-dg-row__act {
	padding: 0;
	border: 0;
	background: none;
	color: var(--oad-dg-ink);
	font-family: var(--oad-dg-meter);
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: underline;
	cursor: pointer;
	min-height: 44px;
}

.oad-dg-empty {
	margin: 0;
	padding: 16px;
	font-family: var(--oad-dg-speak);
	font-weight: 500;
	font-size: 15px;
}

.oad-dg-join {
	margin: 16px 0 0;
	font-family: var(--oad-dg-speak);
	font-weight: 500;
	font-size: 15px;
}

.oad-dg-join a {
	color: var(--oad-dg-ink);
}

.oad-dg-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 24px;
	padding: 16px;
	border: 2px solid var(--oad-dg-ink);
}

/* The theme makes every .oad-btn full width; here it sits beside the line. */
.oad-dg-foot .oad-btn {
	flex: none;
	width: auto;
}

.oad-dg-foot p {
	margin: 0;
	max-width: 46ch;
	font-family: var(--oad-dg-speak);
	font-weight: 500;
	font-size: 15px;
	line-height: 1.4;
}

@media (max-width: 639px) {
	.oad-dg-row {
		grid-template-columns: 72px minmax(0, 1fr) auto;
		gap: 12px;
	}

	.oad-dg-row--ent {
		grid-template-columns: 44px minmax(0, 1fr) auto;
	}

	.oad-dg-tabs button {
		font-size: 11px;
	}
}

/* ------------------------------------------------------------------ */
/* Saved panel · split over a page's two columns                        */
/* ------------------------------------------------------------------ */

/* Section 41, 31 Oct 2026: on a profile (and the visitor's page) the tabs
   and the email switch sit in the left panel and the lists in the right.
   Tabs: one 2px Ink frame, 44px rows, the open tab Ink (as the account
   menu's chosen row), the count in Meter at the right. */
.oad-dg-side {
	display: flex;
	flex-direction: column;
	border: 2px solid var(--oad-dg-ink);
}

.oad-dg-side button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 44px;
	margin: 0;
	padding: 0 16px;
	border: 0;
	border-top: 2px solid var(--oad-dg-ink);
	background: var(--oad-dg-ground);
	color: var(--oad-dg-ink);
	font-family: var(--oad-dg-shout);
	font-weight: 800;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	transition-property: background-color, color;
	transition-duration: 100ms;
	transition-timing-function: ease-out;
}

.oad-dg-side button:first-child {
	border-top: 0;
}

.oad-dg-side button[aria-selected="true"],
.oad-dg-side button:hover {
	background: var(--oad-dg-ink);
	color: var(--oad-dg-white);
}

.oad-dg-side__n {
	font-family: var(--oad-dg-meter);
	font-weight: 500;
	font-size: 11px;
	letter-spacing: 0.06em;
}

/* The lists join the page's own list column: the wrapper steps aside and
   each pane is a column with the list's 24 gap. */
.oad-dg-lists {
	display: contents;
}

.oad-dg-pane {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.oad-dg-pane[hidden] {
	display: none;
}

/* With no tabs above it, a list closes its own top line. */
.oad-dg-list--framed {
	border-top: 2px solid var(--oad-dg-ink);
}

/* Remove on a saved event's card (the theme's card, oad_dg_event_card). */
.oad-dg-card-remove {
	flex: none;
	margin-left: auto;
}

.oad-dg-feet .oad-dg-foot {
	margin-top: 0;
}

.oad-dg-feet .oad-dg-foot p {
	max-width: none;
}

/* ------------------------------------------------------------------ */
/* Visitor's manage page                                                */
/* ------------------------------------------------------------------ */

.oad-dg-main {
	padding: 64px 24px 96px;
}

.oad-dg-page {
	max-width: 760px;
}

.oad-dg-page__title {
	margin: 0 0 8px;
	font-family: var(--oad-dg-shout);
	font-weight: 800;
	font-size: clamp(32px, 5vw, 56px);
	line-height: 1;
	letter-spacing: -0.015em;
	text-transform: uppercase;
}

.oad-dg-page__who {
	margin: 0 0 24px;
	font-family: var(--oad-dg-meter);
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--oad-dg-muted);
}

@media (min-width: 1024px) {
	.oad-dg-main {
		padding: 96px 40px;
	}
}
