/* ==========================================================================
   Shared UI components

   Moved out of the inline <style> block in app/Views/includes/header.php.
   These rules are site-wide, so they belong in a stylesheet the browser can
   cache once rather than in markup re-sent with every page.

   Every selector here is already namespaced (kd-*), so nothing needed
   rescoping during the move.

   Responsive rules for these components live in responsive.css, not here.
   ========================================================================== */

/* ---- Read-more / collapsible description blocks ---- */

.kd-readmore__content {
	position: relative;
	overflow: hidden;
	max-height: 4.6em;
	transition: max-height .3s ease;
}

.kd-readmore__content.is-expanded {
	max-height: 4000px;
}

.kd-readmore__toggle {
	display: none;
	align-items: center;
	gap: 4px;
	margin-top: 10px;
	background: none;
	border: none;
	padding: 0;
	font-weight: 600;
	color: var(--bs-primary, #0d6efd);
	cursor: pointer;
}

.kd-readmore__toggle.is-visible {
	display: inline-flex;
}

/* lucide replaces the <i> with an <svg> at runtime, so both are targeted --
   an `i` selector alone stops matching the moment the icons initialise */
.kd-readmore__toggle i,
.kd-readmore__toggle svg {
	width: 16px;
	height: 16px;
	transition: transform .2s ease;
}

.kd-readmore__toggle.is-expanded i,
.kd-readmore__toggle.is-expanded svg {
	transform: rotate(180deg);
}

/* ---- Style / occasion cards ---- */

.kd-style-card-link {
	text-decoration: none;
	color: inherit;
	display: block;
}

.kd-style-card-link:hover .kd-style-card,
.kd-style-card-link:focus .kd-style-card {
	box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
	transform: translateY(-2px);
	transition: transform .15s ease, box-shadow .15s ease;
}

.kd-style-card--active,
.kd-occasion-card--active {
	outline: 2px solid var(--bs-primary, #0d6efd);
	outline-offset: 2px;
}

/* ---- Listing filter bar (location + budget + skill set) ---- */

.kd-filters-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	background: #fff;
	border: 1px solid #ecebf3;
	border-radius: 16px;
	padding: 14px 18px;
	box-shadow: 0 2px 10px rgba(20, 20, 43, .05);
	margin-top: 18px;
}

.kd-filters-bar__group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.kd-filters-bar .kd-filter {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 170px;
}

.kd-filters-bar .kd-filter__label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: #8b8aa0;
}

.kd-filters-bar .kd-filter__label i,
.kd-filters-bar .kd-filter__label svg {
	width: 14px;
	height: 14px;
}

.kd-filters-bar .kd-filter__select {
	appearance: none;
	-webkit-appearance: none;
	border: 1.5px solid #e4e3ee;
	border-radius: 10px;
	padding: 9px 34px 9px 12px;
	font-size: 14px;
	font-weight: 500;
	color: #2b2b40;
	background: #faf9fd;
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b8aa0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 10px center;
}

.kd-filters-bar .kd-filter__select:hover {
	border-color: #c9c7dd;
}

.kd-filters-bar .kd-filter__select:focus {
	outline: none;
	border-color: var(--bs-primary, #0d6efd);
	box-shadow: 0 0 0 3px rgba(13, 110, 253, .12);
}

.kd-filters-bar__reset-wrap {
	display: flex;
	align-items: flex-end;
}

.kd-filters-bar .kd-filter__reset {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1.5px solid #e4e3ee;
	background: #fff;
	border-radius: 10px;
	padding: 9px 14px;
	font-size: 13px;
	font-weight: 600;
	color: #6b6a80;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}

.kd-filters-bar .kd-filter__reset:hover {
	background: #f5f4fa;
	border-color: #c9c7dd;
}

.kd-filters-bar .kd-filter__reset i,
.kd-filters-bar .kd-filter__reset svg {
	width: 14px;
	height: 14px;
}

.kd-filters-bar__count {
	font-size: 13px;
	font-weight: 600;
	color: #6b6a80;
	white-space: nowrap;
}

.kd-filters-bar__count strong {
	color: #2b2b40;
}

/* ---- Empty state shown when filters match nothing ---- */

.kd-empty-state {
	grid-column: 1 / -1;
	text-align: center;
	padding: 48px 20px;
	color: #6b6a80;
}

.kd-empty-state p {
	margin-bottom: 14px;
	font-size: 15px;
}

/* ==========================================================================
   PDF guide strip

   Was written as inline style="" on ~26 elements across home/index.php and
   register/index.php -- the same component twice, at two sizes, plus inline
   onmouseover/onmouseout handlers doing what :hover does.

   The home version is the full-size one; /register uses --compact.
   ========================================================================== */

.kd-guide-section {
	padding: 60px 24px;
	background: #fff;
}

.kd-guide-wrap {
	max-width: 1100px;
	margin: 0 auto;
}

/* /register renders the strip inside an existing column, so it needs its own
   top margin and side padding rather than a full section band */
.kd-guide-wrap--inline {
	margin: 24px auto 0;
	padding: 0 24px;
}

.kd-guide-strip {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	background: linear-gradient(135deg, #eff4ff 0%, #fff7ed 100%);
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	padding: 40px 48px;
	flex-wrap: wrap;
}

.kd-guide-strip__main {
	display: flex;
	align-items: center;
	gap: 20px;
	flex: 1;
	min-width: 280px;
}

.kd-guide-strip__icon {
	width: 56px;
	height: 56px;
	background: #fde9d8;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.kd-guide-strip__title {
	margin: 0 0 6px;
	font-size: 22px;
	font-weight: 700;
	color: #1e3a8a;
}

.kd-guide-strip__text {
	margin: 0;
	color: #6b7280;
	font-size: 15px;
	max-width: 480px;
	line-height: 1.5;
}

.kd-guide-strip__btn {
	background: #facc15;
	color: #1f2937;
	font-weight: 600;
	font-size: 15px;
	padding: 14px 28px;
	border-radius: 999px;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
	transition: transform .15s ease;
}

/* replaces onmouseover="this.style.transform=..." in the markup */
.kd-guide-strip__btn:hover,
.kd-guide-strip__btn:focus-visible {
	transform: translateY(-2px);
	color: #1f2937;
}

/* ---- compact variant (/register) ---- */

.kd-guide-strip--compact {
	gap: 24px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 20px 28px;
}

.kd-guide-strip--compact .kd-guide-strip__main {
	gap: 16px;
	min-width: 260px;
}

.kd-guide-strip--compact .kd-guide-strip__icon {
	width: 44px;
	height: 44px;
	border-radius: 10px;
}

.kd-guide-strip--compact .kd-guide-strip__title {
	margin: 0 0 2px;
	font-size: 15px;
	font-weight: 600;
	color: #1e293b;
}

.kd-guide-strip--compact .kd-guide-strip__text {
	font-size: 13.5px;
	color: #64748b;
}

.kd-guide-strip--compact .kd-guide-strip__btn {
	background: #fff;
	color: #1e3a8a;
	font-size: 14px;
	padding: 10px 20px;
	border: 1.5px solid #1e3a8a;
	gap: 6px;
	box-shadow: none;
	transition: background .15s ease;
}

.kd-guide-strip--compact .kd-guide-strip__btn:hover,
.kd-guide-strip--compact .kd-guide-strip__btn:focus-visible {
	background: #eff4ff;
	transform: none;
	color: #1e3a8a;
}

/* ==========================================================================
   Form controls

   `style="height: 55px"` was repeated on 13 inputs and selects across
   register/index.php and contactus/index.php.
   ========================================================================== */

.kd-field-lg {
	height: 55px;
}

/* ==========================================================================
   Small pieces moved out of inline style="" in views
   ========================================================================== */

/* Site loading spinner (includes/header.php) */
.kd-spinner-lg {
	width: 3rem;
	height: 3rem;
}

/* "Why choose us" section (home/why_choose_us.php) */
.kd-why-choose__media {
	min-height: 400px;
}

.kd-why-choose__img {
	object-fit: cover;
	padding: 0 0 40px 100px;
}

/* wow.js normally writes these itself; they were hardcoded inline in the view */
.kd-animate-fade-up {
	visibility: visible;
	animation-delay: .1s;
	animation-name: fadeInUp;
}

/* Invitation gallery / occasions intro copy */
.kd-invite-heading {
	margin: 0 0 16px;
	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
	padding: 0 20px;
}

.kd-invite-intro {
	max-width: 760px;
	margin: 0 auto;
	text-align: center;
	color: #6b5e4f;
	font-size: 15px;
	line-height: 1.7;
}

/* Utilities used in place of one-off inline declarations */
.kd-text-center {
	text-align: center;
}

.kd-mt-10 {
	margin-top: 10px;
}

.kd-mt-12 {
	margin-top: 12px;
}

/* Header logo */
.kd-logo-img {
	height: 75px;
}

/* Profile page: small muted caption */
.kd-caption-xs {
	font-size: 10px;
	opacity: .8;
}

/* Spacing utilities replacing one-off inline margins */
.kd-mt-24 {
	margin-top: 24px;
}

.kd-mt-40 {
	margin-top: 40px;
}

.kd-mb-16 {
	margin-bottom: 16px;
}

.kd-w-full {
	width: 100%;
}

/* Invitation editor: small hint text under a field */
.kd-editor-hint {
	font-size: 12px;
	color: #a99a86;
}

/* Ghoghari Premier League table cells */
.kd-gpl-cell {
	text-align: center;
	border: 1px solid;
	margin: 0 5px;
	background-color: aliceblue;
}

/* ==========================================================================
   Consent banner (public/js/kd_track.js)

   Injected only when the visitor has not yet chosen. Sits above page content
   but must never cover the whole screen -- it is a request, not a wall.
   ========================================================================== */

.kd-consent {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	max-width: 1100px;
	margin: 0 auto;
	padding: 18px 22px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	box-shadow: 0 8px 30px rgba(20, 20, 43, .16);
}

.kd-consent__text {
	flex: 1;
	min-width: 260px;
	font-size: 14px;
	line-height: 1.55;
	color: #475569;
}

.kd-consent__text strong {
	color: #1e293b;
}

.kd-consent__link {
	color: #1e3a8a;
	font-weight: 600;
}

.kd-consent__actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.kd-consent__btn {
	padding: 10px 22px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: 1.5px solid transparent;
	transition: background .15s ease, border-color .15s ease;
}

/* Decline is a real, equally reachable choice -- not a greyed-out afterthought */
.kd-consent__btn--ghost {
	background: #fff;
	border-color: #cbd5e1;
	color: #475569;
}

.kd-consent__btn--ghost:hover {
	background: #f8fafc;
	border-color: #94a3b8;
}

.kd-consent__btn--accept {
	background: #1e3a8a;
	color: #fff;
}

.kd-consent__btn--accept:hover {
	background: #1e40af;
}

@media (max-width: 640px) {
	.kd-consent {
		left: 10px;
		right: 10px;
		bottom: 10px;
		padding: 16px;
		gap: 14px;
	}

	.kd-consent__actions {
		width: 100%;
	}

	.kd-consent__btn {
		flex: 1;
	}
}

/* ==========================================================================
   Topbar account control

   Signed out: a quiet "Sign in" link. Signed in: the person's name with a
   dropdown, so signing out costs no permanent header space.
   ========================================================================== */

.kd-topbar__signin {
	margin-left: 14px;
	padding: 4px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	color: #334155;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color .15s ease, background .15s ease;
}

.kd-topbar__signin:hover {
	border-color: #94a3b8;
	background: #fff;
	color: #1e293b;
}

.kd-account {
	position: relative;
	margin-left: 14px;
}

.kd-account__btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 3px 10px 3px 3px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	color: #1e293b;
	max-width: 190px;
}

.kd-account__btn:hover {
	border-color: #94a3b8;
}

.kd-account__avatar {
	width: 22px;
	height: 22px;
	flex: 0 0 auto;
	border-radius: 50%;
	background: #1e3a8a;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.kd-account__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.kd-account__caret {
	flex: 0 0 auto;
	color: #94a3b8;
	transition: transform .15s ease;
}

.kd-account__btn[aria-expanded="true"] .kd-account__caret {
	transform: rotate(180deg);
}

.kd-account__menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 150px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(20, 20, 43, .12);
	padding: 5px;
	z-index: 1200;
}

.kd-account__menu[hidden] {
	display: none;
}

.kd-account__item {
	display: block;
	padding: 8px 12px;
	border-radius: 7px;
	font-size: 14px;
	color: #334155;
	text-decoration: none;
	white-space: nowrap;
}

.kd-account__item:hover {
	background: #f1f5f9;
	color: #1e293b;
}

/* ==========================================================================
   Hero trust strip -- more room between the three figures

   The later of the two .kd-hero__trust rules in claude_css.css wins (gap 32px,
   max-width 700px), which packed the numbers close together. Widening the strip
   and adding a divider between items gives each figure its own space instead of
   three labels running into each other.
   ========================================================================== */

.kd-hero__trust {
	gap: 0;                 /* spacing now comes from the items themselves */
	max-width: 820px;
	padding: 22px 16px;
}

.kd-hero__trust-item {
	flex: 1 1 0;
	min-width: 150px;
	padding: 2px 26px;
	position: relative;
}

/* hairline between the figures, drawn on the gaps rather than the ends */
.kd-hero__trust-item + .kd-hero__trust-item::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 1px;
	height: 34px;
	background: #e8edf5;
}

.kd-hero__trust-item strong {
	display: block;
	margin-bottom: 2px;
	letter-spacing: -0.5px;
}

.kd-hero__trust-item span {
	display: block;
	line-height: 1.35;
}

@media (max-width: 640px) {
	.kd-hero__trust {
		padding: 16px 10px;
	}

	.kd-hero__trust-item {
		padding: 2px 10px;
		min-width: 0;
	}

	/* the divider is too tight to read on a narrow screen */
	.kd-hero__trust-item + .kd-hero__trust-item::before {
		height: 26px;
	}
}

/* ==========================================================================
   Styled dropdown (public/js/kd_select.js)

   Replaces the OS-drawn option list on desktop only. The real <select> is kept
   in the DOM and visually hidden -- it still submits, and on touch devices the
   script does nothing at all, so phones keep their native picker.
   ========================================================================== */

.kd-select {
	position: relative;
	width: 100%;
}

/* The native control is hidden but must stay focusable-adjacent and in the
   form, so it is not display:none -- that would drop it from some submissions
   and from assistive tech entirely. */
.kd-select__native {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.kd-select__btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	padding: 0;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	color: #1e293b;
	text-align: left;
	line-height: 1.4;
}

.kd-select__value {
	text-align: left;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.kd-select.is-placeholder .kd-select__value {
	color: #64748b;
	font-weight: 500;
}

.kd-select__caret {
	display: flex;
	flex: 0 0 auto;
	color: #94a3b8;
	transition: transform .18s ease, color .18s ease;
}

.kd-select.is-open .kd-select__caret {
	transform: rotate(180deg);
	color: #1e3a8a;
}

/* position:fixed, not absolute. .kd-hero sets overflow:hidden (it clips the
   decorative floating shapes), which was cutting the panel off at the bottom of
   the section. A fixed element is not clipped by an ancestor's overflow, so the
   list can hang past the hero. Coordinates are set by kd_select.js against the
   button, and refreshed on scroll and resize. */
.kd-select__panel {
	position: fixed;
	z-index: 1400;
	background: #fff;
	border: 1px solid #e8edf5;
	border-radius: 14px;
	box-shadow: 0 16px 40px rgba(20, 20, 43, .16);
	overflow: hidden;
	animation: kdSelectIn .14s ease;
}

.kd-select__panel[hidden] {
	display: none;
}

@keyframes kdSelectIn {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: translateY(0); }
}

.kd-select__search {
	text-align: left;
	width: 100%;
	border: none;
	border-bottom: 1px solid #eef2f7;
	padding: 13px 16px;
	font-size: 14px;
	color: #1e293b;
	outline: none;
}

.kd-select__search::placeholder {
	color: #94a3b8;
}

.kd-select__list {
	max-height: 280px;
	overflow-y: auto;
	padding: 6px;
	overscroll-behavior: contain;
	/* .kd-hero is text-align:center and everything inside inherits it */
	text-align: left;
}

.kd-select__group {
	text-align: left;
	padding: 9px 12px 5px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #94a3b8;
}

.kd-select__option {
	text-align: left;
	padding: 9px 12px;
	border-radius: 8px;
	font-size: 14.5px;
	color: #334155;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.kd-select__option--indented {
	padding-left: 22px;
}

.kd-select__option:hover,
.kd-select__option.is-active {
	background: #f1f5f9;
	color: #1e293b;
}

.kd-select__option.is-selected {
	background: #eff4ff;
	color: #1e3a8a;
	font-weight: 600;
}

.kd-select__option[hidden] {
	display: none;
}

.kd-select__group[hidden] {
	display: none;
}

/* ---- boxed variant: the /search filter bar ------------------------------
   There each control is its own bordered box, rather than sitting inside a
   field that supplies the border. Mirrors what .page .f-select looked like so
   the bar is unchanged until you open it. */

.kd-select--boxed .kd-select__btn {
	padding: 10px 12px;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	background: #fff;
	font-size: 13px;
	font-weight: 500;
	color: #334155;
	font-family: 'Segoe UI', sans-serif;
	transition: border-color .15s ease;
}

.kd-select--boxed .kd-select__btn:hover {
	border-color: #cbd5e1;
}

.kd-select--boxed.is-open .kd-select__btn {
	border-color: #1e3a8a;
}

.kd-select--boxed .kd-select__caret {
	color: #94a3b8;
}

.kd-select--boxed.is-placeholder .kd-select__value {
	color: #334155;
	font-weight: 500;
}

/* ===========================================================================
   Bare page chrome  ($bare_header in header.php / template.php)

   For pages someone was sent to in order to complete one task -- the client
   review form is the first -- where the site's navigation would only invite
   them to wander off mid-form. Logo at the top, one line at the bottom.
   =========================================================================== */

.kd-barebar {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px 16px;
	background: #fff;
	border-bottom: 1px solid #eef2f7;
}

.kd-barefoot {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	padding: 20px 16px 26px;
	background: #f8fafc;
	border-top: 1px solid #eef2f7;
	font-size: 12px;
	color: #94a3b8;
}

.kd-barefoot a {
	color: #64748b;
	text-decoration: none;
}

.kd-barefoot a:hover {
	color: #1e3a8a;
	text-decoration: underline;
}
