/* The15th Directory & Events. Colors come from the active theme's palette, with fallbacks. */
.t15-directory, .t15-findhelp, .t15-events, .t15-panel {
	--t15-primary: var(--wp--preset--color--primary, #1f5e5b);
	--t15-primary-dark: var(--wp--preset--color--primary-dark, #143f3d);
	--t15-accent: var(--wp--preset--color--accent, #e0a526);
	--t15-surface: var(--wp--preset--color--surface, #f4f1ea);
	--t15-base: var(--wp--preset--color--base, #ffffff);
	--t15-text: var(--wp--preset--color--contrast, #1d2320);
	--t15-muted: var(--wp--preset--color--muted, #5b6560);
	--t15-line: var(--wp--preset--color--line, #d9d4c7);
	--t15-radius: 12px;
}

.t15-directory .screen-reader-text, .t15-card .screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Filters ---------- */
.t15-filters {
	background: var(--t15-surface);
	border-radius: var(--t15-radius);
	padding: clamp(1rem, 3vw, 1.75rem);
	margin-bottom: 1.25rem;
}
.t15-filters__row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.t15-field { display: flex; flex-direction: column; gap: .35rem; }
.t15-field--search { flex: 1 1 320px; }
.t15-field--area { flex: 0 1 260px; }
.t15-field label, .t15-needs legend { font-weight: 700; font-size: 1rem; color: var(--t15-text); }
.t15-filters input[type="search"], .t15-filters select {
	font: inherit; font-size: 1.05rem;
	padding: .75rem .9rem; min-height: 48px;
	border: 2px solid var(--t15-line); border-radius: 10px;
	background: var(--t15-base); color: var(--t15-text); width: 100%;
	box-sizing: border-box;
}
.t15-filters input[type="search"]:focus, .t15-filters select:focus {
	outline: 3px solid var(--t15-accent); outline-offset: 1px; border-color: var(--t15-primary);
}
.t15-submit, .t15-findhelp button, .t15-btn {
	font: inherit; font-weight: 700; font-size: 1rem;
	background: var(--t15-primary); color: #fff;
	border: 0; border-radius: 10px; padding: .8rem 1.4rem; min-height: 48px;
	cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
.t15-submit:hover, .t15-findhelp button:hover, .t15-btn:hover { background: var(--t15-primary-dark); color: #fff; }
.t15-submit:focus-visible, .t15-findhelp button:focus-visible, .t15-btn:focus-visible { outline: 3px solid var(--t15-accent); outline-offset: 2px; }
.t15-js .t15-submit { display: none; }

.t15-needs { border: 0; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.t15-needs legend { margin-bottom: .6rem; padding: 0; }
.t15-chip { position: relative; cursor: pointer; }
.t15-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.t15-chip span {
	display: inline-block; padding: .5rem 1rem; border-radius: 999px;
	border: 2px solid var(--t15-line); background: var(--t15-base); color: var(--t15-text);
	font-weight: 600; font-size: .95rem; line-height: 1.3; transition: background .15s, border-color .15s;
}
.t15-chip:hover span { border-color: var(--t15-primary); }
.t15-chip input:checked + span { background: var(--t15-primary); border-color: var(--t15-primary); color: #fff; }
.t15-chip input:focus-visible + span { outline: 3px solid var(--t15-accent); outline-offset: 2px; }

/* ---------- Results ---------- */
.t15-count { color: var(--t15-muted); margin: 0 0 1rem; }
.t15-results {
	list-style: none; margin: 0; padding: 0;
	display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}
.t15-card {
	background: var(--t15-base); border: 1px solid var(--t15-line); border-radius: var(--t15-radius);
	padding: 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .6rem;
	border-top: 5px solid var(--t15-primary);
}
.t15-card[hidden] { display: none; }
.t15-card__title { margin: 0; font-size: 1.25rem; line-height: 1.25; }
.t15-card__title a { color: var(--t15-text); text-decoration: none; }
.t15-card__title a:hover { color: var(--t15-primary); text-decoration: underline; }
.t15-card__summary { margin: 0; color: var(--t15-text); }
.t15-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.t15-tags li, .t15-tags a {
	font-size: .8rem; font-weight: 700; letter-spacing: .02em;
	background: var(--t15-surface); color: var(--t15-primary-dark);
	padding: .2rem .6rem; border-radius: 999px; text-decoration: none;
}
.t15-tags a:hover { background: var(--t15-primary); color: #fff; }
.t15-card__facts { list-style: none; margin: 0; padding: 0; font-size: .95rem; display: grid; gap: .25rem; }
.t15-label {
	display: inline-block; min-width: 3.6rem; font-weight: 700; color: var(--t15-muted);
	font-size: .8rem; text-transform: uppercase; letter-spacing: .05em;
}
.t15-card__facts a { color: var(--t15-primary-dark); }
.t15-card__more { margin-top: auto; padding-top: .4rem; font-weight: 700; color: var(--t15-primary); }

.t15-empty { background: var(--t15-surface); border-radius: var(--t15-radius); padding: 1.25rem 1.5rem; margin-top: 1rem; }
.t15-empty p { margin: 0 0 .4rem; }
.t15-suggest { margin-top: 2rem; color: var(--t15-muted); font-size: .95rem; }

/* ---------- Find help box (home page) ---------- */
.t15-findhelp__form { display: grid; gap: 1rem; }
.t15-findhelp__field { display: flex; flex-direction: column; gap: .45rem; }
.t15-findhelp__label { display: block; font-weight: 700; font-size: 1.1rem; color: var(--t15-text); }
.t15-findhelp__field input, .t15-findhelp__field select {
	font: inherit; font-size: 1.1rem; padding: .8rem 1rem; min-height: 52px; width: 100%; box-sizing: border-box;
	border: 2px solid var(--t15-line); border-radius: 10px; background: var(--t15-base); color: var(--t15-text);
}
.t15-findhelp__field input:focus, .t15-findhelp__field select:focus { outline: 3px solid var(--t15-accent); outline-offset: 1px; border-color: var(--t15-primary); }
.t15-findhelp__submit { width: 100%; font-size: 1.1rem !important; min-height: 52px; }
.t15-findhelp__browse { border-top: 1px solid var(--t15-line); padding-top: 1rem; margin-top: .25rem; }
.t15-findhelp__or { margin: 0 0 .6rem; font-weight: 600; color: var(--t15-muted); font-size: .95rem; }
.t15-findhelp__links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.t15-findhelp__links button, .t15-findhelp__links a {
	font: inherit; display: inline-block; padding: .45rem .95rem; border-radius: 999px; font-weight: 600; font-size: .95rem; cursor: pointer;
	background: var(--t15-base); border: 2px solid var(--t15-line); color: var(--t15-text); text-decoration: none; line-height: 1.3;
}
.t15-findhelp__links button:hover { border-color: var(--t15-primary); color: var(--t15-primary-dark); }
.t15-findhelp__links button:focus-visible { outline: 3px solid var(--t15-accent); outline-offset: 2px; }
.t15-findhelp__links a.is-all { border-color: transparent; background: transparent; text-decoration: underline; padding-left: .3rem; }

/* ---------- Events ---------- */
.t15-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.t15-event {
	display: flex; gap: 1.1rem; align-items: flex-start;
	background: var(--t15-base); border: 1px solid var(--t15-line); border-radius: var(--t15-radius); padding: 1.1rem 1.25rem;
}
.t15-event__date {
	flex: 0 0 4.2rem; text-align: center; border-radius: 10px; overflow: hidden;
	background: var(--t15-surface); border: 1px solid var(--t15-line);
}
.t15-event__month { display: block; background: var(--t15-primary); color: #fff; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; padding: .2rem 0; }
.t15-event__day { display: block; font-size: 1.7rem; font-weight: 700; padding: .25rem 0 .35rem; color: var(--t15-text); }
.t15-event__body { flex: 1; min-width: 0; }
.t15-event__title { margin: 0 0 .25rem; font-size: 1.2rem; line-height: 1.25; }
.t15-event__title a { color: var(--t15-text); text-decoration: none; }
.t15-event__title a:hover { color: var(--t15-primary); text-decoration: underline; }
.t15-event__meta { margin: 0 0 .35rem; color: var(--t15-muted); font-size: .95rem; }
.t15-event__summary { margin: 0; }
.t15-events.is-past .t15-event { opacity: .8; }
.t15-events-empty { background: var(--t15-surface); padding: 1rem 1.25rem; border-radius: var(--t15-radius); }

/* ---------- Detail panel on single pages ---------- */
.t15-panel {
	background: var(--t15-surface); border-radius: var(--t15-radius);
	padding: clamp(1rem, 3vw, 1.6rem); margin: 0 0 2rem;
}
.t15-panel__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.25rem; }
.t15-btn--ghost { background: var(--t15-base); color: var(--t15-primary-dark); border: 2px solid var(--t15-primary); }
.t15-btn--ghost:hover { background: var(--t15-primary); color: #fff; }
.t15-panel dl { margin: 0; display: grid; gap: 0; }
.t15-panel__row { display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--t15-line); }
.t15-panel__row:first-child { border-top: 0; }
.t15-panel dt { font-weight: 700; color: var(--t15-muted); }
.t15-panel dd { margin: 0; }
.t15-panel .t15-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.t15-service-foot { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--wp--preset--color--line, #d9d4c7); font-size: .95rem; }
.t15-verified { color: var(--wp--preset--color--muted, #5b6560); }

@media (max-width: 600px) {
	.t15-panel__row { grid-template-columns: 1fr; gap: .15rem; }
	.t15-field--area { flex: 1 1 100%; }
}
.t15-panel .t15-tags a { background: var(--t15-base); }
.t15-panel__actions { align-items: center; }

/* Wide search box: questions side by side when there's room. */
.t15-findhelp { container-type: inline-size; }
@container (min-width: 720px) {
	.t15-findhelp__form { grid-template-columns: 1.5fr 1fr auto; align-items: end; column-gap: 1rem; }
	.t15-findhelp__submit { width: auto; padding-left: 2rem !important; padding-right: 2rem !important; }
	.t15-findhelp__browse { grid-column: 1 / -1; }
}
.t15-findhelp__field input, .t15-findhelp__field select, .t15-findhelp__submit { height: 54px; min-height: 54px; }

/* Event images in lists */
.t15-event.has-image { align-items: stretch; }
.t15-event__media { position: relative; flex: 0 0 clamp(150px, 28%, 260px); display: block; border-radius: 10px; overflow: hidden; align-self: flex-start; aspect-ratio: 4 / 3; background: var(--t15-surface); }
.t15-event__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.t15-event__media:hover .t15-event__img { transform: scale(1.03); }
.t15-event__media .t15-event__date { position: absolute; top: .5rem; left: .5rem; width: 3.6rem; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); border: 0; }
.t15-event__media .t15-event__day { font-size: 1.4rem; background: var(--t15-base); }
@media (prefers-reduced-motion: reduce) { .t15-event__img { transition: none; } }
@media (max-width: 600px) {
	.t15-event.has-image { flex-direction: column; }
	.t15-event__media { flex-basis: auto; width: 100%; aspect-ratio: 16 / 9; }
}
