/* Events page. Measurements copied from Events.dc.html, EventDetails.dc.html and ThankYou.dc.html.
   Shared pieces (area tabs, type checkboxes, List/Calendar switch, pagination) come from explore.css. */

.tdid-e-intro { max-width: 760px; margin: 0 auto; line-height: 1.5; }
.tdid-e-body { padding-bottom: 24px; }
.tdid-e-body .tdid-x-cats { margin-bottom: 24px; }

/* Month bar */
.tdid-e-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; scroll-margin-top: 16px; }
.tdid-e-month { display: flex; align-items: center; gap: 10px; }
.tdid-e-month h2 { margin: 0; min-width: 240px; font-size: 28px; text-align: center; color: var(--tdid-text); }
.tdid-e-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid #BFDCD9;
	border-radius: 22px;
	background: var(--tdid-white);
	color: var(--tdid-text);
	font: 700 22px/1 var(--tdid-font-body);
	text-decoration: none;
}
.tdid-e-arrow:hover, .tdid-e-arrow:focus { border-color: var(--tdid-button); color: var(--tdid-text); }

/* Ongoing all month */
.tdid-e-ongoing { margin-bottom: 14px; padding: 12px 18px; border-radius: 14px; background: #BFE3EC; font-size: 14px; font-weight: 700; }
.tdid-e-ongoing strong { font-weight: 800; letter-spacing: 0.04em; }
.tdid-e-ongoing a { color: var(--tdid-text); }

/* Calendar grid */
.tdid-e-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	border: 1px solid var(--tdid-border);
	border-radius: 16px;
	overflow: hidden;
}
.tdid-e-dow { padding: 10px 0; text-align: center; font-size: 13px; font-weight: 800; letter-spacing: 0.04em; color: var(--tdid-muted); }
.tdid-e-day { min-width: 0; min-height: 150px; padding: 8px; border: 1px solid var(--tdid-card-border); background: var(--tdid-white); }
.tdid-e-day--out { background: #FAFDFC; }
.tdid-e-daynum {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	border-radius: 14px;
	font-size: 14px;
	font-weight: 700;
}
.tdid-e-daynum.is-today { background: var(--tdid-button); color: var(--tdid-white); }
.tdid-e-chip {
	display: block;
	margin: 4px 0 0;
	padding: 4px 8px;
	border-radius: 8px;
	background: var(--tdid-chip);
	color: var(--tdid-text);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.tdid-e-chip:hover, .tdid-e-chip:focus { background: #C9E9E7; color: var(--tdid-text); }
.tdid-e-chip--featured { background: var(--tdid-accent); color: var(--tdid-white); }
.tdid-e-chip--featured:hover, .tdid-e-chip--featured:focus { background: var(--tdid-button); color: var(--tdid-white); }
/* Multi-day bars: join across day boxes like the mockup */
.tdid-e-chip--multi { background: #BFE3EC; border-radius: 0; margin-left: -9px; margin-right: -9px; }
.tdid-e-chip--multi.is-start { border-top-left-radius: 8px; border-bottom-left-radius: 8px; margin-left: 0; }
.tdid-e-chip--multi.is-end { border-top-right-radius: 8px; border-bottom-right-radius: 8px; margin-right: 0; }
.tdid-e-chip--multi.tdid-e-chip--featured { background: var(--tdid-accent); }
.tdid-e-more {
	display: block;
	margin-top: 4px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--tdid-button);
	font: 800 12px var(--tdid-font-body);
	cursor: pointer;
}
.tdid-e-more:hover, .tdid-e-more:focus { background: none; color: var(--tdid-text); text-decoration: underline; }

/* Day-by-day list (List view, phones, and "+N more") */
.tdid-e-agenda--phone { display: none; }
.tdid-e-agenda__day { margin-bottom: 18px; }
.tdid-e-agenda__day h3 { margin: 0 0 8px; font-size: 16px; color: var(--tdid-accent); }
.tdid-e-agenda ul, .tdid-e-daydialog ul { margin: 0; padding: 0; list-style: none; }
.tdid-e-agenda__item {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 2px 14px;
	padding: 10px 14px;
	margin-bottom: 6px;
	border: 1px solid var(--tdid-card-border);
	border-radius: 12px;
	background: var(--tdid-white);
	color: var(--tdid-text);
	text-decoration: none;
}
.tdid-e-agenda__item:hover, .tdid-e-agenda__item:focus { border-color: var(--tdid-button); color: var(--tdid-text); }
.tdid-e-agenda__item.is-featured { border: 2px solid var(--tdid-accent); padding: 9px 13px; }
.tdid-e-agenda__time { grid-row: span 2; font-size: 13px; font-weight: 800; color: var(--tdid-muted); }
.tdid-e-agenda__name { font-weight: 700; }
.tdid-e-agenda__where { font-size: 13px; color: var(--tdid-muted); }
.tdid-e-empty { padding: 24px; border-radius: 14px; background: var(--tdid-bg-light); text-align: center; color: var(--tdid-muted); font-weight: 600; }
.tdid-e-empty--grid { margin-top: 14px; }

/* Tags and date boxes */
.tdid-e-tag {
	display: inline-block;
	padding: 7px 14px;
	border-radius: 20px;
	background: var(--tdid-accent);
	color: var(--tdid-white);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.04em;
}
.tdid-e-tag--tiny { padding: 2px 8px; font-size: 10px; vertical-align: 2px; }
.tdid-e-datebox-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.tdid-e-datebox { padding: 6px 12px; border-radius: 10px; background: var(--tdid-bg-light); line-height: 1.1; text-align: center; }
.tdid-e-datebox span { display: block; font-size: 12px; font-weight: 800; color: var(--tdid-accent); }
.tdid-e-datebox strong { display: block; font-family: var(--tdid-font-heading); font-weight: 400; font-size: 26px; }
.tdid-e-datebox--small { padding: 4px 10px; }
.tdid-e-datebox--small span { font-size: 11px; }
.tdid-e-datebox--small strong { font-size: 20px; }
.tdid-e-when { font-size: 14px; font-weight: 600; color: var(--tdid-muted); }
.tdid-e-multi { padding: 3px 10px; border-radius: 12px; background: #BFE3EC; font-size: 11px; font-weight: 800; }

/* Upcoming events */
.tdid-e-upcoming { padding: 24px 40px 32px; scroll-margin-top: 16px; }
.tdid-e-upcoming .tdid-x-title { margin-top: 0; }
.tdid-e-hero {
	display: flex;
	flex-wrap: wrap;
	margin-bottom: 20px;
	border: 2px solid var(--tdid-accent);
	border-radius: 22px;
	overflow: hidden;
	background: var(--tdid-white);
}
.tdid-e-hero__photo { display: block; position: relative; flex: 1 1 520px; min-height: 340px; background: var(--tdid-chip) center / cover no-repeat; }
/* Whole photo shows (no cropping); a blurred copy fills the space around it. */
.tdid-e-hero__photo { overflow: hidden; }
.tdid-e-hero__photo::before,
.tdid-e-hero__photo::after { content: ""; position: absolute; inset: 0; background-image: inherit; background-position: center; background-repeat: no-repeat; }
.tdid-e-hero__photo::before { background-size: cover; filter: blur(18px) brightness(0.9); transform: scale(1.15); }
.tdid-e-hero__photo::after { background-size: contain; }
.tdid-e-hero__photo .tdid-e-tag { position: absolute; top: 16px; left: 16px; z-index: 1; }
.tdid-e-hero__body { flex: 1 1 400px; display: flex; flex-direction: column; justify-content: center; padding: 32px 36px; }
.tdid-e-hero__body h3 { margin: 0 0 8px; font-size: 30px; }
.tdid-e-where { margin: 0 0 12px; font-size: 15px; color: var(--tdid-muted); }
.tdid-e-about { margin: 0 0 22px; font-size: 16px; line-height: 1.5; }
.tdid-e-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.tdid-e-actions .tdid-button { padding: 14px 28px; }

.tdid-e-fcards { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 32px; }
.tdid-e-fcard { flex: 1 1 280px; border: 2px solid var(--tdid-accent); border-radius: 20px; overflow: hidden; background: var(--tdid-white); }
.tdid-e-fcard__photo { display: block; position: relative; height: 220px; background: var(--tdid-chip) center / cover no-repeat; }
.tdid-e-fcard__photo .tdid-e-tag { position: absolute; top: 12px; left: 12px; }
.tdid-e-fcard__body { padding: 18px 20px 20px; }
.tdid-e-fcard__body h3 { margin: 0 0 6px; font-size: 20px; }
.tdid-e-fcard__body .tdid-e-where { font-size: 14px; }
.tdid-e-fcard__body a { font-weight: 700; }
.tdid-e-kicker { margin: 0 0 6px; font-size: 13px; font-weight: 800; color: var(--tdid-accent); }

.tdid-e-rows { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 32px; }
.tdid-e-row {
	flex: 1 1 360px;
	display: flex;
	gap: 16px;
	align-items: stretch;
	border: 1px solid var(--tdid-card-border);
	border-radius: 18px;
	overflow: hidden;
	background: var(--tdid-white);
}
.tdid-e-row__photo { display: block; flex: 0 0 120px; background: var(--tdid-chip) center / cover no-repeat; }
.tdid-e-row__body { min-width: 0; padding: 16px 16px 16px 0; }
.tdid-e-row__body .tdid-e-datebox-row { margin-bottom: 8px; }
.tdid-e-row__body .tdid-e-when { font-size: 13px; }
.tdid-e-row__body h3 { margin: 0 0 4px; font-size: 17px; }
.tdid-e-row__body .tdid-e-where { margin-bottom: 8px; font-size: 13px; }
.tdid-e-row__body a { font-size: 14px; font-weight: 700; }

/* Details box (EventDetails.dc.html) */
.tdid-e-dialog, .tdid-e-daydialog {
	width: min(520px, 94vw);
	max-height: 92vh;
	padding: 0;
	border: 0;
	border-radius: 22px;
	background: var(--tdid-white);
	color: var(--tdid-text);
	box-shadow: 0 16px 48px rgba(11,60,73,0.35);
	overflow: auto;
}
.tdid-e-dialog::backdrop, .tdid-e-daydialog::backdrop { background: rgba(11,60,73,0.6); }
.tdid-e-dialog__photo { height: 150px; background: var(--tdid-chip) center / cover no-repeat; }
.tdid-e-dialog__photo.is-large { height: 240px; }
.tdid-e-dialog__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 22px;
	background: var(--tdid-white);
	color: var(--tdid-text);
	font: 700 22px/1 var(--tdid-font-body);
	box-shadow: 0 2px 8px rgba(11,60,73,0.2);
	cursor: pointer;
}
.tdid-e-dialog__close:hover, .tdid-e-dialog__close:focus { background: var(--tdid-chip); color: var(--tdid-text); }
.tdid-e-dialog__body { padding: 24px 28px 28px; }
.tdid-e-dialog__kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; color: var(--tdid-muted); }
.tdid-e-dialog__kicker .tdid-e-tag { padding: 6px 12px; font-size: 12px; }
.tdid-e-dialog h2 { margin: 0 0 14px; font-size: 26px; color: var(--tdid-text); }
.tdid-e-dialog dl { margin: 0; }
.tdid-e-dl { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--tdid-card-border); }
.tdid-e-dl[hidden] { display: none; }
.tdid-e-dl dt { flex: 0 0 96px; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; color: var(--tdid-muted); }
.tdid-e-dl dd { margin: 0; font-size: 15px; line-height: 1.5; min-width: 0; overflow-wrap: anywhere; white-space: pre-line; }
.tdid-e-dl dd a { font-weight: 700; }
.tdid-e-dialog__tickets { display: block; margin-top: 20px; padding: 14px 28px; text-align: center; }
.tdid-e-dialog__tickets[hidden] { display: none; }
.tdid-e-daydialog { padding: 24px 24px 20px; }
.tdid-e-daydialog h2 { margin: 0 52px 16px 0; font-size: 22px; color: var(--tdid-accent); }

/* Submit form */
.tdid-es { position: relative; padding: 56px 40px 64px; background: var(--tdid-bg-light); scroll-margin-top: 16px; }
.tdid-es__wrap { max-width: 880px; margin: 0 auto; }
.tdid-es__title { margin: 0 0 6px; font-size: 30px; color: var(--tdid-accent); }
.tdid-es__intro { margin: 0 0 24px; font-size: 16px; line-height: 1.5; color: var(--tdid-muted); }
.tdid-es-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 28px;
	border: 1px solid var(--tdid-border);
	border-radius: 18px;
	background: var(--tdid-white);
}
.tdid-es-row { display: flex; flex-wrap: wrap; gap: 18px; }
.tdid-es-row--end { align-items: flex-end; }
.tdid-es-field { flex: 1 1 220px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
.tdid-es-field[hidden] { display: none; }
.tdid-es-field input,
.tdid-es-field select,
.tdid-es-field textarea {
	width: 100%;
	box-sizing: border-box;
	min-height: 48px;
	padding: 12px 14px;
	border: 1px solid #9FB4BA;
	border-radius: 10px;
	background: var(--tdid-white);
	color: var(--tdid-text);
	font: 400 16px var(--tdid-font-body);
}
.tdid-es-field input[type="file"] { padding: 10px; font-size: 14px; }
.tdid-es-field textarea { min-height: 110px; resize: vertical; }
.tdid-es-field :focus { outline: 2px solid var(--tdid-button); outline-offset: 1px; border-color: var(--tdid-button); }
.tdid-es-field [aria-invalid="true"] { border-color: #B3261E; background: #FFF8F7; }
.tdid-es-optional { font-weight: 400; color: var(--tdid-muted); }
.tdid-es-error { font-size: 13px; font-weight: 600; color: #B3261E; }
.tdid-es-alert { padding: 14px 18px; margin-bottom: 16px; border-radius: 12px; background: #FDECEA; color: #8C1D18; font-weight: 700; }
.tdid-es-check { flex: 1 1 220px; display: flex; align-items: center; gap: 10px; min-height: 48px; font-size: 15px; font-weight: 700; cursor: pointer; }
.tdid-es-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--tdid-button); }
.tdid-es-help { margin: -6px 0 0; font-size: 13px; line-height: 1.5; color: var(--tdid-muted); }
div > .tdid-es-help { margin-top: 12px; }
.tdid-es-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.tdid-es-tiers { margin: 0; padding: 0; border: 0; }
.tdid-es-tiers legend { margin-bottom: 10px; padding: 0; font-size: 14px; font-weight: 700; }
.tdid-es-tiers__row { display: flex; flex-wrap: wrap; gap: 16px; }
.tdid-es-tier {
	flex: 1 1 240px;
	display: flex;
	gap: 12px;
	padding: 18px 20px;
	border: 2px solid var(--tdid-border);
	border-radius: 16px;
	background: var(--tdid-white);
	cursor: pointer;
}
.tdid-es-tier.is-selected { border-color: var(--tdid-accent); background: var(--tdid-bg-light); }
.tdid-es-tier:focus-within { outline: 2px solid var(--tdid-button); outline-offset: 2px; }
.tdid-es-tier input { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--tdid-button); }
.tdid-es-tier__name { display: block; margin-bottom: 6px; font-family: var(--tdid-font-heading); font-size: 18px; text-transform: uppercase; letter-spacing: 0.01em; }
.tdid-es-tier__desc { display: block; margin-bottom: 8px; font-size: 14px; line-height: 1.5; color: #33474F; }
.tdid-es-tier__bonus { display: block; margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: #FFE8E2; font-size: 13px; line-height: 1.45; color: var(--tdid-text); }
.tdid-es-tier__bonus strong { color: #C2410C; }
.tdid-es-tier__price { display: block; font-size: 14px; font-weight: 800; }
.tdid-es-submit {
	min-height: 52px;
	padding: 0 32px;
	border: 0;
	border-radius: 28px;
	background: var(--tdid-button);
	color: var(--tdid-white);
	font: 700 16px var(--tdid-font-body);
	cursor: pointer;
}
.tdid-es-submit:hover, .tdid-es-submit:focus { background: var(--tdid-text); color: var(--tdid-white); }

/* Thank-you panel (ThankYou.dc.html, "Event received") */
.tdid-thanks { max-width: 560px; margin: 0 auto; padding: 36px; border: 1px solid var(--tdid-border); border-radius: 18px; background: var(--tdid-white); text-align: center; }
.tdid-thanks__icon { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 36px; background: var(--tdid-accent); }
.tdid-thanks h2 { margin: 0 0 12px; font-size: 26px; color: var(--tdid-text); }
.tdid-thanks p { margin: 0 0 14px; font-size: 16px; line-height: 1.6; color: var(--tdid-muted); }
.tdid-thanks__note { margin-top: 8px; padding: 16px 18px; border-radius: 12px; background: var(--tdid-bg-light); font-size: 14px; text-align: left; }
.tdid-thanks__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 20px; }
.tdid-thanks__actions .tdid-button { padding: 14px 28px; }

/* ---------- Phones: the calendar becomes a day-by-day list ---------- */
@media (max-width: 720px) {
	.tdid-e-grid, .tdid-e-empty--grid { display: none; }
	.tdid-e-agenda--phone { display: block; }
	.tdid-e-month h2 { min-width: 0; font-size: 22px; }
	.tdid-e-bar { justify-content: center; }
	.tdid-e-agenda__item { grid-template-columns: 1fr; }
	.tdid-e-agenda__time { grid-row: auto; }
	.tdid-e-upcoming { padding: 16px 16px 24px; }
	.tdid-e-hero__photo { flex-basis: 100%; min-height: 220px; }
	.tdid-e-hero__body { flex-basis: 100%; padding: 22px; }
	.tdid-e-hero__body h3 { font-size: 24px; }
	.tdid-e-row { flex-basis: 100%; }
	.tdid-e-row__photo { flex-basis: 96px; }
	.tdid-es { padding: 40px 16px 48px; }
	.tdid-es-form { padding: 20px; }
	.tdid-thanks { padding: 28px 20px; }
	.tdid-e-dialog__body { padding: 20px; }
	.tdid-e-dl { flex-direction: column; gap: 4px; }
	.tdid-e-dl dt { flex-basis: auto; }
}

/* Featured listing owners: included featured events */
.tdid-es-included {
	margin: 0 0 12px;
	padding: 12px 16px;
	border-radius: 12px;
	background: var(--tdid-chip);
	color: var(--tdid-text);
	font-size: 14px;
	font-weight: 600;
}

/* Featured cards: Get tickets + Event details */
.tdid-e-fcard__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 4px; }
.tdid-e-fcard__actions .tdid-button--small { padding: 10px 20px; font-size: 14px; }

/* Shortcuts: All dates / Tonight / This weekend / Free (inc/events-quick.php) */
.tdid-e-quick { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.tdid-e-quick a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 20px;
	border-radius: 24px;
	border: 2px solid var(--tdid-button);
	background: var(--tdid-white);
	color: var(--tdid-button);
	font-size: 15px;
	font-weight: 800;
	text-decoration: none;
}
.tdid-e-quick a:hover, .tdid-e-quick a:focus { background: var(--tdid-chip); color: var(--tdid-text); }
.tdid-e-quick a.is-active { background: var(--tdid-button); color: var(--tdid-white); }
.tdid-e-when { margin-top: 8px; }
.tdid-e-when__more { margin: 8px 0 0; }
.tdid-e-when__more a { font-weight: 700; color: var(--tdid-button); }

.tdid-es-free { margin: 4px 0 18px; }

/* Shortcut pages: Featured events as larger photo cards */
.tdid-e-when__featured { margin-bottom: 28px; }
.tdid-e-when__fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.tdid-e-when__fcard {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 2px solid var(--tdid-accent);
	border-radius: 20px;
	background: var(--tdid-white);
	box-shadow: 0 10px 24px rgba(11, 60, 73, 0.12);
}
.tdid-e-when__fphoto { position: relative; display: block; height: 200px; background: var(--tdid-chip) center / cover no-repeat; }
.tdid-e-when__fphoto .tdid-e-tag { position: absolute; top: 12px; left: 12px; }
.tdid-e-when__fbody { padding: 18px 20px 20px; }
.tdid-e-when__fbody h4 { margin: 0 0 6px; font-family: "Archivo Black", sans-serif; font-size: 22px; line-height: 1.2; text-transform: uppercase; }
.tdid-e-when__fbody h4 a { color: var(--tdid-text); text-decoration: none; }
.tdid-e-when__fbody h4 a:hover, .tdid-e-when__fbody h4 a:focus { color: var(--tdid-button); }
/* One Featured event: photo beside the details */
.tdid-e-when__fgrid.is-single { grid-template-columns: 1fr; }
@media (min-width: 760px) {
	.tdid-e-when__fgrid.is-single .tdid-e-when__fcard { flex-direction: row; }
	.tdid-e-when__fgrid.is-single .tdid-e-when__fphoto { flex: 0 0 46%; height: auto; min-height: 240px; }
	.tdid-e-when__fgrid.is-single .tdid-e-when__fbody { display: flex; flex-direction: column; justify-content: center; padding: 28px 32px; }
	.tdid-e-when__fgrid.is-single h4 { font-size: 28px; }
}
