﻿/* Veľkosť písma celej aplikácie – zmeňte len toto číslo (napr. 10px, 12px, 14px).
   Všetky ostatné rozmery (tlačidlá, polia, tabuľky, odstupy) sa prispôsobia automaticky. */
html { font-size: 10px; }

* { box-sizing: border-box; }
body { margin: 0; font-family: Segoe UI, Arial, sans-serif; font-size: 1rem; line-height: 1.4; background: #f4f6f8; color: #1f2933; }
.top { background: #1d4f91; color: #fff; padding: .8em 1.2em; display: flex; gap: 2em; align-items: center; }
.top a { color: #fff; text-decoration: none; }
.brand { font-weight: 700; font-size: 1.2em; }
.top nav a { margin-right: 1.4em; opacity: .9; }
main { max-width: none; margin: 1.6em 1.2em; padding: 0; }
h1 { margin: 0 0 .6em; font-size: 1.6em; }
h2 { font-size: 1.3em; }
p { margin: .6em 0; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: .45em .7em; border-bottom: 1px solid #e1e5ea; text-align: left; vertical-align: middle; }
thead th { background: #e8eef6; }
tr.start td { background: #eef7ee; font-weight: 600; }
.kv th { width: 16em; background: #f4f6f8; }
.card { background: #fff; border-radius: 5px; padding: 1.1em; margin-bottom: 1.4em; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card h2 { margin: 0 0 .6em; font-size: 1.3em; }
.btn { display: inline-block; background: #1d4f91; color: #fff; border: 0; padding: .5em 1em; border-radius: 3px; cursor: pointer; text-decoration: none; font: inherit; line-height: 1.4; }
.btn.secondary { background: #6b7785; }
.btn.danger { background: #c0392b; }
.btn.small { padding: .3em .7em; }
.form label { display: block; margin-bottom: .9em; font-weight: 600; }
.form input, .form textarea { display: block; width: 100%; padding: .45em .6em; margin-top: .3em; border: 1px solid #c3cad2; border-radius: 3px; font: inherit; }
.form { max-width: 42em; }
.form label.check { display: flex; align-items: center; gap: .6em; font-weight: normal; cursor: pointer; }
.form input[type=checkbox] { display: inline-block; width: auto; margin: 0; flex: none; }
.form.row { max-width: none; display: flex; gap: .9em; align-items: flex-end; flex-wrap: wrap; }
.form.row label { flex: 1; min-width: 13em; margin: 0; }
.inline { display: inline; }
.actions { white-space: nowrap; text-align: right; }
.muted { color: #6b7785; }
.error { color: #c0392b; }
.ikona { font-size: 1.3em; vertical-align: middle; }
tfoot .sum td { font-weight: 700; background: #e8eef6; }
.small-note { font-size: .9em; margin-bottom: 0; }
select { width: 100%; padding: .45em .6em; margin-top: .3em; border: 1px solid #c3cad2; border-radius: 3px; font: inherit; background: #fff; }
.inputgroup { display: flex; gap: .5em; align-items: stretch; margin-top: .3em; }
.inputgroup input { margin-top: 0; flex: 1; }
.gbtn { border: 1px solid #c3cad2; background: #fff; border-radius: 3px; padding: 0 .7em; cursor: pointer; font-size: 1.2em; font-weight: 700; line-height: 1; white-space: nowrap; }
.gbtn:hover { background: #eef3fb; border-color: #4285f4; }
.logout { display: inline; margin: 0 0 0 1em; }
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(18em, 1fr)); gap: 1em; }
.galeria figure { margin: 0; background: #f4f6f8; border-radius: 3px; overflow: hidden; }
.galeria .media { display: flex; align-items: center; justify-content: center; height: 13em; background: #1f2933; color: #fff; text-decoration: none; }
.galeria a.media { background: #e8eef6; color: #1d4f91; }
.galeria img { width: 100%; height: 13em; object-fit: cover; display: block; }
.galeria video, .galeria iframe { width: 100%; height: 13em; display: block; border: 0; background: #000; }
.galeria figcaption { padding: .5em .7em; display: flex; flex-direction: column; gap: .3em; align-items: flex-start; }
.stav { font-weight: 600; color: #1d4f91; margin: .4em 0 0; min-height: 1.4em; }
.linkbtn { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; }

/* nadmorská výška: stúpanie / klesanie pod výškou */
.prevysenie { font-size: .85em; white-space: nowrap; }
.c-vyska { white-space: nowrap; }

/* ---------- výber miesta na mape: okno cez celú obrazovku v rámci stránky ---------- */
.mapa-okno { position: fixed; inset: 0; z-index: 1000; background: #fff; }
.mapa-okno iframe { width: 100%; height: 100%; border: 0; display: block; }
body.mapa-otvorena { overflow: hidden; }
#btnInstalovat { margin-right: 1.4em; text-decoration: none; opacity: .9; }

/* ---------- mobil (šírka do 700 px) ---------- */
@media (max-width: 700px) {
    html { font-size: 16px; }            /* väčšie písmo; 16 px zabráni aj priblíženiu stránky pri písaní na iPhone */
    .top { flex-wrap: wrap; gap: .4em 1em; padding: .6em .9em; padding-top: calc(.6em + env(safe-area-inset-top)); }
    .top nav { display: flex; flex-wrap: wrap; align-items: center; gap: .3em 1.1em; width: 100%; }
    .top nav a, #btnInstalovat { margin: 0; padding: .3em 0; }
    .logout { margin: 0; }
    main { margin: 1em .7em; padding-bottom: env(safe-area-inset-bottom); }
    h1 { font-size: 1.35em; }
    .card { padding: .9em; }
    .btn { padding: .6em 1em; }
    .btn.small { padding: .45em .8em; }
    .form.row label { min-width: 100%; }
    .form.row .btn { width: 100%; }
    .kv th { width: auto; }

    /* tabuľky ako karty: každý riadok = karta, pred hodnotou je názov stĺpca */
    table.resp, table.resp tbody, table.resp tfoot, table.resp tr, table.resp td { display: block; width: 100%; }
    table.resp thead { display: none; }
    table.resp { background: transparent; }
    table.resp tr { background: #fff; border-radius: 6px; margin-bottom: .7em; box-shadow: 0 1px 3px rgba(0,0,0,.1); padding: .4em 0; }
    table.resp td { border: 0; padding: .3em .8em; display: flex; gap: .8em; justify-content: space-between; text-align: right; }
    table.resp td[data-label]::before { content: attr(data-label); font-weight: 600; color: #6b7785; text-align: left; flex: none; }
    table.resp td:empty { display: none; }
    table.resp td.actions { justify-content: flex-start; flex-wrap: wrap; gap: .4em; white-space: normal; padding-top: .6em; }
    table.resp td.actions::before { display: none; }
    table.resp td.actions form { display: inline; }
    table.resp tr.start td { background: transparent; }
    table.resp tr.start { background: #eef7ee; }
    table.resp tfoot .sum { background: #e8eef6; }
    table.resp tfoot .sum td { background: transparent; }
    table.resp .c-vyska { flex-wrap: wrap; white-space: normal; }
    .galeria { grid-template-columns: 1fr; }
}

/* tlačidlo s mapou ako odkaz (rovnaký vzhľad ako ikona mapy vo formulári zastávky) */
a.gbtn { display: inline-flex; align-items: center; gap: .3em; text-decoration: none; color: #1f2933; padding: .25em .6em; vertical-align: middle; }
a.gbtn .gbtn-text { font-size: .75em; font-weight: 600; }
h1 a.gbtn { font-size: .75em; }
