/* The courts of Ukraine: /courts and /courts/{code}.
   It adds to lawyers.css and uses the tokens of site.css only. Every class starts with cs-.
   `.site` first where site.css styles the element itself (h2, p). */

.cs-search { display: grid; gap: var(--s5); padding-top: var(--s5); }
.site .cs-search-h { font: 600 13px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 var(--s3); }
.cs-search-courts { border-top: 1px solid var(--line); padding-top: var(--s4); }
.cs-search-courts .lw-filters { margin-top: 0; }
.cs-field-q { flex: 1; min-width: 220px; }
.cs-field-q input { width: 100%; min-height: 42px; font-size: 15px; }

.site .cs-h2 { font-size: 24px; margin: 0; }
.cs-h2 span { color: var(--ink-3); font: 400 18px/1 var(--sans); }
.cs-group { margin-bottom: var(--s7); }
.cs-group > .cs-h2 { margin-bottom: var(--s4); }
.cs-other summary { cursor: pointer; list-style: none; margin-bottom: var(--s4); }
.cs-other summary::-webkit-details-marker { display: none; }
.cs-other summary .cs-h2::after { content: " ▸"; color: var(--ink-3); font-size: 18px; }
.cs-other[open] summary .cs-h2::after { content: " ▾"; }

.cs-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3); }
.cs-tiles a {
	display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3);
	padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
	text-decoration: none; color: var(--ink); font-size: 15px; transition: border-color .15s, box-shadow .15s;
}
.cs-tiles a:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.cs-tiles b { color: var(--ink-3); font-weight: 600; font-size: 14px; }

.cs-card .lw-card-title { font-size: 16px; }

/* A schedule */
.cs-days { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s4); }
.cs-days a {
	padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface);
	font-size: 14px; color: var(--ink-2); text-decoration: none; white-space: nowrap;
}
.cs-days a:hover { border-color: var(--ink); color: var(--ink); }
.cs-days a[aria-current="date"] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
/* The filters and the case search: one row of fields of one height. */
.cs-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3) var(--s4); margin-bottom: var(--s4); }
.cs-filter { display: flex; flex-wrap: wrap; gap: var(--s3); }
.cs-filter select { min-width: 180px; max-width: 280px; }
.cs-tools .lw-input { height: 40px; min-height: 40px; font-size: 15px; box-sizing: border-box; }
.cs-tools .site-btn { height: 40px; min-height: 40px; box-sizing: border-box; margin-top: 0; }
.cs-case { margin-left: auto; }
.cs-case-row { display: flex; align-items: center; gap: var(--s2); }
.cs-case-row .lw-input { width: 220px; }
.site .cs-count { margin: 0 0 var(--s3); font-size: 14px; }
.cs-count a { color: var(--accent); }
.cs-table-wrap { overflow-x: auto; }
.cs-table td { overflow-wrap: break-word; }
.cs-table td:last-child { white-space: normal; }
.cs-table a { color: var(--accent); text-decoration: none; }
.cs-table a:hover { text-decoration: underline; }
.cs-wide { margin-bottom: var(--s5); }
.cs-time { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.cs-table td.cs-time, .cs-table td.lw-mono { overflow-wrap: normal; white-space: nowrap; }
.cs-nowrap { white-space: nowrap; }
.site .cs-none { padding: var(--s5) 0; color: var(--ink-3); }
.site .cs-note { margin: var(--s4) 0 0; font-size: 13px; color: var(--ink-3); }
.cs-transfer { border-left: 3px solid var(--accent-2); }
.cs-transfer p + p { margin-top: var(--s2); }
.cs-transfer a { color: var(--accent); }
.site .cs-ruling { font-size: 14px; color: var(--ink-3); }
.cs-mini li { justify-content: flex-start; }
.cs-dl { grid-template-columns: 110px minmax(0, 1fr); }
.cs-dl a { color: var(--accent); }

/* The map of a court: a button, then the tiles (public/site/courts.js) */
.cs-map { position: relative; height: 220px; margin-top: var(--s4); border-radius: var(--r-md); overflow: hidden; background: var(--bg-alt); }
.cs-map-load {
	appearance: none; width: 100%; height: 100%; border: 0; cursor: pointer; font: 600 15px/1 var(--sans); color: var(--accent);
	background: repeating-linear-gradient(45deg, var(--bg-alt), var(--bg-alt) 12px, var(--surface) 12px, var(--surface) 24px);
}
.cs-map-load:hover { color: var(--ink); }
.cs-map-tiles { position: absolute; inset: 0; }
.cs-map-tiles img { position: absolute; width: 256px; height: 256px; max-width: none; }
.cs-map-pin {
	position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -18px 0 0 -9px;
	background: var(--accent); border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
	box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.cs-map-credit { position: absolute; right: 0; bottom: 0; padding: 2px 6px; background: rgba(255, 255, 255, .85); font-size: 11px; color: var(--ink-2); }
.site .cs-map-links { margin-top: var(--s3); font-size: 14px; }

/* The decisions of a court */
.cs-decisions h3 { font: 600 13px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: var(--s6) 0 var(--s3); }
.cs-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s3); margin-top: var(--s4); }
.cs-kpis div { padding: var(--s4); background: var(--bg-alt); border-radius: var(--r-md); display: grid; gap: 4px; }
.cs-kpis b { font: 500 30px/1.1 var(--serif); color: var(--ink); }
.cs-kpis span { font-size: 14px; color: var(--ink-3); }
.cs-bars-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s7); }
.cs-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.cs-bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--s3); font-size: 15px; }
.cs-bar-num { font-variant-numeric: tabular-nums; color: var(--ink); }
.cs-bar-num small { color: var(--ink-3); font-size: 13px; margin-left: 4px; }
.cs-bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--bg-alt); overflow: hidden; }
.cs-bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.cs-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lw-table th.cs-num { text-align: right; }
.cs-judges td:first-child { white-space: nowrap; }
.cs-judge-link a { color: var(--accent); font-size: 14px; }
.cs-recent { list-style: none; margin: 0; padding: 0; }
.cs-recent li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 2px var(--s3); padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.cs-recent a { color: var(--accent); text-decoration: none; overflow-wrap: anywhere; }
.cs-recent a:hover { text-decoration: underline; }
.cs-recent-date { color: var(--ink-3); font-variant-numeric: tabular-nums; grid-row: span 2; }
.cs-recent-meta { font-size: 13px; color: var(--ink-3); }

@media (max-width: 760px) {
	.cs-bars-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
	.cs-tools, .cs-filter, .cs-case { width: 100%; margin-left: 0; }
	.cs-filter .lw-field { flex: 1 1 140px; }
	.cs-filter select { min-width: 0; max-width: none; width: 100%; }
	.cs-case .lw-field { width: 100%; grid-template-columns: minmax(0, 1fr); }
	.cs-case-row { min-width: 0; }
	.cs-case-row .lw-input { flex: 1; width: auto; min-width: 0; }
	/* One hearing is two short lines: the cells wrap inline, and an empty cell is left out. */
	.cs-table tr { display: flex; flex-wrap: wrap; gap: 2px 12px; padding: 10px 0; }
	.cs-table td { font-size: 14px; color: var(--ink-2); }
	.cs-table td:first-child { font-size: 15px; color: var(--ink); }
	.cs-table td.cs-time, .cs-table td.lw-mono { font-size: 15px; color: var(--ink); }
	.cs-table td.cs-empty { display: none; }
}

/* The judge page (modules/site/views/court_judge.php) */
.cs-judge-list { list-style: none; margin: 0; padding: 0; }
.cs-judge-list li { display: flex; justify-content: space-between; gap: var(--s3); padding: 7px 0; border-top: 1px solid var(--line); font-size: 15px; }
.cs-judge-list a { color: var(--accent); }
.cs-judge-list span { color: var(--ink-3); font-size: 14px; }
.site .cs-judges td a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
