/* Doplňky vzhledu info2 nad styly control panelu (app.css). */
.info-home-tile { display: block; padding: 1.25rem; text-decoration: none; color: inherit; height: 100%; }
.info-home-tile:hover { background: var(--cp-hover); }
.info-home-tile .fa-solid { color: var(--cp-blue); font-size: 1.6rem; }
.info-module-row > td { background: var(--cp-surface-muted) !important; font-weight: 600; }
.info-content { max-width: 900px; }
.info-content img, .info-content iframe { max-width: 100%; }
.info-key { color: var(--cp-text-muted); font-family: var(--bs-font-monospace); font-size: .85em; }
.info-video-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; }

/* ---------- Formuláře s náhledem (zprávy, nápovědy, moduly) ---------- */
.info-page-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: 1rem; }
.info-page-head h1 { margin: 0; }
.info-page-head .info-page-sub { color: var(--cp-text-muted); font-size: .9rem; }

.info-editor { max-width: 1100px; margin-inline: auto; }

.info-section { background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: .5rem; padding: 1rem 1.25rem; margin-bottom: 1rem; }
.info-section > h2 { display: flex; align-items: center; gap: .6rem; font-size: 1.05rem; font-weight: 600; margin: 0 0 .25rem; }
.info-section > h2 .info-step { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--cp-blue); color: #fff; font-size: .85rem; flex: none; }
.info-section > .info-section-help { color: var(--cp-text-muted); font-size: .875rem; margin: 0 0 .9rem; }
.info-section .form-label { font-weight: 600; margin-bottom: .25rem; }
.info-section .form-text { margin-top: .2rem; }

/* volba typu jako karty (radio) */
.info-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .5rem; }
.info-choice .form-check { margin: 0; padding: 0; }
.info-choice .form-check-input { position: absolute; opacity: 0; }
.info-choice .form-check-label { display: block; height: 100%; padding: .6rem .75rem; border: 1px solid var(--cp-border); border-radius: .5rem; cursor: pointer; background: var(--cp-surface); }
.info-choice .form-check-label:hover { background: var(--cp-hover); }
.info-choice .form-check-input:checked + .form-check-label { border-color: var(--cp-blue); box-shadow: 0 0 0 2px color-mix(in srgb, var(--cp-blue) 35%, transparent); }
.info-choice .form-check-input:focus-visible + .form-check-label { outline: 2px solid var(--cp-blue); outline-offset: 2px; }
.info-choice-title { font-weight: 600; display: flex; align-items: center; gap: .4rem; }
.info-choice-desc { display: block; color: var(--cp-text-muted); font-size: .8rem; margin-top: .15rem; }
.info-dot { width: .7rem; height: .7rem; border-radius: 50%; display: inline-block; flex: none; }
.info-dot-default { background: var(--cp-blue); } .info-dot-info_msg { background: #0dcaf0; }
.info-dot-err_msg { background: #dc3545; } .info-dot-ok_msg { background: #198754; }

/* náhled */
.info-preview { position: sticky; top: calc(var(--cp-navbar-height) + 12px); }
.info-preview-frame { border: 1px solid var(--cp-border); border-radius: .5rem; overflow: hidden; background: var(--cp-surface); box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.info-preview-bar { display: flex; align-items: center; gap: .5rem; padding: .45rem .75rem; background: var(--cp-surface-muted); border-bottom: 1px solid var(--cp-border); font-size: .8rem; color: var(--cp-text-muted); }
.info-preview-bar .info-preview-dots { display: inline-flex; gap: 4px; }
.info-preview-bar .info-preview-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--cp-border); display: block; }
.info-preview-body { padding: 1rem 1.25rem; max-height: calc(100vh - 260px); overflow: auto; }
.info-preview-body .ck-content img, .info-preview-body iframe { max-width: 100%; }
.info-preview-empty { color: var(--cp-text-muted); font-style: italic; }
.info-preview-title { font-size: 1.3rem; font-weight: 600; margin: 0 0 .35rem; }
.info-preview-meta { color: var(--cp-text-muted); font-size: .8rem; margin-bottom: .75rem; }
.info-preview-alert { border-left: 4px solid; padding: .6rem .8rem; border-radius: .25rem; }
.info-preview-alert.is-info_msg { border-color: #0dcaf0; background: color-mix(in srgb, #0dcaf0 12%, transparent); }
.info-preview-alert.is-err_msg { border-color: #dc3545; background: color-mix(in srgb, #dc3545 10%, transparent); }
.info-preview-alert.is-ok_msg { border-color: #198754; background: color-mix(in srgb, #198754 10%, transparent); }
.info-audience { margin-top: 1rem; padding: .75rem 1rem; border-radius: .5rem; background: color-mix(in srgb, var(--cp-blue) 10%, var(--cp-surface)); border-left: 4px solid var(--cp-blue); font-size: 1rem; }
.info-audience i { color: var(--cp-blue); }

/* video miniatury */
.info-video-thumb { position: relative; display: block; border-radius: .4rem; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.info-video-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.info-video-thumb::after { content: "\f04b"; font: var(--fa-font-solid); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.8rem; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.info-video-thumb.is-empty { background: var(--cp-surface-muted); }
.info-video-thumb.is-empty::after { content: "\f03d"; color: var(--cp-text-muted); text-shadow: none; font-size: 1.4rem; }
.info-video-thumb.is-vimeo::after { content: "\f40a"; font: var(--fa-font-brands); font-size: 2.4rem; }
.info-videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.info-video-card { border: 1px solid var(--cp-border); border-radius: .5rem; padding: .75rem; background: var(--cp-surface); }
.info-video-card h3 { font-size: .9rem; font-weight: 600; margin: 0 0 .5rem; }

/* spodní lišta s tlačítky */
.info-actions { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .75rem 1rem; margin: 0 -10px -10px; background: color-mix(in srgb, var(--cp-surface) 92%, transparent); backdrop-filter: blur(4px); border-top: 1px solid var(--cp-border); }
.info-actions .info-actions-note { color: var(--cp-text-muted); font-size: .85rem; margin-left: auto; }

/* detail (zpráva, nápověda) */
.info-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; }
@media (max-width: 991.98px) { .info-detail { grid-template-columns: minmax(0, 1fr); } }
.info-detail-main { background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: .5rem; padding: 1.25rem 1.5rem; }
.info-detail-main > h1 { font-size: 1.6rem; font-weight: 600; margin: 0 0 .75rem; }
.info-detail-side { position: sticky; top: calc(var(--cp-navbar-height) + 12px); display: flex; flex-direction: column; gap: 1rem; }
.info-facts { background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: .5rem; padding: 1rem; }
.info-facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .35rem .75rem; font-size: .9rem; }
.info-facts dt { color: var(--cp-text-muted); font-weight: 400; }
.info-facts dd { margin: 0; word-break: break-word; }
.info-facts .btn { width: 100%; text-align: left; }
.info-empty { text-align: center; padding: 2rem 1rem; color: var(--cp-text-muted); border: 2px dashed var(--cp-border); border-radius: .5rem; }
.info-empty i { font-size: 2rem; display: block; margin-bottom: .5rem; }
.info-detail-main .ck-content { font-size: 1rem; line-height: 1.55; }
.info-detail-main .ck-content img { max-width: 100%; height: auto; }
/* Dlouhý text (zprávy s obrázky) se posouvá v editoru – formulář a náhled zůstanou přehledné. */
.info-section .ck-editor__editable_inline { min-height: 220px; max-height: 65vh; overflow-y: auto; }
.info-section .ck.ck-editor { width: 100%; }

/* ---------- Čitelnost formulářů a detailů (body.info-soft) ----------
   Šedé pozadí stránky, bílé sekce; nadpis sekce › popisek pole › pole › vysvětlivka jasně odlišené. */
:root { --info-page-bg: #eef1f5; --info-input-border: #aeb8c4; --info-label: #1f2933; --info-help: #6b7682; --info-preview-bg: #f7f9fc; }
[data-bs-theme=dark] { --info-page-bg: #181b20; --info-input-border: #56606c; --info-label: #e8ebef; --info-help: #9aa3ad; --info-preview-bg: #1f2329; }
body.info-soft, body.info-soft .cp-page { background: var(--info-page-bg); }

body.info-soft .info-page-head h1 { font-size: 1.7rem; font-weight: 700; color: var(--info-label); }
body.info-soft .info-section { padding: 0 1.25rem 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); border-color: transparent; }
body.info-soft .info-section > h2 { font-size: 1.15rem; font-weight: 700; color: var(--info-label); padding: .9rem 1.25rem .75rem; margin: 0 -1.25rem 1rem; border-bottom: 1px solid var(--cp-border); }
body.info-soft .info-section > h2 + .info-section-help { margin-top: -.4rem; }
body.info-soft .info-section > .info-section-help { margin: 0 0 1rem; color: var(--info-help); }
body.info-soft .info-section > :last-child, body.info-soft .info-section > .row:last-child > * > :last-child { margin-bottom: 0 !important; }

/* popisek pole › pole › vysvětlivka */
body.info-soft .form-label, body.info-soft .info-section legend { font-size: .95rem; font-weight: 700; color: var(--info-label); margin-bottom: .35rem; }
body.info-soft .form-text, body.info-soft .help-text { font-size: .8rem; color: var(--info-help); margin-top: .3rem; }
body.info-soft .mb-3 { margin-bottom: 1.25rem !important; }
body.info-soft .form-control, body.info-soft .form-select {
    background-color: var(--cp-surface); border: 1px solid var(--info-input-border); border-radius: .4rem; padding: .55rem .75rem; font-size: 1rem;
}
body.info-soft .form-control::placeholder { color: #a3acb6; font-style: italic; }
body.info-soft .form-control:hover, body.info-soft .form-select:hover { border-color: var(--cp-blue); }
body.info-soft .form-control:focus, body.info-soft .form-select:focus { border-color: var(--cp-blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cp-blue) 25%, transparent); }

/* editor: zřetelná plocha pro psaní */
body.info-soft .ck.ck-editor__main > .ck-editor__editable { background: var(--cp-surface); border-color: var(--info-input-border) !important; }
body.info-soft .ck.ck-editor__main > .ck-editor__editable.ck-focused { border-color: var(--cp-blue) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--cp-blue) 25%, transparent) !important; }
body.info-soft .ck.ck-toolbar { background: var(--cp-surface-muted); border-color: var(--info-input-border) !important; border-radius: .4rem .4rem 0 0 !important; }

/* volby jako karty */
body.info-soft .info-choice .form-check-label { border-color: var(--info-input-border); }
body.info-soft .info-choice .form-check-input:checked + .form-check-label { background: color-mix(in srgb, var(--cp-blue) 8%, var(--cp-surface)); }

/* videa */
body.info-soft .info-video-card { background: var(--cp-surface-muted); border-color: var(--cp-border); }
body.info-soft .info-video-card h3 { font-size: 1rem; font-weight: 700; color: var(--info-label); }

/* náhled – odlišený, není to místo pro psaní */
body.info-soft .info-preview-heading { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--info-help); margin: 0 0 .4rem; display: flex; align-items: center; gap: .4rem; }
body.info-soft .info-preview-frame { background: var(--info-preview-bg); border: 1px dashed var(--info-input-border); box-shadow: none; }
body.info-soft .info-preview-body { background: var(--cp-surface); margin: .75rem; border-radius: .4rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
body.info-soft .info-preview-title { font-size: 1.35rem; font-weight: 700; color: var(--info-label); }

/* spodní lišta */
body.info-soft .info-actions { margin: 0; border-radius: .5rem .5rem 0 0; box-shadow: 0 -2px 10px rgba(0,0,0,.08); }
body.info-soft .info-actions .btn-primary { padding: .5rem 1.5rem; font-weight: 600; }

/* detail */
body.info-soft .info-detail-main, body.info-soft .info-facts { border-color: transparent; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
body.info-soft .info-detail-main > h1 { font-size: 1.8rem; font-weight: 700; color: var(--info-label); padding-bottom: .75rem; border-bottom: 1px solid var(--cp-border); }
body.info-soft .info-facts dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; padding-top: .1rem; }
body.info-soft .info-facts dd { font-weight: 600; color: var(--info-label); }
.info-editor + .info-actions { max-width: 1100px; margin-inline: auto; }

/* Formuláře a detaily uprostřed stránky (navigace, nadpis, upozornění, formulář, lišta i detail). */
body.info-soft .cp-page > nav[aria-label=breadcrumb],
body.info-soft .cp-page > .alert,
body.info-soft .cp-page > .info-page-head,
body.info-soft .cp-page > form > .info-editor,
body.info-soft .cp-page > form > .info-actions { max-width: 1100px; margin-left: auto; margin-right: auto; }
body.info-soft .cp-page > nav[aria-label=breadcrumb]:has(+ .info-detail) { max-width: 1240px; }
body.info-soft .info-detail { max-width: 1240px; margin-inline: auto; }
