/**
 * WLOOKUPS Calendar UI
 * Brand tokens: WLOOKUPS Brand Guidelines v1.2.
 * No logo geometry or raster asset is reproduced in this component.
 */

.wlk-calendar {
	--wlk-navy: #102033;
	--wlk-ink: #161a1d;
	--wlk-blue: #3d6bff;
	--wlk-link: #3864f2;
	--wlk-lime: #c8ff3d;
	--wlk-lime-hover: #b7ea32;
	--wlk-lime-pressed: #a5d52a;
	--wlk-cloud: #f7f8f4;
	--wlk-white: #fff;
	--wlk-coral: #ff6b5e;
	--wlk-earth: #e7dfc9;
	--wlk-info: #eaf0ff;
	--wlk-selected: #eef3ff;
	--wlk-success: #eaf7e0;
	--wlk-warning: #fff2d9;
	--wlk-error: #fff0ed;
	--wlk-line: #dce2e8;
	--wlk-muted: #5f6b76;
	--wlk-radius-sm: 10px;
	--wlk-radius: 16px;
	--wlk-radius-lg: 24px;
	--wlk-shadow: 0 12px 34px rgba(16, 32, 51, 0.09);
	position: relative;
	width: 100%;
	color: var(--wlk-ink);
	font-family: "IBM Plex Sans Thai Looped", "IBM Plex Sans Thai", "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.55;
}

.wlk-calendar *,
.wlk-calendar *::before,
.wlk-calendar *::after {
	box-sizing: border-box;
}

.wlk-calendar a {
	color: var(--wlk-link);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.wlk-calendar button,
.wlk-calendar input,
.wlk-calendar select {
	font: inherit;
}

.wlk-calendar a:focus-visible,
.wlk-calendar button:focus-visible,
.wlk-calendar input:focus-visible,
.wlk-calendar select:focus-visible,
.wlk-calendar [tabindex]:focus-visible {
	outline: 0;
	box-shadow: 0 0 0 2px var(--wlk-white), 0 0 0 5px var(--wlk-link);
}

.wlk-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.wlk-inline-notice {
	padding: 12px 14px;
	margin: 0 0 18px;
	color: var(--wlk-navy);
	background: var(--wlk-success);
	border: 1px solid #a8cf87;
	border-radius: var(--wlk-radius-sm);
	font-size: 14px;
	font-weight: 650;
}

.wlk-inline-notice--error {
	background: var(--wlk-error);
	border-color: #efaaa3;
}

.wlk-icon {
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
}

.wlk-calendar__header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 24px;
}

.wlk-calendar__eyebrow {
	margin: 0 0 6px;
	color: var(--wlk-blue);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.wlk-calendar__title {
	margin: 0;
	color: var(--wlk-navy);
	font-size: clamp(26px, 3vw, 38px);
	font-weight: 750;
	letter-spacing: -0.025em;
	line-height: 1.18;
}

.wlk-calendar__title:focus {
	outline: 0;
}

.wlk-calendar__description {
	max-width: 720px;
	margin: 10px 0 0;
	color: var(--wlk-muted);
	font-size: 15px;
}

.wlk-filters {
	display: grid;
	grid-template-columns: minmax(220px, 1.5fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
	align-items: end;
	gap: 12px;
	padding: 18px;
	margin: 0 0 18px;
	background: var(--wlk-white);
	border: 1px solid var(--wlk-line);
	border-radius: var(--wlk-radius);
	box-shadow: 0 8px 24px rgba(16, 32, 51, 0.05);
}

.wlk-field {
	min-width: 0;
}

.wlk-field label {
	display: block;
	margin: 0 0 6px;
	color: var(--wlk-navy);
	font-size: 13px;
	font-weight: 700;
}

.wlk-field input,
.wlk-field select {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	color: var(--wlk-ink);
	background: var(--wlk-cloud);
	border: 1px solid #cbd3dc;
	border-radius: var(--wlk-radius-sm);
}

.wlk-field input:hover,
.wlk-field select:hover {
	border-color: #8e9cab;
}

.wlk-input-icon {
	position: relative;
}

.wlk-input-icon .wlk-icon {
	position: absolute;
	top: 50%;
	left: 13px;
	color: var(--wlk-muted);
	transform: translateY(-50%);
	pointer-events: none;
}

.wlk-input-icon input {
	padding-left: 42px;
}

.wlk-filters__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 46px;
}

.wlk-button {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 9px 15px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	cursor: pointer;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.wlk-button--primary {
	color: var(--wlk-navy) !important;
	background: var(--wlk-lime);
	border-color: #acd62f;
}

.wlk-button--primary:hover {
	background: var(--wlk-lime-hover);
}

.wlk-button--primary:active {
	background: var(--wlk-lime-pressed);
	transform: translateY(1px);
}

.wlk-button--secondary {
	color: var(--wlk-navy) !important;
	background: var(--wlk-white);
	border-color: #bdc7d2;
}

.wlk-button--secondary:hover {
	background: var(--wlk-selected);
	border-color: var(--wlk-blue);
}

.wlk-button--text {
	min-height: 40px;
	padding-inline: 10px;
	color: var(--wlk-link) !important;
	background: transparent;
}

.wlk-button--text:hover {
	background: var(--wlk-info);
}

.wlk-status-tabs {
	display: flex;
	gap: 8px;
	padding: 4px 4px 10px;
	margin: 0 0 12px;
	overflow-x: auto;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.wlk-status-tabs__item {
	display: inline-flex;
	min-height: 42px;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	padding: 8px 14px;
	color: var(--wlk-navy) !important;
	background: var(--wlk-white);
	border: 1px solid var(--wlk-line);
	border-radius: 999px;
	font-size: 14px;
	font-weight: 650;
	text-decoration: none !important;
}

.wlk-status-tabs__item:hover {
	border-color: var(--wlk-blue);
}

.wlk-status-tabs__item.is-active {
	color: var(--wlk-navy) !important;
	background: var(--wlk-lime);
	border-color: #acd62f;
}

.wlk-month-nav {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) 44px;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	margin-bottom: 12px;
	background: var(--wlk-navy);
	border-radius: var(--wlk-radius);
}

.wlk-month-nav__label {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 9px;
	margin: 0;
	color: rgba(255, 255, 255, 0.72);
	text-align: center;
}

.wlk-month-nav__label span {
	font-size: 12px;
	font-weight: 600;
}

.wlk-month-nav__label strong {
	color: var(--wlk-white);
	font-size: 19px;
	font-weight: 720;
}

.wlk-icon-button {
	display: inline-flex;
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	color: var(--wlk-navy) !important;
	background: var(--wlk-lime);
	border: 0;
	border-radius: 50%;
	text-decoration: none !important;
}

.wlk-icon-button:hover {
	background: var(--wlk-lime-hover);
}

.wlk-icon-button.is-disabled {
	opacity: 0.35;
}

.wlk-calendar__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
	align-items: start;
	gap: 18px;
}

.wlk-month-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 7px;
	padding: 16px;
	background: var(--wlk-cloud);
	border: 1px solid var(--wlk-line);
	border-radius: var(--wlk-radius-lg);
}

.wlk-month-grid__weekday {
	padding: 8px 4px;
	color: var(--wlk-muted);
	font-size: 12px;
	font-weight: 750;
	text-align: center;
}

.wlk-day {
	position: relative;
	display: flex;
	min-height: 98px;
	flex-direction: column;
	align-items: flex-start;
	justify-content: space-between;
	gap: 6px;
	padding: 10px;
	color: var(--wlk-ink) !important;
	background: var(--wlk-white);
	border: 1px solid #e0e5ea;
	border-radius: var(--wlk-radius-sm);
	text-decoration: none !important;
	transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.wlk-day:hover {
	color: var(--wlk-ink) !important;
	background: var(--wlk-info);
	border-color: #9bb0ff;
	transform: translateY(-1px);
}

.wlk-day.is-selected {
	background: var(--wlk-selected);
	border: 2px solid var(--wlk-blue);
	box-shadow: 0 7px 18px rgba(61, 107, 255, 0.13);
}

.wlk-day.is-today::after {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 8px;
	height: 8px;
	background: var(--wlk-lime-pressed);
	border: 1px solid var(--wlk-navy);
	border-radius: 50%;
	content: "";
}

.wlk-day--blank {
	background: transparent;
	border-color: transparent;
	pointer-events: none;
}

.wlk-day__today {
	color: var(--wlk-link);
	font-size: 10px;
	font-weight: 750;
	line-height: 1;
}

.wlk-day__number {
	color: var(--wlk-navy);
	font-size: 21px;
	font-weight: 760;
	line-height: 1;
}

.wlk-day__count {
	color: var(--wlk-muted);
	font-size: 11px;
	font-weight: 600;
}

.wlk-day.has-events .wlk-day__count {
	color: #2348c9;
}

.wlk-selected-agenda {
	position: sticky;
	top: 24px;
	max-height: calc(100vh - 48px);
	padding: 16px;
	overflow: auto;
	background: var(--wlk-white);
	border: 1px solid var(--wlk-line);
	border-radius: var(--wlk-radius-lg);
	box-shadow: var(--wlk-shadow);
	scrollbar-width: thin;
}

.wlk-agenda-heading,
.wlk-mobile-day__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 13px;
}

.wlk-agenda-heading p {
	margin: 0 0 2px;
	color: var(--wlk-muted);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.035em;
}

.wlk-agenda-heading h3,
.wlk-mobile-day__header h3 {
	margin: 0;
	color: var(--wlk-navy);
	font-size: 17px;
	font-weight: 720;
	line-height: 1.3;
}

.wlk-count-pill {
	display: inline-flex;
	min-width: 34px;
	height: 34px;
	align-items: center;
	justify-content: center;
	padding-inline: 9px;
	color: var(--wlk-navy);
	background: var(--wlk-lime);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 800;
}

.wlk-agenda-list {
	display: grid;
	gap: 12px;
}

.wlk-event-card {
	display: grid;
	grid-template-columns: 108px minmax(0, 1fr);
	min-width: 0;
	overflow: hidden;
	background: var(--wlk-white);
	border: 1px solid var(--wlk-line);
	border-radius: var(--wlk-radius);
	box-shadow: 0 5px 18px rgba(16, 32, 51, 0.05);
}

.wlk-event-card__media {
	display: block;
	min-height: 152px;
	overflow: hidden;
	background: var(--wlk-info);
}

.wlk-event-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 152px;
	object-fit: cover;
	transition: transform 260ms ease;
}

.wlk-event-card__media:hover img {
	transform: scale(1.035);
}

.wlk-event-card__placeholder {
	display: flex;
	width: 100%;
	height: 100%;
	min-height: 152px;
	align-items: center;
	justify-content: center;
	color: var(--wlk-blue);
	background: linear-gradient(145deg, var(--wlk-info), var(--wlk-selected));
}

.wlk-event-card__placeholder .wlk-icon {
	width: 34px;
	height: 34px;
}

.wlk-event-card__body {
	min-width: 0;
	padding: 12px;
}

.wlk-event-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-bottom: 7px;
}

.wlk-badge {
	display: inline-flex;
	min-height: 24px;
	align-items: center;
	padding: 3px 8px;
	color: var(--wlk-navy);
	background: var(--wlk-cloud);
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 760;
	line-height: 1.25;
}

.wlk-badge--info {
	background: var(--wlk-info);
	border-color: #c4d1ff;
}

.wlk-badge--success {
	background: var(--wlk-success);
	border-color: #b8d99f;
}

.wlk-badge--warning {
	background: var(--wlk-warning);
	border-color: #e3bd66;
}

.wlk-badge--danger {
	background: var(--wlk-error);
	border-color: #f1aaa1;
}

.wlk-badge--neutral {
	color: #49535d;
	background: #f0f2f4;
	border-color: #d7dde2;
}

.wlk-badge--personal {
	background: var(--wlk-selected);
	border-color: #9bb0ff;
}

.wlk-badge--transaction {
	background: var(--wlk-lime);
	border-color: #acd62f;
}

.wlk-event-card__title {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 730;
	line-height: 1.35;
}

.wlk-event-card__title a {
	display: -webkit-box;
	overflow: hidden;
	color: var(--wlk-navy) !important;
	text-decoration: none !important;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.wlk-event-card__title a:hover {
	color: var(--wlk-link) !important;
}

.wlk-event-card__meta {
	display: grid;
	gap: 5px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.wlk-event-card__meta li {
	display: flex;
	min-width: 0;
	align-items: flex-start;
	gap: 6px;
	color: #46515b;
	font-size: 12px;
}

.wlk-event-card__meta .wlk-icon {
	width: 15px;
	height: 15px;
	margin-top: 1px;
	color: var(--wlk-blue);
}

.wlk-event-card__categories {
	margin: 7px 0 0;
	color: var(--wlk-muted);
	font-size: 11px;
	font-weight: 600;
}

.wlk-event-card__trust {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	padding: 7px 8px;
	margin: 9px 0 0;
	color: #2a4677;
	background: var(--wlk-info);
	border-radius: 8px;
	font-size: 10px;
}

.wlk-event-card__trust .wlk-icon {
	width: 14px;
	height: 14px;
	margin-top: 1px;
}

.wlk-event-card__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
	margin-top: 11px;
}

.wlk-event-card__actions > .wlk-button {
	min-height: 38px;
	padding: 7px 11px;
	font-size: 12px;
}

.wlk-relation-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.wlk-relation-button {
	display: inline-flex;
	min-height: 38px;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 6px 9px;
	color: var(--wlk-navy);
	background: var(--wlk-white);
	border: 1px solid #bdc7d2;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
}

.wlk-relation-button .wlk-icon {
	width: 15px;
	height: 15px;
}

.wlk-relation-button:hover {
	background: var(--wlk-selected);
	border-color: var(--wlk-blue);
}

.wlk-relation-button.is-active {
	background: var(--wlk-lime);
	border-color: #99c020;
}

.wlk-relation-button--remove {
	color: #8a2c23;
	background: var(--wlk-error);
	border-color: #f1aaa1;
}

.wlk-mobile-agenda {
	display: none;
}

.wlk-mobile-day {
	padding: 14px 0 4px;
	border-top: 1px solid var(--wlk-line);
}

.wlk-mobile-day:first-child {
	padding-top: 0;
	border-top: 0;
}

.wlk-mobile-day__header span {
	color: var(--wlk-muted);
	font-size: 12px;
	font-weight: 650;
}

.wlk-empty-state {
	display: flex;
	min-height: 260px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 30px;
	color: var(--wlk-muted);
	background: var(--wlk-cloud);
	border: 1px dashed #bdc7d2;
	border-radius: var(--wlk-radius-lg);
	text-align: center;
}

.wlk-empty-state > .wlk-icon {
	width: 42px;
	height: 42px;
	margin-bottom: 12px;
	color: var(--wlk-blue);
}

.wlk-empty-state h3 {
	margin: 0 0 6px;
	color: var(--wlk-navy);
	font-size: 19px;
}

.wlk-empty-state p {
	max-width: 560px;
	margin: 0 0 16px;
}

.wlk-empty-state--compact {
	min-height: 220px;
	padding: 20px;
}

.wlk-empty-state--warning {
	background: var(--wlk-warning);
	border-color: #e3bd66;
}

.wlk-admin-note {
	padding: 8px 10px;
	color: #663c00;
	background: rgba(255, 255, 255, 0.7);
	border-radius: 8px;
	font-size: 12px;
}

.wlk-calendar.is-loading::after {
	position: absolute;
	z-index: 20;
	inset: 0;
	background: rgba(247, 248, 244, 0.62);
	border-radius: var(--wlk-radius-lg);
	content: "";
	cursor: progress;
}

@media (max-width: 1080px) {
	.wlk-filters {
		grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(160px, 1fr));
	}

	.wlk-filters__actions {
		grid-column: 1 / -1;
	}

	.wlk-calendar__layout {
		grid-template-columns: minmax(0, 1fr) 320px;
	}

	.wlk-day {
		min-height: 88px;
		padding: 8px;
	}
}

@media (max-width: 860px) and (min-width: 768px) {
	.wlk-calendar__layout {
		grid-template-columns: minmax(0, 1fr) 290px;
		gap: 12px;
	}

	.wlk-month-grid {
		gap: 4px;
		padding: 10px;
	}

	.wlk-day {
		min-height: 76px;
	}

	.wlk-day__count {
		font-size: 9px;
	}

	.wlk-event-card {
		grid-template-columns: 1fr;
	}

	.wlk-event-card__media,
	.wlk-event-card__media img,
	.wlk-event-card__placeholder {
		min-height: 128px;
		max-height: 150px;
	}
}

@media (max-width: 767px) {
	.wlk-calendar {
		font-size: 14px;
	}

	.wlk-calendar__header {
		margin-bottom: 18px;
	}

	.wlk-calendar__title {
		font-size: 26px;
	}

	.wlk-calendar__description {
		font-size: 14px;
	}

	.wlk-filters {
		grid-template-columns: 1fr;
		padding: 14px;
	}

	.wlk-filters__actions {
		grid-column: auto;
		justify-content: space-between;
	}

	.wlk-filters__actions .wlk-button--primary {
		flex: 1 1 auto;
	}

	.wlk-status-tabs {
		margin-inline: -4px;
	}

	.wlk-month-nav {
		padding: 10px;
	}

	.wlk-month-nav__label {
		flex-direction: column;
		gap: 0;
		line-height: 1.2;
	}

	.wlk-month-nav__label strong {
		font-size: 17px;
	}

	.wlk-calendar__layout,
	.wlk-month-grid,
	.wlk-selected-agenda {
		display: none;
	}

	.wlk-mobile-agenda {
		display: grid;
		gap: 18px;
	}

	.wlk-event-card {
		grid-template-columns: 104px minmax(0, 1fr);
	}

	.wlk-event-card__media,
	.wlk-event-card__media img,
	.wlk-event-card__placeholder {
		min-height: 150px;
	}

	.wlk-event-card__body {
		padding: 11px;
	}

	.wlk-event-card__title {
		font-size: 15px;
	}

	.wlk-event-card__actions {
		grid-column: 1 / -1;
	}

	.wlk-empty-state {
		min-height: 230px;
		padding: 24px 18px;
	}
}

@media (max-width: 430px) {
	.wlk-event-card {
		grid-template-columns: 92px minmax(0, 1fr);
	}

	.wlk-event-card__media,
	.wlk-event-card__media img,
	.wlk-event-card__placeholder {
		min-height: 142px;
	}

	.wlk-relation-actions {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wlk-calendar *,
	.wlk-calendar *::before,
	.wlk-calendar *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}

@media (forced-colors: active) {
	.wlk-day.is-selected,
	.wlk-status-tabs__item.is-active,
	.wlk-relation-button.is-active,
	.wlk-badge {
		border: 2px solid currentColor;
	}
}
