/* Website pop-ups (modals). Variables are set per modal from the admin settings. */
html.wms-modal-zamek { overflow: hidden; }
.wms-modal { --wms-m-sirka: 520px; --wms-m-pozadi: #fff; --wms-m-text: #16161d; --wms-m-akcent: #2563eb; --wms-m-akcent-text: #fff; --wms-m-zaobleni: 16px; --wms-m-odsazeni: 32px; --wms-m-overlay: rgba(11, 11, 18, .55); --wms-m-cas: .28s;
  position: fixed; z-index: 2147483000; box-sizing: border-box; font-size: 16px; line-height: 1.5; color: var(--wms-m-text); pointer-events: none; }
.wms-modal *, .wms-modal *::before, .wms-modal *::after { box-sizing: border-box; }
.wms-modal-overlay { position: absolute; inset: 0; background: var(--wms-m-overlay); opacity: 0; transition: opacity var(--wms-m-cas) ease; pointer-events: auto; }
.wms-modal-okno { position: relative; width: min(var(--wms-m-sirka), 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain; background: var(--wms-m-pozadi); color: var(--wms-m-text); border-radius: var(--wms-m-zaobleni); pointer-events: auto; outline: none;
  opacity: 0; transition: opacity var(--wms-m-cas) ease, transform var(--wms-m-cas) cubic-bezier(.2, .8, .2, 1); }
.wms-stin .wms-modal-okno { box-shadow: 0 24px 64px -12px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .08); }
.wms-modal-obsah { padding: var(--wms-m-odsazeni); }
.wms-modal-obsah:has(> .wms-modal-sablona.wms-obrazek-nahore.wms-s-obrazkem), .wms-modal-obsah:has(> .wms-modal-sablona.wms-obrazek-vlevo.wms-s-obrazkem), .wms-modal-obsah:has(> .wms-modal-sablona.wms-obrazek-pozadi) { padding: 0; }

/* Types */
.wms-modal-stred, .wms-modal-cela { inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; }
.wms-modal-cela { padding: 0; }
.wms-modal-cela .wms-modal-okno { width: 100%; height: 100%; border-radius: 0; display: flex; align-items: center; justify-content: center; }
.wms-modal-cela .wms-modal-obsah { width: min(var(--wms-m-sirka), 100%); }
.wms-modal-roh { width: min(var(--wms-m-sirka), calc(100vw - 32px)); max-height: calc(100vh - 40px); display: flex; }
.wms-pozice-vpravo-dole { right: 20px; bottom: 20px; }
.wms-pozice-vlevo-dole { left: 20px; bottom: 20px; }
.wms-pozice-vpravo-nahore { right: 20px; top: 20px; }
.wms-pozice-vlevo-nahore { left: 20px; top: 20px; }
.wms-modal-roh .wms-modal-okno { width: 100%; }
.wms-modal-lista { left: 0; right: 0; }
.wms-lista-nahore { top: 0; }
.wms-lista-dole { bottom: 0; }
.wms-modal-lista .wms-modal-okno { width: 100%; border-radius: 0; overflow: visible; }
.wms-modal-lista .wms-modal-obsah { padding: var(--wms-m-odsazeni) 56px var(--wms-m-odsazeni) 16px; }

/* Animations */
.wms-anim-zoom .wms-modal-okno { transform: scale(.94) translateY(8px); }
.wms-anim-slide.wms-modal-stred .wms-modal-okno, .wms-anim-slide.wms-modal-cela .wms-modal-okno { transform: translateY(32px); }
.wms-anim-slide.wms-modal-roh .wms-modal-okno { transform: translateY(24px); }
.wms-anim-slide.wms-pozice-vpravo-nahore .wms-modal-okno, .wms-anim-slide.wms-pozice-vlevo-nahore .wms-modal-okno { transform: translateY(-24px); }
.wms-anim-slide.wms-lista-nahore .wms-modal-okno { transform: translateY(-100%); }
.wms-anim-slide.wms-lista-dole .wms-modal-okno { transform: translateY(100%); }
.wms-anim-none { --wms-m-cas: 0s; }
.wms-modal.wms-otevreno .wms-modal-overlay, .wms-modal.wms-otevreno.wms-otevreno .wms-modal-okno { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .wms-modal { --wms-m-cas: .01s; } }

/* Close button */
.wms-modal .wms-modal-zavrit { position: absolute; z-index: 2; top: 10px; right: 10px; display: grid; place-items: center; width: 34px; height: 34px; margin: 0; padding: 0; border: 0; border-radius: 50%;
  background: color-mix(in srgb, var(--wms-m-pozadi) 78%, var(--wms-m-text) 10%); color: var(--wms-m-text); cursor: pointer; opacity: .85; transition: opacity .15s, transform .15s, background .15s; box-shadow: none; }
.wms-modal .wms-modal-zavrit:hover { opacity: 1; transform: scale(1.06); }
.wms-modal .wms-modal-zavrit:focus-visible { outline: 2px solid var(--wms-m-akcent); outline-offset: 2px; }
.wms-modal .wms-modal-zavrit.wms-skryto { opacity: 0; pointer-events: none; }
.wms-modal-lista .wms-modal-zavrit { top: 50%; right: 12px; width: 30px; height: 30px; margin-top: -15px; background: transparent; }

/* Simple editor content */
.wms-modal-sablona { display: flex; flex-direction: column; }
.wms-modal-sablona.wms-zarovnani-center { text-align: center; }
.wms-modal-sablona.wms-zarovnani-center .wms-modal-akce { justify-content: center; }
.wms-modal-obrazek img { display: block; width: 100%; height: auto; max-height: 280px; object-fit: cover; }
.wms-obrazek-nahore .wms-modal-obrazek img { border-radius: var(--wms-m-zaobleni) var(--wms-m-zaobleni) 0 0; }
.wms-obrazek-nahore.wms-s-obrazkem .wms-modal-telo, .wms-obrazek-vlevo.wms-s-obrazkem .wms-modal-telo, .wms-obrazek-pozadi .wms-modal-telo { padding: var(--wms-m-odsazeni); }
.wms-obrazek-vlevo.wms-s-obrazkem { display: grid; grid-template-columns: 42% 1fr; align-items: stretch; }
.wms-obrazek-vlevo .wms-modal-obrazek img { height: 100%; max-height: none; border-radius: var(--wms-m-zaobleni) 0 0 var(--wms-m-zaobleni); }
.wms-obrazek-vlevo .wms-modal-telo { display: flex; flex-direction: column; justify-content: center; }
.wms-obrazek-pozadi { min-height: 280px; justify-content: flex-end; background-position: center; background-size: cover; background-repeat: no-repeat; border-radius: var(--wms-m-zaobleni); }
.wms-obrazek-pozadi .wms-modal-telo { background: linear-gradient(to top, color-mix(in srgb, var(--wms-m-pozadi) 92%, transparent) 55%, transparent); border-radius: 0 0 var(--wms-m-zaobleni) var(--wms-m-zaobleni); }
.wms-modal .wms-modal-stitek { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--wms-m-akcent); }
.wms-modal .wms-modal-nadpis { margin: 0 0 10px; padding: 0; font-size: clamp(22px, 4vw, 28px); line-height: 1.2; font-weight: 700; color: inherit; letter-spacing: -.01em; }
.wms-modal .wms-modal-text { font-size: 16px; color: inherit; opacity: .86; }
.wms-modal .wms-modal-text p, .wms-modal .wms-modal-poznamka p { margin: 0 0 10px; color: inherit; }
.wms-modal .wms-modal-text p:last-child, .wms-modal .wms-modal-poznamka p:last-child { margin-bottom: 0; }
.wms-modal .wms-modal-text a, .wms-modal .wms-modal-poznamka a { color: inherit; text-decoration: underline; }
.wms-modal .wms-modal-formular { margin-top: 18px; text-align: left; }
.wms-modal .wms-modal-formular .wms-form { --wms-form-akcent: var(--wms-m-akcent); --wms-form-text: var(--wms-m-text); }
.wms-modal .wms-form .wms-odeslat { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border: 0; border-radius: min(var(--wms-m-zaobleni), 12px);
  background: var(--wms-m-akcent); color: var(--wms-m-akcent-text); font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; }
.wms-modal .wms-form .wms-odeslat:hover { filter: brightness(1.08); color: var(--wms-m-akcent-text); }
.wms-modal .wms-modal-sablona.wms-zarovnani-center .wms-form .wms-akce { justify-content: center; }
.wms-modal .wms-modal-akce { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.wms-modal .wms-modal-tlacitko { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; margin: 0; padding: 0 22px; border: 0; border-radius: min(var(--wms-m-zaobleni), 12px);
  background: var(--wms-m-akcent); color: var(--wms-m-akcent-text); font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; transition: filter .15s, transform .15s; box-shadow: none; }
.wms-modal .wms-modal-tlacitko:hover { filter: brightness(1.08); transform: translateY(-1px); color: var(--wms-m-akcent-text); text-decoration: none; }
.wms-modal .wms-modal-tlacitko-2 { background: transparent; color: inherit; opacity: .75; }
.wms-modal .wms-modal-tlacitko-2:hover { opacity: 1; color: inherit; filter: none; }
.wms-modal .wms-modal-poznamka { margin-top: 14px; font-size: 12.5px; opacity: .6; }

/* Bar layout */
.wms-modal-lista .wms-modal-sablona, .wms-modal-lista .wms-modal-telo { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 16px; }
.wms-modal-lista .wms-modal-obrazek { display: none; }
.wms-modal-lista .wms-modal-stitek, .wms-modal-lista .wms-modal-nadpis, .wms-modal-lista .wms-modal-akce, .wms-modal-lista .wms-modal-formular, .wms-modal-lista .wms-modal-poznamka { margin: 0; }
.wms-modal-lista .wms-modal-nadpis { font-size: 16px; }
.wms-modal-lista .wms-modal-text { font-size: 14.5px; opacity: 1; }
.wms-modal-lista .wms-modal-tlacitko { min-height: 34px; padding: 0 14px; font-size: 13.5px; }

@media (max-width: 640px) {
  .wms-modal-stred { align-items: flex-end; padding: 0; }
  .wms-modal-stred .wms-modal-okno { width: 100%; max-height: 92vh; border-radius: var(--wms-m-zaobleni) var(--wms-m-zaobleni) 0 0; }
  .wms-anim-zoom.wms-modal-stred .wms-modal-okno { transform: translateY(40px); }
  .wms-modal-roh { left: 12px; right: 12px; width: auto; }
  .wms-pozice-vpravo-dole, .wms-pozice-vlevo-dole { bottom: 12px; top: auto; }
  .wms-pozice-vpravo-nahore, .wms-pozice-vlevo-nahore { top: 12px; bottom: auto; }
  .wms-obrazek-vlevo.wms-s-obrazkem { grid-template-columns: 1fr; }
  .wms-obrazek-vlevo .wms-modal-obrazek img { height: auto; max-height: 200px; border-radius: var(--wms-m-zaobleni) var(--wms-m-zaobleni) 0 0; }
  .wms-modal { --wms-m-odsazeni-mobil: min(var(--wms-m-odsazeni), 24px); }
  .wms-modal-obsah, .wms-obrazek-nahore.wms-s-obrazkem .wms-modal-telo, .wms-obrazek-vlevo.wms-s-obrazkem .wms-modal-telo, .wms-obrazek-pozadi .wms-modal-telo { padding: var(--wms-m-odsazeni-mobil); }
  .wms-modal-lista .wms-modal-obsah { padding: 10px 48px 10px 12px; }
  .wms-modal .wms-modal-akce { flex-direction: column; }
  .wms-modal-lista .wms-modal-akce { flex-direction: row; }
}
