/* Release 190: stable homepage modules and frontend administration center. */
:root {
	--cs2-header-control-size: 40px;
}

body.cs2day-v2 .site-header__tools :where(.cs2-icon-button, .theme-toggle, .cs2-header-filter-button, .cs2-user-menu__trigger) {
	box-sizing: border-box;
	width: var(--cs2-header-control-size);
	height: var(--cs2-header-control-size);
	min-width: var(--cs2-header-control-size);
	min-height: var(--cs2-header-control-size);
	padding: 0;
	display: inline-grid;
	place-items: center;
}

body.cs2day-v2 .cs2-home-lfg__grid {
	display: grid;
	grid-template-rows: repeat(5, minmax(64px, 1fr));
	gap: 8px;
}

body.cs2day-v2 .cs2-home-lfg-card {
	min-width: 0;
	min-height: 64px;
	display: grid;
	grid-template-columns: 36px minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border: 1px solid var(--cs2-border);
	background: color-mix(in srgb, var(--cs2-card-elevated) 52%, transparent);
	text-decoration: none;
}

body.cs2day-v2 .cs2-home-lfg-card__avatar,
body.cs2day-v2 .cs2-home-lfg-card__avatar img {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
}

body.cs2day-v2 .cs2-home-lfg-card__copy {
	min-width: 0;
	display: grid;
	gap: 2px;
}

body.cs2day-v2 .cs2-home-lfg-card__copy small {
	color: var(--cs2-accent);
	font-size: 10px;
	font-weight: 800;
	text-transform: uppercase;
}

body.cs2day-v2 .cs2-home-lfg-card__copy strong,
body.cs2day-v2 .cs2-home-lfg-card__copy span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.cs2day-v2 .cs2-home-lfg-card__copy span,
body.cs2day-v2 .cs2-home-lfg-card time {
	color: var(--cs2-text-muted);
	font-size: 11px;
}

body.cs2day-v2 .cs2-home-lfg-card--empty {
	opacity: .38;
	pointer-events: none;
}

body.cs2day-v2 .cs2-home-lfg-card--empty span {
	height: 8px;
	border-radius: 3px;
	background: var(--cs2-border);
}

body.cs2day-v2 .content-card__placeholder--platform {
	width: 100%;
	height: 100%;
	display: grid;
	place-content: center;
	gap: 8px;
	text-align: center;
	background: color-mix(in srgb, var(--cs2-card-elevated) 78%, #000);
}

body.cs2day-v2 .content-card__placeholder--platform > span {
	font-size: clamp(18px, 2vw, 28px);
	font-weight: 900;
}

body.cs2day-v2 .content-card__placeholder--platform.is-youtube > span { color: #ff3b30; }
body.cs2day-v2 .content-card__placeholder--platform.is-twitch > span { color: #a970ff; }
body.cs2day-v2 .content-card__placeholder--platform.is-tiktok > span { color: #69c9d0; }
body.cs2day-v2 .content-card__placeholder--platform.is-instagram > span { color: #e1306c; }

body.cs2day-v2 .cs2-admin-center {
	display: grid;
	gap: 18px;
}

body.cs2day-v2 .cs2-admin-center[hidden] { display: none; }

body.cs2day-v2 .cs2-admin-center__subtabs {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	padding-bottom: 4px;
}

body.cs2day-v2 .cs2-admin-center__subtabs a {
	min-height: 38px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0 12px;
	border: 1px solid var(--cs2-border);
	border-radius: 5px;
	color: var(--cs2-text-muted);
	text-decoration: none;
	white-space: nowrap;
}

body.cs2day-v2 .cs2-admin-center__subtabs a.is-active {
	border-color: var(--cs2-accent);
	color: var(--cs2-text);
	background: color-mix(in srgb, var(--cs2-accent) 8%, var(--cs2-card));
}

body.cs2day-v2 .cs2-admin-center__subtabs a span {
	font-size: 11px;
	color: var(--cs2-text-disabled);
}

body.cs2day-v2 .cs2-admin-center__filters {
	display: grid;
	grid-template-columns: minmax(240px, 1fr) minmax(180px, .35fr) auto;
	align-items: end;
	gap: 12px;
	padding: 14px;
	border: 1px solid var(--cs2-border);
	background: var(--cs2-card);
}

body.cs2day-v2 .cs2-admin-center__filters label,
body.cs2day-v2 .cs2-admin-dialog label {
	display: grid;
	gap: 6px;
}

body.cs2day-v2 .cs2-admin-center__filters label > span,
body.cs2day-v2 .cs2-admin-dialog label > span {
	font-size: 11px;
	font-weight: 800;
	color: var(--cs2-text-muted);
}

body.cs2day-v2 .cs2-admin-center__table {
	border: 1px solid var(--cs2-border);
	background: var(--cs2-card);
	overflow: hidden;
}

body.cs2day-v2 .cs2-admin-center__row {
	display: grid;
	grid-template-columns: 140px minmax(260px, 1fr) minmax(140px, .35fr) 160px minmax(210px, auto);
	align-items: center;
	gap: 14px;
	min-height: 64px;
	padding: 10px 14px;
	border-bottom: 1px solid var(--cs2-border);
}

body.cs2day-v2 .cs2-admin-center__row:last-child { border-bottom: 0; }
body.cs2day-v2 .cs2-admin-center__row:nth-child(odd):not(.cs2-admin-center__row--head) { background: color-mix(in srgb, var(--cs2-bg) 35%, transparent); }

body.cs2day-v2 .cs2-admin-center__row--head {
	min-height: 42px;
	color: var(--cs2-text-muted);
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
}

body.cs2day-v2 .cs2-admin-center__identity { min-width: 0; display: grid; gap: 3px; }
body.cs2day-v2 .cs2-admin-center__identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.cs2day-v2 .cs2-admin-center__identity small { color: var(--cs2-text-muted); }
body.cs2day-v2 .cs2-admin-center__actions,
body.cs2day-v2 .cs2-admin-center__user-access { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
body.cs2day-v2 .cs2-admin-center__actions label,
body.cs2day-v2 .cs2-admin-center__user-access label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }

body.cs2day-v2 .cs2-admin-center__savebar {
	position: sticky;
	bottom: 12px;
	z-index: 12;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 14px;
	border: 1px solid var(--cs2-border);
	border-radius: 6px;
	background: color-mix(in srgb, var(--cs2-card) 94%, transparent);
	box-shadow: 0 12px 34px rgba(0, 0, 0, .28);
	backdrop-filter: blur(12px);
}

body.cs2day-v2 .cs2-admin-center__pagination { display: flex; flex-wrap: wrap; gap: 6px; }
body.cs2day-v2 .cs2-admin-center__pagination a { min-width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--cs2-border); border-radius: 4px; color: var(--cs2-text-muted); text-decoration: none; }
body.cs2day-v2 .cs2-admin-center__pagination a.is-active { border-color: var(--cs2-accent); color: var(--cs2-text); }

body.cs2day-v2 .cs2-admin-dialog {
	width: min(760px, calc(100vw - 32px));
	max-height: calc(100dvh - 32px);
	padding: 0;
	border: 1px solid var(--cs2-border);
	border-radius: 7px;
	background: var(--cs2-card);
	color: var(--cs2-text);
}

body.cs2day-v2 .cs2-admin-dialog::backdrop { background: rgba(2, 8, 12, .78); backdrop-filter: blur(3px); }

body.cs2day-v2 .cs2-admin-dialog__shell {
	display: grid;
	gap: 16px;
	padding: 18px;
	overflow-y: auto;
}

body.cs2day-v2 .cs2-admin-dialog__shell > header,
body.cs2day-v2 .cs2-admin-dialog__shell > footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

body.cs2day-v2 .cs2-admin-dialog__shell textarea { min-height: 180px; resize: vertical; }
body.cs2day-v2 .cs2-profile-editor-dialog { width: min(1120px, calc(100vw - 32px)); height: min(840px, calc(100dvh - 32px)); }
body.cs2day-v2 .cs2-profile-editor-dialog__shell { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); }
body.cs2day-v2 .cs2-profile-editor-dialog__shell > header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--cs2-border); }
body.cs2day-v2 .cs2-profile-editor-dialog iframe { width: 100%; height: 100%; border: 0; background: var(--cs2-bg); }

body.cs2day-v2 .cs2-moderation-user header { gap: 16px; flex-wrap: wrap; }
body.cs2day-v2 .cs2-admin-center__user-access select { width: auto; min-width: 130px; }

body.cs2day-v2 .cs2-admin-operations-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
body.cs2day-v2 .cs2-admin-operations-grid > section { min-width: 0; border: 1px solid var(--cs2-border); background: var(--cs2-card); }
body.cs2day-v2 .cs2-admin-operations-grid > section > header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--cs2-border); }
body.cs2day-v2 .cs2-admin-operation-list { max-height: 560px; overflow-y: auto; }
body.cs2day-v2 .cs2-admin-operation-list article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; padding: 12px 14px; border-bottom: 1px solid var(--cs2-border); }
body.cs2day-v2 .cs2-admin-operation-list article div { min-width: 0; display: grid; gap: 3px; }
body.cs2day-v2 .cs2-admin-operation-list article small { color: var(--cs2-text-muted); }

@media (max-width: 782px) {
	:root { --cs2-header-control-size: 44px; }
	body.cs2day-v2 .cs2-home-lfg-card { grid-template-columns: 32px minmax(0, 1fr) auto; }
	body.cs2day-v2 .cs2-home-lfg-card__avatar,
	body.cs2day-v2 .cs2-home-lfg-card__avatar img { width: 32px; height: 32px; }
	body.cs2day-v2 .cs2-admin-center__filters { grid-template-columns: 1fr; }
	body.cs2day-v2 .cs2-admin-center__row { grid-template-columns: 1fr; gap: 8px; padding: 14px; }
	body.cs2day-v2 .cs2-admin-center__row--head { display: none; }
	body.cs2day-v2 .cs2-admin-center__actions { justify-content: flex-start; flex-wrap: wrap; }
	body.cs2day-v2 .cs2-admin-center__user-access { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
	body.cs2day-v2 .cs2-admin-center__savebar { bottom: 8px; }
	body.cs2day-v2 .cs2-admin-operations-grid { grid-template-columns: 1fr; }
}
