/**
 * PM Cookie Bar – front office
 * @author    Petr Machovec
 */
.pmcb { display: none; position: fixed; z-index: 2147483000; font-size: 14px; line-height: 1.5; color: var(--pmcb-text); }
.pmcb--visible { display: block; }
.pmcb * { box-sizing: border-box; }
.pmcb__backdrop { display: none; }
.pmcb--overlay, .pmcb--center { inset: 0; }
.pmcb--overlay .pmcb__backdrop, .pmcb--center .pmcb__backdrop { display: block; position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.pmcb__box {
  position: relative; background: var(--pmcb-bg); color: var(--pmcb-text);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .18); padding: 22px 24px;
  animation: pmcb-in .35s ease-out;
}
@keyframes pmcb-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Pozice */
.pmcb--bottom, .pmcb--top { left: 0; right: 0; }
.pmcb--bottom { bottom: 0; }
.pmcb--top { top: 0; }
.pmcb--bottom.pmcb--overlay, .pmcb--top.pmcb--overlay { inset: 0; }
.pmcb--bottom .pmcb__box, .pmcb--top .pmcb__box { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding: 20px max(24px, calc((100% - 1200px) / 2)); }
.pmcb--bottom.pmcb--overlay .pmcb__box { position: absolute; bottom: 0; left: 0; right: 0; }
.pmcb--top.pmcb--overlay .pmcb__box { position: absolute; top: 0; left: 0; right: 0; }
.pmcb--bottom .pmcb__main, .pmcb--top .pmcb__main { flex: 1 1 520px; }
.pmcb--bottom.pmcb--expanded .pmcb__main, .pmcb--top.pmcb--expanded .pmcb__main { flex-basis: 100%; }
.pmcb--bottom .pmcb__box, .pmcb--top .pmcb__box { border-radius: 0; }

.pmcb--bottom-left, .pmcb--bottom-right { bottom: 20px; }
.pmcb--bottom-left { left: 20px; }
.pmcb--bottom-right { right: 20px; }
.pmcb--bottom-left.pmcb--overlay, .pmcb--bottom-right.pmcb--overlay { inset: 0; }
.pmcb--bottom-left .pmcb__box, .pmcb--bottom-right .pmcb__box { width: 420px; max-width: calc(100vw - 40px); border-radius: var(--pmcb-radius); }
.pmcb--bottom-left.pmcb--overlay .pmcb__box, .pmcb--bottom-right.pmcb--overlay .pmcb__box { position: absolute; bottom: 20px; }
.pmcb--bottom-left.pmcb--overlay .pmcb__box { left: 20px; }
.pmcb--bottom-right.pmcb--overlay .pmcb__box { right: 20px; }

.pmcb--center { display: none; }
.pmcb--center.pmcb--visible { display: flex; align-items: center; justify-content: center; padding: 16px; }
.pmcb--center .pmcb__box { width: 560px; max-width: 100%; border-radius: var(--pmcb-radius); }

.pmcb__box { max-height: calc(100vh - 40px); overflow-y: auto; }

/* Obsah */
.pmcb__title { font-size: 18px; font-weight: 700; margin: 0 0 6px; color: var(--pmcb-text); }
.pmcb__text { margin: 0; color: var(--pmcb-text); opacity: .9; }
.pmcb__link { color: var(--pmcb-link); text-decoration: underline; margin-left: 4px; white-space: nowrap; }
.pmcb__close {
  position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; border: 0; background: transparent;
  color: var(--pmcb-text); font-size: 24px; line-height: 1; cursor: pointer; opacity: .55;
}
.pmcb__close:hover { opacity: 1; }

.pmcb__settings { margin-top: 16px; }
.pmcb__subtitle { font-weight: 700; margin: 0 0 8px; }
.pmcb__cat { border-top: 1px solid rgba(127, 127, 127, .2); padding: 12px 0; }
.pmcb__cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; cursor: pointer; font-weight: 600; }
.pmcb__cat-desc { margin: 4px 0 0; font-size: 13px; opacity: .8; }
.pmcb__always { font-size: 12px; font-weight: 600; color: var(--pmcb-toggle); }

/* Přepínač */
.pmcb__switch { position: relative; flex: 0 0 auto; width: 44px; height: 24px; }
.pmcb__switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.pmcb__slider { position: absolute; inset: 0; background: #c7c7c7; border-radius: 24px; transition: background .2s; }
.pmcb__slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.pmcb__switch input:checked + .pmcb__slider { background: var(--pmcb-toggle); }
.pmcb__switch input:checked + .pmcb__slider::before { transform: translateX(20px); }
.pmcb__switch input:focus-visible + .pmcb__slider { outline: 2px solid var(--pmcb-toggle); outline-offset: 2px; }

/* Tlačítka */
.pmcb__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pmcb--bottom .pmcb__actions, .pmcb--top .pmcb__actions { margin-top: 0; }
.pmcb__btn {
  flex: 1 1 auto; border: 0; cursor: pointer; padding: 11px 18px; font-size: 14px; font-weight: 600;
  border-radius: var(--pmcb-radius); transition: filter .15s, transform .15s; white-space: nowrap;
}
.pmcb__btn:hover { filter: brightness(.94); }
.pmcb__btn:active { transform: scale(.98); }
.pmcb__btn--primary { background: var(--pmcb-btn); color: var(--pmcb-btn-text); }
.pmcb__btn--secondary { background: var(--pmcb-btn2); color: var(--pmcb-btn2-text); }
.pmcb__btn[hidden] { display: none; }

/* Plovoucí ikonka pro znovuotevření nastavení */
.pmcb-fab {
  position: fixed; z-index: 2147482990; margin: 0; padding: 0; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--pmcb-btn, #2fb5d2); color: var(--pmcb-btn-text, #fff);
  border-radius: 50%; box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.pmcb-fab:hover { transform: scale(1.06); filter: brightness(.95); box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.pmcb-fab:active { transform: scale(.97); }
.pmcb-fab:focus-visible { outline: 3px solid var(--pmcb-toggle, #2fb5d2); outline-offset: 2px; }
.pmcb-fab svg { width: 50%; height: 50%; display: block; }

@media (max-width: 575px) {
  .pmcb__box { padding: 18px 16px; }
  .pmcb--bottom-left, .pmcb--bottom-right { left: 10px; right: 10px; bottom: 10px; }
  .pmcb--bottom-left .pmcb__box, .pmcb--bottom-right .pmcb__box { width: auto; max-width: none; }
  .pmcb__btn { flex-basis: 100%; }
}
