/* Calling cockpit — spoločný vzhľad (Bootstrap 5.3 override, žiadny build step) */
:root {
	--bg: #f2f2f7;
	--card: #ffffff;
	--line: #e6e6eb;
	--text: #1c1c1e;
	--text2: #6b7280;
	--tint: #0b57d0;
	--tint-dark: #0a4cb5;
	--call: #1e8e3e;
	--call-dark: #187436;
	--radius: 16px;
	--shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 0 0 1px rgba(16, 24, 40, .04);
}

html { color-scheme: light; }
body {
	background: var(--bg);
	color: var(--text);
	font-family: -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	-webkit-tap-highlight-color: transparent;
}
.text2 { color: var(--text2); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.min-w-0 { min-width: 0; }

/* ---- translucentný sticky header ---- */
.topbar {
	position: sticky;
	top: 0;
	z-index: 1020;
	background: rgba(249, 249, 251, .86);
	-webkit-backdrop-filter: saturate(180%) blur(18px);
	backdrop-filter: saturate(180%) blur(18px);
	border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.topbar .brand {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px;
	font-weight: 700;
	color: var(--text);
	text-decoration: none;
	font-size: 1.05rem;
	white-space: nowrap;
}
.topbar .search {
	border: 1px solid var(--line);
	background: #fff;
	border-radius: 10px;
	padding: .5rem .8rem;
	width: 100%;
	font-size: .95rem;
	min-height: 44px;
}
.topbar .search:focus { outline: 2px solid var(--tint); outline-offset: -1px; border-color: var(--tint); }
.topbar .btn, .topbar .chip { white-space: nowrap; }

/* ---- karty ---- */
.card {
	border: 0;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	margin-bottom: 1rem;
	background: var(--card);
}
.card-header {
	background: transparent;
	border-bottom: 1px solid var(--line);
	font-size: .78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--text2);
	padding: .7rem 1rem;
	border-radius: var(--radius) var(--radius) 0 0 !important;
}

/* ---- chips (segmenty, regióny, filtre) ---- */
.chips {
	display: flex;
	gap: .45rem;
	overflow-x: auto;
	scrollbar-width: none;
	align-items: center;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
	flex: 0 0 auto;
	border-radius: 999px;
	padding: .45rem .95rem;
	background: #fff;
	border: 1px solid var(--line);
	color: var(--text);
	text-decoration: none;
	font-weight: 600;
	font-size: .9rem;
	min-height: 40px;
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: #c9c9d1; }
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }
.chip.active:hover { color: #fff; }

/* ---- segmented control (volajúci) ---- */
.seg {
	display: flex;
	width: 100%;
	max-width: 560px;
	background: #e3e3e9;
	border-radius: 12px;
	padding: 3px;
	gap: 2px;
	overflow-x: auto;
	scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg a {
	border-radius: 9px;
	padding: .45rem .85rem;
	font-size: .92rem;
	font-weight: 600;
	color: var(--text);
	text-decoration: none;
	white-space: nowrap;
	min-height: 40px;
	display: inline-flex;
	align-items: center;
	gap: .4rem;
}
.seg a { flex: 1 1 auto; min-width: 0; justify-content: center; }
/* na telefóne sa musí zmestiť 5 volajúcich bez scrollu (inak prvý zmizne za okraj) */
@media (max-width: 480px) {
	.seg a { padding: .45rem .3rem; font-size: .84rem; gap: .2rem; }
	.seg .cnt { font-size: .68rem; }
}
.seg a.active { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.seg .cnt { font-size: .74rem; font-weight: 700; color: var(--text2); }

/* ---- avatar s iniciálkami ---- */
.avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: .82rem;
	color: #fff;
	flex: 0 0 auto;
	letter-spacing: .02em;
}
.avatar-lg { width: 52px; height: 52px; font-size: 1.05rem; }

/* ---- mobilný kartový zoznam kontaktov ---- */
.clist { padding: 0; overflow: hidden; }
.clist .item {
	display: flex;
	align-items: center;
	gap: .65rem;
	padding: .65rem .75rem;
	border-bottom: 1px solid var(--line);
	cursor: pointer;
}
.clist .item:last-child { border-bottom: 0; }
.parked { opacity: .45; }

/* park odškrkávatko — 44px tap target */
a.park-toggle {
	width: 44px;
	height: 44px;
	margin: -0.4rem -0.5rem -0.4rem -0.6rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.35rem;
	text-decoration: none;
	color: var(--text2);
	flex: 0 0 auto;
}
a.park-toggle:hover { color: var(--tint); }

/* zelené okrúhle tel: tlačidlo v zozname */
.callring {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #e7f4ea;
	color: var(--call);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.15rem;
	text-decoration: none;
	flex: 0 0 auto;
}
.callring:hover { background: #d7ecdc; color: var(--call-dark); }

/* ---- veľké call CTA na detaile ---- */
.btn-call {
	background: var(--call);
	color: #fff;
	border: 0;
	border-radius: 14px;
	font-size: 1.12rem;
	font-weight: 700;
	min-height: 54px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .55rem;
	width: 100%;
	text-decoration: none;
	padding: .6rem 1.1rem;
}
.btn-call:hover, .btn-call:focus { background: var(--call-dark); color: #fff; }

/* ---- fakty / chips na detaile ---- */
.facts { display: flex; flex-wrap: wrap; gap: .4rem .5rem; align-items: center; }
.fact {
	background: var(--bg);
	border-radius: 999px;
	padding: .28rem .7rem;
	font-size: .84rem;
	color: var(--text);
	display: inline-flex;
	align-items: center;
	gap: .3rem;
}
.fact b { font-weight: 700; }

/* ---- AI briefing ---- */
.ai-body { line-height: 1.6; }
.ai-body p { margin: 0 0 .55rem; }
.ai-body p:last-child { margin-bottom: 0; }
.ai-body ul { margin: 0 0 .55rem 1.15rem; padding: 0; }
.ai-body li { margin-bottom: .2rem; }

/* ---- zoznamové riadky v kartách (aktivity, kv, úlohy, akcie) ---- */
.comm, .kv, .ev, .task { padding: .55rem 1rem; border-bottom: 1px solid #f3f3f7; }
.comm:last-child, .kv:last-child, .ev:last-child, .task:last-child { border-bottom: 0; }
.comm .meta { color: var(--text2); font-size: .8rem; }
.kv .k { color: var(--text2); font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
.chan { font-size: .68rem; padding: .12em .5em; border-radius: .45rem; color: #fff; vertical-align: middle; font-weight: 600; }
.ev { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ev:nth-child(even) { background: #fafafc; }
.ev .btn-group-sm > .btn { min-width: 38px; padding-top: .35rem; padding-bottom: .35rem; }

/* ---- desktopová tabuľka v karte ---- */
.table-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.table-card .table { margin: 0; }
.table-card thead th {
	font-size: .72rem;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--text2);
	background: #fafafc;
	border-bottom: 1px solid var(--line);
	font-weight: 700;
	padding: .6rem .75rem;
	white-space: nowrap;
}
.table-card tbody td { padding: .55rem .75rem; border-color: #f3f3f7; }

/* ---- brief kampane (details) ---- */
details.brief summary {
	list-style: none;
	cursor: pointer;
	font-weight: 700;
	padding: .8rem 1rem;
	display: flex;
	align-items: center;
	gap: .5rem;
	min-height: 44px;
}
details.brief summary::-webkit-details-marker { display: none; }
details.brief summary::after { content: "›"; margin-left: auto; color: var(--text2); font-size: 1.2rem; transform: rotate(90deg); }
details.brief[open] summary::after { transform: rotate(-90deg); }
details.brief .brief-body { padding: 0 1rem .9rem; border-top: 1px solid var(--line); padding-top: .7rem; }

/* ---- Bootstrap ladenie ---- */
.btn-primary {
	--bs-btn-bg: var(--tint);
	--bs-btn-border-color: var(--tint);
	--bs-btn-hover-bg: var(--tint-dark);
	--bs-btn-hover-border-color: var(--tint-dark);
	--bs-btn-active-bg: var(--tint-dark);
	--bs-btn-active-border-color: var(--tint-dark);
}
.btn { border-radius: 10px; }
.btn-group-sm > .btn, .btn-sm { border-radius: 8px; }
.form-control { border-radius: 10px; border-color: var(--line); }
.form-control:focus { border-color: var(--tint); box-shadow: 0 0 0 .2rem rgba(11, 87, 208, .15); }
.badge { font-weight: 600; }
.alert { border: 0; border-radius: var(--radius); }

/* primárne akčné tlačidlá na mobile = pohodlný tap target */
@media (max-width: 991.98px) {
	/* celá horná lišta detailu, nie len modré a zelené — „Nedovolal" (warning) a
	   „← Worklist" / „Ďalší" (outline) mali 38–40 px, teda menej než palec potrebuje */
	.btn-primary, .btn-success, .btn-warning, .btn-danger, input.btn,
	.btn-outline-primary, .btn-outline-secondary, .btn-outline-dark { min-height: 44px; }
	.chip, .seg a { min-height: 44px; }
	.ev .btn-group-sm > .btn { min-height: 40px; }
}
/* úzky mobil: tesnejšia tabuľka akcií, nech sa zmestí aj tlačidlo Pozvaní */
@media (max-width: 575.98px) {
	.table-card tbody td, .table-card thead th { padding: .5rem .4rem; }
	.table-card .btn-sm { padding: .3rem .5rem; }
}

/* ---- pohyb: jemný, vypnuteľný ---- */
@media (prefers-reduced-motion: no-preference) {
	.btn, .chip, .seg a, .btn-call, .callring { transition: transform .12s ease, background-color .15s ease; }
	.btn:active, .chip:active, .btn-call:active, .callring:active { transform: scale(.96); }
}

/* Účasť na akcii — tri akcie namiesto dvoch osí „pozvať/príde".
   Na úzkom sa tlačidlá zalomia pod text, inak by riadok pretiekol. */
.ev { flex-wrap: wrap; }
.ev .att { flex: 0 0 auto; }
.ev .att .btn { white-space: nowrap; }
@media (max-width: 575.98px) {
	.ev .att { width: 100%; margin-left: 0 !important; margin-top: .4rem; }
	.ev .att .btn { flex: 1 1 0; padding-left: .25rem; padding-right: .25rem; font-size: .8rem; }
}
.ev-more {
	cursor: pointer; padding: .6rem .9rem; font-size: .85rem;
	color: var(--text2, #6b7280); list-style: none;
}
.ev-more::-webkit-details-marker { display: none; }
.ev-more::before { content: "▸ "; }
details[open] > .ev-more::before { content: "▾ "; }

/* „Ve hře od mesiaca" — hromadná operácia, preto najprv náhľad a až potom Vykonať. */
.vehre-bar {
	display: flex; align-items: center; gap: .35rem; flex-wrap: wrap;
	padding: .6rem .9rem; border-bottom: 1px solid var(--line, #e5e7eb);
}

/* „Ve hře" formulár — skrytý, kým sa naň neklikne. Termín aj poznámka na jednom
   mieste, nech sa to nemusí dopisovať ešte raz do Mattermostu. */
.vehre-form { display: none; padding: .75rem .9rem; background: #fffbeb; border-bottom: 1px solid var(--line, #e5e7eb); }
.vehre-form.open { display: block; }

/* Termín pripomienky — voľby namiesto dátumového vstupu. Prehliadač ho zobrazoval
   ako 08/30/2026, 12:00 AM, čo je americký formát a nezmyselná polnoc. */
.when { display: flex; flex-wrap: wrap; gap: .35rem; }
.when .btn { display: inline-flex; align-items: baseline; gap: .3rem; }
.when .d { font-size: .75em; opacity: .65; }

/* Posledná komunikácia nad briefingom — volajúci musí na prvý pohľad vidieť,
   že s človekom už niekto z tímu hovoril. Predtým to bolo až v druhom stĺpci. */
.last-comm {
	background: #eef4ff; border-left: 3px solid var(--accent, #0b57d0);
	padding: .55rem .75rem; border-radius: 8px; margin-bottom: .75rem; font-size: .92rem;
}
.last-comm.none { background: #f6f7f9; border-left-color: #c7cbd3; color: var(--text2, #6b7280); }
.last-comm .small { color: var(--text2, #6b7280); margin-top: .2rem; }

/* Hromadné „ve hře" — rovnaká logika ako formulár v Mattermoste: nie termín, ale
   smer (mesto · typ · od mesiaca). Zabalené, väčšinou sa vyberá konkrétna akcia. */
.hrom-body { padding: .75rem .9rem; background: #fffbeb; border-bottom: 1px solid var(--line, #e5e7eb); }
.hrom-body .chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.hrom-body .chip {
	border: 1px solid var(--line, #e5e7eb); border-radius: 999px;
	padding: .2rem .6rem; font-size: .85rem; cursor: pointer; background: #fff;
}
.hrom-body .chip:has(input:checked) { background: var(--accent, #0b57d0); color: #fff; border-color: transparent; }
.hrom-body .chip input { margin-right: .25rem; }

/* Dlhé poznámky z hovorov: celý text je v DOM, zrolovaný na 3 riadky a rozbaliteľný.
   Predtým sa osekával na serveri a zvyšok sa nedal zobraziť vôbec. */
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.clamp.open { display: block; }
.clamp-more { font-size: .8rem; text-decoration: none; display: inline-block; margin-top: .15rem; }

/* Potvrdenie o uložení. Predtým to bol flash na vrchu stránky — na detaile dlhom
   3000 px ho človek pri formulári dole nikdy nevidel a klikal Uložiť znova. */
.toast-bar {
	position: fixed; left: 50%; transform: translateX(-50%); bottom: 1rem;
	z-index: 1080; width: min(92vw, 30rem); transition: opacity .4s;
}
.toast-bar.fade-out { opacity: 0; pointer-events: none; }
.toast-msg {
	padding: .7rem 1rem; border-radius: 12px; margin-top: .4rem; font-weight: 600;
	color: #fff; background: #1e8e3e; box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.toast-msg.t-danger { background: #c5221f; }
.toast-msg.t-warning { background: #b06000; }
input[type=submit]:disabled, button:disabled { opacity: .65; }
form.busy input[type=submit] { opacity: .7; }

/* ---- výber zoznamu: titulok ako menu (natívny <select> je neviditeľne cez neho) ----
   Rozloženie je pevné, nič sa po načítaní neposúva; na iPhone sa otvorí systémový picker. */
.listbar { margin-bottom: 1rem; min-width: 0; }
.picker {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	max-width: 100%;
	min-height: 44px;
	border-radius: 10px;
	color: var(--text);
	cursor: pointer;
}
.picker select {
	position: absolute;
	inset: 0;
	width: 100%;
	opacity: 0;
	font-size: 16px; /* pod 16 px iOS pri ťuknutí zoomuje */
	cursor: pointer;
	appearance: none;
}
.picker:focus-within { outline: 2px solid var(--tint); outline-offset: 3px; }
.picker:active .list-title, .picker:active .pill-val { opacity: .6; }
.list-title {
	font-size: clamp(1.45rem, 1.1rem + 1.5vw, 1.9rem);
	font-weight: 700;
	letter-spacing: -.02em;
	line-height: 1.15;
	margin: 0;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.chev { flex: 0 0 auto; width: 15px; height: 10px; fill: none; stroke: var(--tint); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.list-sub { color: var(--text2); font-size: .9rem; margin-top: .1rem; }
.back {
	display: inline-flex; align-items: center; gap: .3rem; min-height: 44px;
	color: var(--tint); text-decoration: none; font-weight: 500;
}
.back svg { width: 10px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.picker-pill {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: .35rem .95rem;
	font-size: .92rem;
	font-weight: 600;
	display: flex;
	width: fit-content;
}
.picker-pill .text2 { font-weight: 500; }
.pill-val { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-pill .chev { width: 11px; height: 8px; }

/* Stretnutie s Hankou vo formulári hovoru — polia len po zaškrtnutí (bez JS) */
.meet .meet-fields { display: none; margin-top: .5rem; }
.meet #meet-chk:checked ~ .meet-fields { display: block; }
/* Po uložení stretnutia skok na #stretnutia: nech hlavičku karty neprekryje horná lišta */
#stretnutia { scroll-margin-top: 5rem; }
/* Potvrdenie len informuje — ťuk cez neho musí trafiť tlačidlo pod ním */
.toast-bar { pointer-events: none; }
.meet > .form-check-input { float: none; margin: 0 .5rem 0 0; vertical-align: -.2em; }
.meet > .form-check-label { display: inline; }

/* Stretnutie: tváre poradcov + termíny po dňoch (výber oboma smermi, JS v Contact/default.latte) */
img.avatar { object-fit: cover; }
/* mini-tváre vedľa seba, nie cez seba — prekryv orezával iniciály (HM → H) */
.avatar-xs { width: 24px; height: 24px; font-size: .56rem; letter-spacing: 0; }
.mini { display: inline-flex; gap: 2px; }
.tvare { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; padding: .15rem; }
.tvare::-webkit-scrollbar { display: none; }
.tvar {
	flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: .25rem;
	min-width: 76px; min-height: 44px; padding: .4rem .3rem; border-radius: 14px;
	border: 2px solid transparent; cursor: pointer; font-size: .78rem; text-align: center; line-height: 1.15;
}
.tvar.on, .tvar:has(input:checked) { border-color: var(--tint); }
.tvar.off { opacity: .3; cursor: not-allowed; }
.tvar-meno { max-width: 80px; }
.terminy .den { margin-bottom: .55rem; }
.den-h { font-size: .78rem; font-weight: 700; color: var(--text2); margin-bottom: .25rem; }
.tchips { display: flex; flex-wrap: wrap; gap: .4rem; }
.tchip {
	display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .25rem .7rem;
	border-radius: 999px; border: 1px solid var(--line); cursor: pointer; font-weight: 600; font-size: .9rem;
}
/* vybraný termín = ako vybraté tlačidlo výsledku (svetlé pozadie, tmavý text) — var(--text) v téme klubu je svetlý */
.tchip.on, .tchip:has(input:checked) { background: #f5f7fb; color: #0b1020; border-color: #f5f7fb; }
.tvar:focus-within, .tchip:focus-within { outline: 2px solid var(--tint); outline-offset: 2px; }
.tyzden[data-zavrety] { display: none; }
.meet-dalsi { background: transparent; color: inherit; }
/* našepkávač miesta stretnutia (vzor klub portal.css .hints) */
.meet-miesto { position: relative; }
.hints {
	position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin-top: 4px;
	display: flex; flex-direction: column; border-radius: 12px; overflow: hidden;
	border: 1px solid var(--line); background: #141425; box-shadow: 0 12px 30px rgba(0,0,0,.45);
}
.hints__item {
	font: inherit; font-size: 14px; text-align: left; padding: 12px; min-height: 44px;
	background: transparent; border: 0; color: inherit; cursor: pointer;
}
.hints__item:hover, .hints__item:focus { background: rgba(255,255,255,.10); }
