/* Ortopedie Planá – online objednání */

@font-face {
	font-family: 'Atkinson Hyperlegible Next';
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/atkinson-next-latin-400.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Atkinson Hyperlegible Next';
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/atkinson-next-latin-ext-400.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Atkinson Hyperlegible Next';
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/atkinson-next-latin-700.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Atkinson Hyperlegible Next';
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/atkinson-next-latin-ext-700.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


:root {
	--paper: #f2f6f8;
	--surface: #ffffff;
	--ink: #16323f;
	--ink-soft: #4b6370;
	--line: #d3dfe5;
	--brand: #0a6e9c;
	--brand-strong: #07587d;
	--brand-soft: #e2f0f7;
	--ok: #1c7650;
	--ok-soft: #e1f2e9;
	--warn: #875200;
	--warn-soft: #fff0d3;
	--danger: #b42318;
	--danger-soft: #fdeceb;
	--focus: #f0a400;

	--font: 'Atkinson Hyperlegible Next', 'Segoe UI', system-ui, sans-serif;
	--radius: 10px;
	--radius-small: 6px;

	color-scheme: light;
}


/* základ */

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

[hidden] { display: none !important; }

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 1.125rem/1.55 var(--font);
	font-variant-numeric: tabular-nums;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

h1, h2, h3 {
	line-height: 1.2;
	margin: 0 0 .5em;
	font-weight: 700;
	text-wrap: balance;
}
h1 { font-size: 2rem; letter-spacing: -.01em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

a {
	color: var(--brand);
	text-decoration-thickness: 1px;
	text-underline-offset: .18em;
}
a:hover { color: var(--brand-strong); text-decoration-thickness: 2px; }
a[href^="tel:"], .link-danger { white-space: nowrap; }

:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 2px;
}

.wrap {
	width: 100%;
	max-width: 42rem;
	margin: 0 auto;
	padding: 0 1rem;
}
.wrap-wide { max-width: 72rem; }

.muted { color: var(--ink-soft); }
.lead { font-size: 1.25rem; }

.visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}


/* hlavička a patička */

.site-header {
	background: var(--surface);
	border-bottom: 1px solid var(--line);
}
.site-header .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .5rem 1.5rem;
	padding-top: 1rem;
	padding-bottom: 1rem;
}
.brand {
	display: block;
	color: var(--ink);
	text-decoration: none;
	line-height: 1.25;
}
.brand strong { display: block; font-size: 1.3rem; }
.brand span { color: var(--ink-soft); font-size: .95rem; }
.brand:hover { color: var(--ink); }

.phone {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	font-weight: 700;
	font-size: 1.15rem;
	text-decoration: none;
	white-space: nowrap;
}
.phone svg { width: 1.1em; height: 1.1em; }

main {
	flex: 1;
	padding: 2rem 0 3rem;
}

.site-footer {
	border-top: 1px solid var(--line);
	padding: 1.5rem 0;
	font-size: .95rem;
	color: var(--ink-soft);
}
.site-footer p { margin: 0; }


/* kroky objednávky */

.steps {
	display: flex;
	gap: .25rem;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
	font-size: .95rem;
	color: var(--ink-soft);
	counter-reset: krok;
}
.steps li {
	flex: 1;
	padding-top: .6rem;
	border-top: 4px solid var(--line);
	counter-increment: krok;
}
.steps li::before { content: counter(krok) '. '; }
.steps li.done { border-color: var(--brand); }
.steps li[aria-current] {
	border-color: var(--brand);
	color: var(--ink);
	font-weight: 700;
}


/* tlačítka */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	min-height: 3rem;
	padding: .6rem 1.4rem;
	border: 2px solid var(--brand);
	border-radius: var(--radius-small);
	background: var(--brand);
	color: #fff;
	font: 700 1.1rem/1.2 var(--font);
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s, border-color .15s;
}
.btn:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; text-decoration: none; }
.btn-secondary { background: var(--surface); color: var(--brand); }
.btn-secondary:hover { background: var(--brand-soft); color: var(--brand-strong); }
.btn-block { width: 100%; }
.btn-small { min-height: 2.25rem; padding: .3rem .8rem; font-size: .95rem; }

.link-danger { color: var(--danger); }
.link-danger:hover { color: var(--danger); }

.back {
	display: inline-block;
	margin-bottom: 1.25rem;
}


/* hlášky */

.flash {
	margin: 0 0 1.5rem;
	padding: .9rem 1.1rem;
	border-radius: var(--radius-small);
	border-left: 5px solid currentColor;
	background: var(--brand-soft);
	color: var(--brand-strong);
}
.flash-success { background: var(--ok-soft); color: var(--ok); }
.flash-danger { background: var(--danger-soft); color: var(--danger); }
.flash-info { background: var(--warn-soft); color: var(--warn); }
.flash p { color: var(--ink); margin: 0; }


/* objednací kartička – papírová karta s termínem */

.karticka {
	position: relative;
	margin: 0 0 1.5rem;
	padding: 1.25rem 1.5rem 1.5rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-top: 6px solid var(--brand);
	border-radius: var(--radius-small);
	box-shadow: 0 1px 0 var(--line), 0 10px 24px -14px rgba(22, 50, 63, .35);
}
.karticka-hlavicka {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin: 0 0 1rem;
	font-size: .9rem;
	color: var(--ink-soft);
}
.karticka dl {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: baseline;
	gap: .35rem 1rem;
	margin: 0;
}
.karticka dt {
	font-size: .95rem;
	color: var(--ink-soft);
}
.karticka dd {
	margin: 0;
	padding-bottom: .3rem;
	/* linka jako na tištěné kartičce, kam sestra píše termín */
	border-bottom: 1px dashed var(--line);
	font-weight: 700;
	font-size: 1.3rem;
}
.karticka .karticka-cas {
	font-size: 3rem;
	line-height: 1.05;
	letter-spacing: -.02em;
	color: var(--brand-strong);
}
.karticka-akce {
	margin-top: 1.25rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .75rem 1.25rem;
}

@media (max-width: 30rem) {
	.karticka { padding: 1rem 1rem 1.25rem; }
	.karticka .karticka-cas { font-size: 2.5rem; }
	.karticka-akce .btn { width: 100%; }
}


/* úvodní stránka */

.alternativy {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
}


/* výběr termínu */

.dny {
	display: flex;
	gap: .5rem;
	margin: 0 0 1.5rem;
	padding: .25rem 0 .75rem;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: thin;
}
.den-tab {
	flex: 0 0 auto;
	min-width: 6.5rem;
	padding: .6rem .8rem;
	border: 2px solid var(--line);
	border-radius: var(--radius-small);
	background: var(--surface);
	color: var(--ink);
	font: inherit;
	font-size: .95rem;
	line-height: 1.3;
	text-align: left;
	cursor: pointer;
	scroll-snap-align: start;
}
.den-tab strong { display: block; font-size: 1.1rem; }
.den-tab span { color: var(--ink-soft); font-size: .85rem; }
.den-tab:hover { border-color: var(--brand); }
.den-tab[aria-selected='true'] {
	border-color: var(--brand);
	background: var(--brand);
	color: #fff;
}
.den-tab[aria-selected='true'] span { color: #fff; }

.den-panel + .den-panel { margin-top: 2rem; }
.den-lekar { display: block; margin-top: .15rem; font-size: 1rem; font-weight: 400; color: var(--ink-soft); }

@media (max-width: 42rem) {
	/* na mobilu pás dnů až ke krajům displeje */
	.dny { margin: 0 -1rem 1.5rem; padding: .25rem 1rem .75rem; }
}
.den-panel h2 { font-size: 1.3rem; }
.den-panel h2::first-letter { text-transform: uppercase; }

.casy {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
	gap: .5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.cas {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 3.5rem;
	padding: .4rem;
	border: 2px solid var(--brand);
	border-radius: var(--radius-small);
	background: var(--surface);
	color: var(--brand-strong);
	font-weight: 700;
	font-size: 1.25rem;
	line-height: 1.1;
	text-decoration: none;
}
.cas small { font-weight: 400; font-size: .75rem; color: var(--ink-soft); }
.cas:hover { background: var(--brand); color: #fff; text-decoration: none; }
.cas:hover small { color: #fff; }


/* formulář */

.form-row { margin: 0 0 1.25rem; }
.form-row label {
	display: block;
	margin-bottom: .3rem;
	font-weight: 700;
}
.form-row .optional { font-weight: 400; color: var(--ink-soft); }
.form-hint {
	margin: .3rem 0 0;
	font-size: .95rem;
	color: var(--ink-soft);
}
.form-row input,
.form-row textarea {
	display: block;
	width: 100%;
	min-height: 3rem;
	padding: .6rem .8rem;
	border: 2px solid #9fb3bd;
	border-radius: var(--radius-small);
	background: var(--surface);
	color: var(--ink);
	font: inherit;
}
.form-row input:focus,
.form-row textarea:focus {
	border-color: var(--brand);
	outline: 3px solid var(--focus);
	outline-offset: 1px;
}
.form-row.has-error input,
.form-row.has-error textarea { border-color: var(--danger); }
.form-error {
	margin: .35rem 0 0;
	color: var(--danger);
	font-weight: 700;
	font-size: .95rem;
}
.form-errors {
	margin: 0 0 1.25rem;
	padding: .9rem 1.1rem;
	border-radius: var(--radius-small);
	background: var(--danger-soft);
	color: var(--danger);
	list-style: none;
}
.form-narrow { max-width: 24rem; margin: 0 auto; }
.form-narrow h1 { margin-bottom: 1.5rem; }
.form-note { margin-top: 1rem; font-size: .95rem; color: var(--ink-soft); }


/* potvrzení */

.postup {
	margin: 0 0 1.5rem;
	padding-left: 1.4rem;
}
.postup li { margin-bottom: .5rem; }
.postup li::marker { font-weight: 700; color: var(--brand); }


/* administrace */

.admin-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 0 0 1.5rem;
}
.admin-bar h1 { margin: 0; }
.admin-bar .akce { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

.prepinac {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	font-size: 1rem;
	cursor: pointer;
}
.prepinac input { width: 1.2rem; height: 1.2rem; accent-color: var(--brand); }

.den-blok {
	margin: 0 0 1.5rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
}
.den-blok > header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: .25rem 1rem;
	padding: .8rem 1rem;
	background: var(--brand-soft);
}
.den-blok > header h2 { margin: 0; font-size: 1.15rem; }
.den-blok > header h2::first-letter { text-transform: uppercase; }
.den-blok > header p { margin: 0; font-size: .95rem; color: var(--ink-soft); }

.sloty {
	width: 100%;
	border-collapse: collapse;
	font-size: 1rem;
}
.sloty th, .sloty td {
	padding: .6rem 1rem;
	border-top: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}
.sloty th { width: 5rem; font-size: 1.1rem; }
.sloty .lekar { width: 13rem; color: var(--ink-soft); }
.sloty .akce { width: 1%; white-space: nowrap; text-align: right; }
.sloty tr.volno th,
.sloty tr.volno td { color: var(--ink-soft); font-weight: 400; padding-top: .35rem; padding-bottom: .35rem; }
.skryt-volne .sloty tr.volno { display: none; }
.skryt-volne .den-blok.prazdny { display: none; }

.pacient + .pacient { margin-top: .6rem; padding-top: .6rem; border-top: 1px dashed var(--line); }
.pacient-jmeno { font-weight: 700; }
.pacient-kontakt { font-size: .95rem; color: var(--ink-soft); }
.pacient-poznamka { font-style: italic; margin: .15rem 0; white-space: pre-line; }

.stav {
	display: inline-block;
	margin-left: .4rem;
	padding: .05rem .5rem;
	border-radius: 999px;
	font-size: .8rem;
	font-weight: 700;
	vertical-align: .1em;
}
.stav-ok { background: var(--ok-soft); color: var(--ok); }
.stav-ceka { background: var(--warn-soft); color: var(--warn); }

@media (max-width: 40rem) {
	.sloty, .sloty tbody, .sloty tr, .sloty th, .sloty td { display: block; width: auto; }
	.sloty tr { border-top: 1px solid var(--line); padding: .5rem 1rem; }
	.sloty th, .sloty td { border: 0; padding: .1rem 0; text-align: left; }
	.sloty .lekar { width: auto; }
	.sloty .akce { text-align: left; }
	.sloty tr.volno { display: flex; gap: 1rem; flex-wrap: wrap; }
}


/* kalendář v administraci */

.legenda {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem 1.5rem;
	margin: 0 0 1.5rem;
	font-size: .95rem;
	color: var(--ink-soft);
}
.legenda span::before {
	content: '';
	display: inline-block;
	width: .9rem; height: .9rem;
	margin-right: .4rem;
	border-radius: 3px;
	vertical-align: -.1em;
	border: 1px solid var(--line);
	background: var(--surface);
}
.legenda .l-otevreno::before { background: var(--brand); border-color: var(--brand); }
.legenda .l-zavreno::before { background: #e6ecef; }
.legenda .l-obsazeno::before { background: var(--ok-soft); border-color: var(--ok); }

.mesice {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
	gap: 1.25rem;
}
.mesic {
	padding: .9rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.mesic h2 { font-size: 1.1rem; margin-bottom: .6rem; }
.mesic h2::first-letter { text-transform: uppercase; }
.mesic table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.mesic th { font-size: .75rem; font-weight: 400; color: var(--ink-soft); padding-bottom: .25rem; }
.mesic td { padding: 1px; text-align: center; }
.mesic td a, .mesic td span {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 2.4rem;
	border-radius: 4px;
	font-size: .95rem;
	line-height: 1;
	text-decoration: none;
	color: var(--ink);
}
.mesic td a:hover { background: var(--brand-soft); }
.mesic td span { color: #9aabb3; background: #eef2f4; }
.mesic td small { font-size: .65rem; margin-top: 2px; }
.mesic td .otevreno { background: var(--brand); color: #fff; font-weight: 700; }
.mesic td .otevreno:hover { background: var(--brand-strong); color: #fff; }
.mesic td .minulost { opacity: .5; }
.mesic td .dnes { box-shadow: inset 0 0 0 2px var(--focus); }


/* ordinační časy jednoho dne */

.den-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin: 0 0 1.5rem;
}
.den-nav h1 { margin: 0; text-align: center; font-size: 1.6rem; }
.den-nav h1::first-letter { text-transform: uppercase; }

.segment {
	display: inline-flex;
	flex-wrap: wrap;
	gap: .4rem;
	margin: 0 0 1.5rem;
}
.segment a {
	padding: .5rem 1rem;
	border: 2px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink);
	font-weight: 700;
	text-decoration: none;
}
.segment a:hover { border-color: var(--brand); }
.segment a[aria-current] { border-color: var(--brand); background: var(--brand); color: #fff; }

.mrizka {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
	gap: .5rem;
}
.hodina {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 3.6rem;
	padding: .4rem .7rem;
	border: 2px dashed #a9bbc3;
	border-radius: var(--radius-small);
	background: transparent;
	color: var(--ink-soft);
	line-height: 1.2;
	text-decoration: none;
}
.hodina strong { font-size: 1.2rem; color: var(--ink); }
.hodina small { font-size: .8rem; }
.hodina:hover { border-style: solid; border-color: var(--brand); color: var(--brand); }
.hodina.otevreny { border: 2px solid var(--brand); background: var(--brand); color: #dcefff; }
.hodina.otevreny strong { color: #fff; }
.hodina.otevreny:hover { background: var(--brand-strong); }
.hodina.obsazeny { border: 2px solid var(--ok); background: var(--ok-soft); color: var(--ok); cursor: default; }
.hodina.obsazeny strong { color: var(--ok); }


@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
	.site-header .phone, .site-footer, .steps, .btn, .back, .admin-bar .akce { display: none; }
	body { background: #fff; }
}
