/*
 * Čitelnost veřejných formulářů (dotazník /cf, registrace, předregistrace, GDPR).
 * Aktivní jen pro <body class="pub-form"> (nastavuje presenter, viz $bodyClass v @layout-base.latte);
 * administrace dtb zůstává beze změny.
 *
 * Cíl: text tmavě (#222, kontrast ~15:1) a ne drobně (základ 16 px), aby formuláře přečetli
 * i starší lidé bez brýlí. Šablony mají spoustu inline stylů (color:#888, font-size:12px) a Bootstrap 2
 * třídu .muted (#999), proto se přebíjejí atributovými selektory — jedno místo pro všechny stránky.
 */
body.pub-form {
    font-size: 16px;
    line-height: 1.5;
    color: #222;
}

/* Šedé texty z Bootstrapu a ze šablon → tmavé */
.pub-form .muted,
.pub-form .help-block,
.pub-form .help-inline,
.pub-form .box-content,
.pub-form label,
.pub-form legend,
.pub-form small {
    color: #222;
}
.pub-form [style*="color:#555"], .pub-form [style*="color: #555"],
.pub-form [style*="color:#666"], .pub-form [style*="color: #666"],
.pub-form [style*="color:#777"], .pub-form [style*="color: #777"],
.pub-form [style*="color:#888"], .pub-form [style*="color: #888"],
.pub-form [style*="color:#999"], .pub-form [style*="color: #999"] {
    color: #222 !important;
}

/* Drobný text 11–13 px (inline i ve třídách) → 15 px */
.pub-form [style*="font-size:11px"], .pub-form [style*="font-size: 11px"],
.pub-form [style*="font-size:12px"], .pub-form [style*="font-size: 12px"],
.pub-form [style*="font-size:13px"], .pub-form [style*="font-size: 13px"] {
    font-size: 15px !important;
}
.pub-form small,
.pub-form .help-inline,
.pub-form .lang-toggle,
.pub-form .error { font-size: 15px; }

/* Ovládací prvky: Bootstrap 2 je nastavuje na 14 px / 20 px */
.pub-form label,
.pub-form input,
.pub-form select,
.pub-form textarea,
.pub-form button,
.pub-form .btn {
    font-size: 16px;
    line-height: 1.4;
}
.pub-form .btn-large { font-size: 18px; }
.pub-form input::placeholder,
.pub-form textarea::placeholder {
    color: #666;
    opacity: 1;
}

/* Přepínač jazyka (šablony mu dávají #888) */
.pub-form .lang-toggle a { color: #333; }
.pub-form .lang-toggle a.active { color: #fff; }

/* Odkazy v textu podtržené, ať je poznat, že jsou klikací */
.pub-form a:not(.btn):not(.btn-link) { text-decoration: underline; }
.pub-form .lang-toggle a { text-decoration: none; }

/* Viditelný focus pro klávesnici */
.pub-form a:focus,
.pub-form button:focus,
.pub-form input:focus,
.pub-form select:focus,
.pub-form textarea:focus,
.pub-form .btn:focus {
    outline: 3px solid #1a5fb4;
    outline-offset: 2px;
}

/* Nadpisy: v default.css jsou menší než nový základ textu (h1 18 px, h3 15 px, h4 14 px) */
.pub-form h1 { font-size: 26px; line-height: 1.25; }
.pub-form h2 { font-size: 22px; line-height: 1.3; }
.pub-form h3 { font-size: 19px; line-height: 1.3; }
.pub-form h4 { font-size: 17px; line-height: 1.3; }
.pub-form h5 { font-size: 16px; line-height: 1.3; }
/* Záhlaví boxu má pevnou výšku 20 px (default.css) */
.pub-form .box-header h2,
.pub-form .box-header h3 { font-size: 18px; line-height: 20px; margin: 0; }

/* Hlášky (alert): default.css jim vynucuje (!important) světlé barvy textu (varování #daac50 na #fffee1,
   info #5d9fa9, úspěch #7a9659) a písmo 12 px → tmavý text, 16 px. Vyšší specificita + !important. */
.pub-form .alert { font-size: 16px; line-height: 1.4; color: #5c4410 !important; }
.pub-form .alert.alert-info { color: #1f4e63 !important; }
.pub-form .alert.alert-success { color: #2b542c !important; }
.pub-form .alert.alert-warning { color: #5c4410 !important; }
.pub-form .alert.alert-danger,
.pub-form .alert.alert-error { color: #7a1f1d !important; }
.pub-form .alert strong { color: inherit; }

/* ── Mobil: hlavička (logo + kontakty) a GDPR formulář ── */
@media (max-width: 767px) {
    /* Hlavička: logo nahoře, pod ním kontakty a adresa pod sebou (na desktopu zůstávají plovoucí vpravo) */
    .pub-form .pub-header { display: flex; flex-direction: column; }
    .pub-form .pub-header > img { order: 1; max-width: 100%; height: auto; width: auto; max-height: 45px; align-self: flex-start; }
    .pub-form .pub-header > .pull-right { float: none; order: 2; margin: 8px 0 0; text-align: left; }
    .pub-form .pub-header > .pull-margin-left { margin-left: 0; }

    /* GDPR formulář: tabulka štítek|pole → štítek nad polem, pole na celou šířku */
    .pub-form .gdpr-fill form table,
    .pub-form .gdpr-fill form tbody,
    .pub-form .gdpr-fill form tr,
    .pub-form .gdpr-fill form th,
    .pub-form .gdpr-fill form td { display: block; width: 100%; box-sizing: border-box; text-align: left; }
    .pub-form .gdpr-fill form th { padding: 10px 0 2px; }
    .pub-form .gdpr-fill form th:empty { display: none; }
    .pub-form .gdpr-fill form td { padding: 0; }
    .pub-form .gdpr-fill form input[type=text],
    .pub-form .gdpr-fill form input[type=email],
    .pub-form .gdpr-fill form input[type=tel],
    .pub-form .gdpr-fill form input[type=date],
    .pub-form .gdpr-fill form input[type=file],
    .pub-form .gdpr-fill form select,
    .pub-form .gdpr-fill form textarea { width: 100%; max-width: 100%; box-sizing: border-box; }
    .pub-form .gdpr-fill form input[type=checkbox] { margin-right: 8px; }
    .pub-form .gdpr-fill form legend { font-size: 20px; }
    .pub-form .gdpr-terms { max-height: 260px !important; }
}

/* Tlačítko odeslání GDPR formuláře: vystředěné (na mobilu na celou šířku) */
.pub-form .gdpr-fill form > table { width: 100%; }
.pub-form .gdpr-fill form > table td { text-align: center; }
.pub-form .gdpr-fill form input[type=submit].btn { display: inline-block; margin: 16px 0 8px; }
@media (max-width: 767px) {
    .pub-form .gdpr-fill form input[type=submit].btn { width: 100%; box-sizing: border-box; }
}
