/**
 * DMC Live Search — default styling.
 * Everything here is overridable by the element's Bricks style controls
 * (Bricks emits #brxe-{id}-scoped rules with higher specificity).
 */

.dmc-ls {
	position: relative;
	display: block;
	width: 100%;
	max-width: 620px;
	box-sizing: border-box;
}
.dmc-ls *,
.dmc-ls *::before,
.dmc-ls *::after { box-sizing: border-box; }

/* ---- Search field ---- */
.dmc-ls__field {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	background: #ffffff;
	border: 1px solid #e4e0d8;
	border-radius: 999px;
	padding: 5px 6px 5px 22px;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.dmc-ls__field:focus-within {
	border-color: #b08d57;
	box-shadow: 0 0 0 3px rgba(176, 141, 87, .12);
}
.dmc-ls__icon { display: inline-flex; flex: 0 0 auto; color: #b08d57; }
.dmc-ls__icon-svg { width: 20px; height: 20px; display: block; }
.dmc-ls__input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	background: transparent;
	padding: 14px 0;
	font-size: 16px;
	line-height: 1.3;
	color: #2b2b2b;
	outline: none;
	appearance: none;
}
.dmc-ls__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.dmc-ls__input::placeholder { color: #9b958a; opacity: 1; }
/* The field's :focus-within is the focus indicator — suppress the input's own
   :focus-visible outline (themes/Bricks set one) so it never pokes outside the
   rounded field, especially when the field height is customised. */
.dmc-ls__input:focus,
.dmc-ls__input:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}

.dmc-ls__spinner {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	border: 2px solid #e7e2d8;
	border-top-color: #b08d57;
	border-radius: 50%;
	opacity: 0;
	transition: opacity .15s ease;
}
.dmc-ls.is-loading .dmc-ls__spinner { opacity: 1; animation: dmc-ls-spin .7s linear infinite; }
@keyframes dmc-ls-spin { to { transform: rotate(360deg); } }

/* Gold "submit" magnifier (right side, inside the field) */
.dmc-ls__submit {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	margin-left: 4px;
	border: 0;
	border-radius: 50%;
	background: linear-gradient(180deg, #c58b68 0%, #9d7054 100%);
	color: #ffffff;
	cursor: pointer;
	transition: filter .15s ease, transform .1s ease;
}
.dmc-ls__submit:hover { filter: brightness(1.06); }
.dmc-ls__submit:active { transform: scale(.95); }
.dmc-ls__submit .dmc-ls__icon-svg { width: 20px; height: 20px; display: block; }

/* ---- Dropdown ---- */
.dmc-ls__dropdown {
	position: relative;          /* in normal flow (default) — not absolute/fixed */
	margin-top: 8px;
	background: #ffffff;
	border: 1px solid #ececec;
	border-radius: 14px;
	box-shadow: none;
	overflow: hidden;
}
.dmc-ls__dropdown[hidden] { display: none; }

/* Optional overlay mode (floats above content) */
.dmc-ls--overlay .dmc-ls__dropdown {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	margin-top: 0;
	z-index: 9999;
}

.dmc-ls__list {
	list-style: none;
	margin: 0;
	padding: 6px;
	overflow: visible;          /* no inner scroll — list grows to fit all items */
}

/* Result row = full-width block (hover bg can go full-bleed); the inner holds the content. */
.dmc-ls__item,
.dmc-ls .dmc-ls__result {
	display: block;
	padding: 8px 10px;
	border-radius: 9px;
	cursor: pointer;
	text-decoration: none;
	color: inherit;
}
.dmc-ls__item:hover,
.dmc-ls__item.is-active,
.dmc-ls .dmc-ls__result:hover,
.dmc-ls .dmc-ls__result.is-active { background: #f6f3ee; }

/* Inner = flex content row, fixed (max-)width via the "Content width" control. */
.dmc-ls .dmc-ls__inner {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 14px;
	width: 100%;
	max-width: 720px;
	margin-inline: auto;
}

.dmc-ls__thumb {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	border-radius: 8px;
	object-fit: cover;
	background: #efece6;
}
.dmc-ls__thumb--placeholder {
	background: linear-gradient(135deg, #efece6 0%, #e3ddd2 100%);
}

.dmc-ls__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dmc-ls__type {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #b08d57;
}
.dmc-ls__title {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
	color: #1f2733;
	overflow-wrap: anywhere;
}
.dmc-ls__excerpt {
	font-size: 13px;
	line-height: 1.45;
	color: #6b7280;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

mark.dmc-ls-hl {
	background: #dbe7ff;
	color: inherit;
	padding: 0 2px;
	border-radius: 3px;
}

/* Nestable result item defaults (overridable in Bricks) */
.dmc-ls .dmc-ls__result > .dmc-ls__inner { padding: 0; }
.dmc-ls__result .dmc-bind-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dmc-bind-thumb {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	border-radius: 8px;
	background: #efece6 center / cover no-repeat;
}
.dmc-bind-thumb.dmc-bind-thumb--empty { background: linear-gradient(135deg, #efece6 0%, #e3ddd2 100%); }
.dmc-bind-type { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #b08d57; }
.dmc-bind-title { font-size: 16px; font-weight: 700; line-height: 1.25; color: #1f2733; margin: 0; }
.dmc-bind-excerpt { font-size: 13px; line-height: 1.45; color: #6b7280; }

.dmc-ls__empty {
	padding: 20px 16px;
	text-align: center;
	color: #6b7280;
	font-size: 14px;
}

/* Pagination — gold arrows bottom-right */
.dmc-ls__pagination {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	padding: 10px 14px;
	border-top: 1px solid #f0eee9;
	background: #ffffff;
}
.dmc-ls__pagination[hidden] { display: none; }
/* pagination: own width (default 720, override via "Pagination → Width"), centered */
.dmc-ls__pagination { max-width: 720px; margin-inline: auto; }

/* ---- Full-bleed: hover rows span the viewport, inner content stays fixed-width ---- */
.dmc-ls--fullbleed .dmc-ls__dropdown {
	width: 100vw;
	margin-inline: calc(50% - 50vw);
	border: 0;
	border-radius: 0;
	overflow: visible;
}
.dmc-ls--fullbleed .dmc-ls__list { padding-left: 0; padding-right: 0; }
.dmc-ls--fullbleed .dmc-ls__item,
.dmc-ls--fullbleed .dmc-ls__result { border-radius: 0; }
.dmc-ls__page-info {
	margin-right: auto;          /* info on the left, arrows on the right */
	font-size: 13px;
	color: #9a9488;
	font-variant-numeric: tabular-nums;
}
.dmc-ls__page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid currentColor;
	border-radius: 50%;
	background: transparent;
	color: #b08d57;              /* gold — override via the Pagination color control */
	cursor: pointer;
	transition: background-color .15s ease, opacity .15s ease;
}
.dmc-ls__page:hover { background: rgba(176, 141, 87, .12); }
.dmc-ls__page:disabled,
.dmc-ls__page.is-disabled { opacity: .35; cursor: default; pointer-events: none; }
.dmc-ls__page svg { width: 16px; height: 16px; display: block; }

@media (prefers-reduced-motion: reduce) {
	.dmc-ls.is-loading .dmc-ls__spinner { animation: none; }
	.dmc-ls__field { transition: none; }
}

/* ============================================================
 * Search results page (lexikon-style)
 * ============================================================ */
.dmc-sr { width: 100%; }
.dmc-sr__head { margin-bottom: 1.5rem; }
.dmc-sr__title {
	font-size: clamp(1.9rem, 4vw, 2.8rem);
	font-weight: 700;
	line-height: 1.15;
	margin: 0 0 1.2rem;
	color: #1f2733;
}
.dmc-sr__term { color: #b08d57; }

.dmc-sr__form { margin: 0; max-width: 620px; }
.dmc-sr__form .dmc-ls__field { width: 100%; }

.dmc-sr__alpha {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem 1.1rem;
	align-items: center;
	padding: 1.1rem 1.6rem;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: none;
	margin: 1.5rem 0 2rem;
}
.dmc-sr__alpha-link {
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1;
	color: #b08d57;
	text-decoration: none;
}
.dmc-sr__alpha-link.is-active:hover { text-decoration: underline; }
.dmc-sr__alpha-link.is-empty { color: #d9d3c8; cursor: default; }

.dmc-sr__count { color: #6b7280; font-size: .95rem; margin: 0 0 2rem; }

.dmc-sr__group { margin-bottom: 2.6rem; scroll-margin-top: 140px; }
.dmc-sr__letter {
	font-size: clamp(1.5rem, 3vw, 2.1rem);
	font-weight: 700;
	color: #b08d57;
	padding-bottom: .4rem;
	margin-bottom: 1.2rem;
	border-bottom: 1px solid #ece7df;
}
.dmc-sr__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.4rem; }
.dmc-sr__item { padding-bottom: 1.4rem; border-bottom: 1px solid #f1efe9; }
.dmc-sr__item:last-child { border-bottom: 0; }
.dmc-sr__item-title {
	display: inline-block;
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1.3;
	color: #1f2733;
	text-decoration: none;
}
.dmc-sr__item-title:hover { color: #b08d57; }
.dmc-sr__item-text { color: #6b7280; line-height: 1.55; margin: .4rem 0 .6rem; max-width: 70ch; }
.dmc-sr__item-link { color: #b08d57; font-weight: 600; text-decoration: none; }
.dmc-sr__item-link:hover { text-decoration: underline; }
.dmc-sr__empty { padding: 2rem 0; color: #6b7280; font-size: 1.05rem; }
