/* =================================================================
 *  StageZone — Upozornění (Alerts)
 *  Port stylů z rplib RPDynamic/Alert.vue
 * ================================================================= */

.sz-alert,
.sz-alert *,
.sz-alert *::before,
.sz-alert *::after { box-sizing: border-box; }

/* ── Velikosti písma (mirror nn/tn/sm/de/md/lg/xl) ── */
.sz-fs-h-nn { font-size: 14px; } .sz-fs-h-tn { font-size: 16px; }
.sz-fs-h-sm { font-size: 18px; } .sz-fs-h-de { font-size: 22px; }
.sz-fs-h-md { font-size: 26px; } .sz-fs-h-lg { font-size: 32px; }
.sz-fs-h-xl { font-size: 40px; }

.sz-fs-p-nn { font-size: 11px; } .sz-fs-p-tn { font-size: 12px; }
.sz-fs-p-sm { font-size: 13px; } .sz-fs-p-de { font-size: 14px; }
.sz-fs-p-md { font-size: 15px; } .sz-fs-p-lg { font-size: 18px; }
.sz-fs-p-xl { font-size: 22px; }

.sz-fs-button-tn { font-size: 12px; } .sz-fs-button-sm { font-size: 14px; }
.sz-fs-button-md { font-size: 16px; } .sz-fs-button-lg { font-size: 18px; }
.sz-fs-button-xl { font-size: 20px; } .sz-fs-button-gt { font-size: 24px; }

/* =================================================================
 *  BOX (popup)
 * ================================================================= */

.sz-alert--box { position: fixed; z-index: 99990; }

.sz-alert__frame {
    position: fixed;
    z-index: 99990;
    width: calc(100% - var(--sz-alert-offset, 30px) * 2);
    height: fit-content;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

@media (min-width: 1024px) {
    .sz-alert--size-small .sz-alert__frame  { width: 300px; }
    .sz-alert--size-large .sz-alert__frame  { width: 500px; }
}
@media (max-width: 1023px) {
    .sz-alert--size-small .sz-alert__frame { width: 300px; }
    .sz-alert--size-large .sz-alert__frame { width: calc(100% - var(--sz-alert-offset, 30px) * 2); max-width: 500px; }
}

/* ── Pozice ── */
.sz-alert--v-top    .sz-alert__frame { top: var(--sz-alert-offset, 30px); }
.sz-alert--v-bottom .sz-alert__frame { bottom: var(--sz-alert-offset, 30px); }
.sz-alert--v-center .sz-alert__frame { top: 50%; }

.sz-alert--h-left   .sz-alert__frame { left: var(--sz-alert-offset, 30px); }
.sz-alert--h-right  .sz-alert__frame { right: var(--sz-alert-offset, 30px); }
.sz-alert--h-center .sz-alert__frame { left: 50%; }

/* ── Window ── */
.sz-alert__window {
    display: block;
    background-color: var(--sz-alert-bg, #fff);
    color: var(--sz-alert-color, inherit);
    text-align: var(--sz-alert-align, left);
    border-radius: var(--sz-alert-radius, 15px);
    overflow: hidden;
    text-decoration: none;
}
.sz-alert__window.is-clickable { cursor: pointer; }

.sz-alert__media { position: relative; overflow: hidden; line-height: 0; }

/* Play overlay – vizuální náznak klikatelnosti média */
.sz-alert__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* klik probublá na window (popup/odkaz) */
    transition: background 0.2s, transform 0.2s;
    z-index: 1;
}
.sz-alert__play svg { width: 30px; height: 30px; margin-left: 3px; }
.sz-alert__window.is-clickable:hover .sz-alert__play,
.sz-alert--clickable:hover .sz-alert__play {
    background: rgba(0,0,0,0.75);
    transform: translate(-50%, -50%) scale(1.08);
}
.sz-alert__media img,
.sz-alert__media video {
    width: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: var(--sz-alert-ratio, auto);
}
/* YouTube embed médium (default 16:9, lze přepsat poměrem stran) */
.sz-alert__media--embed {
    position: relative;
    width: 100%;
    aspect-ratio: var(--sz-alert-ratio, 16/9);
}
.sz-alert__media--embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none; /* žádný hover overlay; klik probublá na window (popup/odkaz) */
}

.sz-alert__body {
    padding: var(--sz-alert-pad, 20px);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sz-alert__title { font-weight: 700; line-height: 1.2; }
.sz-alert__text  { line-height: 1.5; }
.sz-alert__content { line-height: 1.5; }
.sz-alert__content :first-child { margin-top: 0; }
.sz-alert__content :last-child  { margin-bottom: 0; }

.sz-alert__button {
    display: inline-block;
    width: fit-content;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background-color: var(--sz-alert-btn, #1a73e8);
    color: var(--sz-alert-btn-color, #fff);
    text-decoration: none;
    cursor: pointer;
    line-height: 1.2;
}
.sz-alert--align-center .sz-alert__button { margin: 0 auto; }
.sz-alert--align-right  .sz-alert__button { margin-left: auto; }

.sz-alert__link {
    width: fit-content;
    color: var(--sz-alert-btn, #1a73e8);
    text-decoration: underline;
    cursor: pointer;
}
.sz-alert--align-center .sz-alert__link { margin: 0 auto; }
.sz-alert--align-right  .sz-alert__link { margin-left: auto; }

/* ── Křížek ── */
.sz-alert__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
}
.sz-alert__close svg { width: 16px; height: 16px; display: block; }
.sz-alert__close:hover { transform: scale(1.1); }
.sz-alert__close--invert { background: #34303d; color: #fff; }

/* =================================================================
 *  Viditelný stav (.is-visible) + výchozí transformace pro slide-in
 * ================================================================= */

/* Default slide podle umístění (když není zvolena animace) */
.sz-alert--h-left   .sz-alert__frame { transform: translateX(-120%); }
.sz-alert--h-right  .sz-alert__frame { transform: translateX(120%); }
.sz-alert--h-center .sz-alert__frame { transform: translateX(-50%); }
.sz-alert--v-center .sz-alert__frame { transform: translateY(-50%); }
.sz-alert--v-center.sz-alert--h-center .sz-alert__frame { transform: translate(-50%, -50%) scale(0.9); }

.sz-alert__frame.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(0) !important;
}
.sz-alert--v-center .sz-alert__frame.is-visible { transform: translateY(-50%) !important; }
.sz-alert--h-center:not(.sz-alert--v-center) .sz-alert__frame.is-visible { transform: translateX(-50%) !important; }
.sz-alert--h-center.sz-alert--v-center .sz-alert__frame.is-visible { transform: translate(-50%, -50%) !important; }

/* =================================================================
 *  Animace příjezdu (sz-anim-in-*) — přebíjí default slide
 * ================================================================= */

.sz-anim-in-appear .sz-alert__frame { transform: none; }
.sz-anim-in-appear.sz-alert--v-center .sz-alert__frame { transform: translateY(-50%); }
.sz-anim-in-appear.sz-alert--h-center.sz-alert--v-center .sz-alert__frame { transform: translate(-50%, -50%); }

.sz-anim-in-flip .sz-alert__frame { transform: perspective(600px) rotateY(90deg); transform-origin: center; }
.sz-anim-in-flip.sz-alert--v-center .sz-alert__frame { transform: translateY(-50%) perspective(600px) rotateY(90deg); }
.sz-anim-in-flip .sz-alert__frame.is-visible { transform: perspective(600px) rotateY(0deg) !important; }
.sz-anim-in-flip.sz-alert--v-center .sz-alert__frame.is-visible { transform: translateY(-50%) perspective(600px) rotateY(0deg) !important; }

.sz-anim-in-from-left   .sz-alert__frame { transform: translateX(-120%); }
.sz-anim-in-from-right  .sz-alert__frame { transform: translateX(120%); }
.sz-anim-in-from-bottom .sz-alert__frame { transform: translateY(120%); }
.sz-anim-in-from-top    .sz-alert__frame { transform: translateY(-120%); }
.sz-anim-in-from-bottom.sz-alert--v-center .sz-alert__frame { transform: translateY(70%); }
.sz-anim-in-from-top.sz-alert--v-center    .sz-alert__frame { transform: translateY(-170%); }

/* =================================================================
 *  Animace odjezdu (sz-anim-out-*) — aplikuje se při skrytí (frame ztratí .is-visible)
 * ================================================================= */

.sz-anim-out-appear .sz-alert__frame:not(.is-visible) { transform: none; opacity: 0; }
.sz-anim-out-flip   .sz-alert__frame:not(.is-visible) { transform: perspective(600px) rotateY(-90deg); }
.sz-anim-out-flip.sz-alert--v-center .sz-alert__frame:not(.is-visible) { transform: translateY(-50%) perspective(600px) rotateY(-90deg); }
.sz-anim-out-to-left   .sz-alert__frame:not(.is-visible) { transform: translateX(-120%); }
.sz-anim-out-to-right  .sz-alert__frame:not(.is-visible) { transform: translateX(120%); }
.sz-anim-out-to-bottom .sz-alert__frame:not(.is-visible) { transform: translateY(120%); }
.sz-anim-out-to-top    .sz-alert__frame:not(.is-visible) { transform: translateY(-120%); }

/* =================================================================
 *  ROW (banner)
 * ================================================================= */

.sz-alert--row {
    position: relative;
    width: 100%;
    background-color: var(--sz-alert-bg, #111);
    color: var(--sz-alert-color, #fff);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease;
}
.sz-alert--row.is-visible { max-height: 400px; opacity: 1; }

.sz-alert__row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 48px;
    text-align: var(--sz-alert-align, center);
}
.sz-alert__row-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}
.sz-alert__row .sz-alert__title { font-weight: 700; }
.sz-alert__row .sz-alert__button,
.sz-alert__row .sz-alert__link { margin: 0; }
.sz-alert__close--row {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: transparent;
    color: inherit;
    width: 28px;
    height: 28px;
}
.sz-alert__close--row:hover { transform: translateY(-50%) scale(1.15); }

.sz-alert--clickable .sz-alert__row,
.sz-alert--clickable.sz-alert--row { cursor: pointer; }

/* =================================================================
 *  Lightbox (popup YouTube)
 * ================================================================= */

.sz-alert-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2147483600;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vmin;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.sz-alert-lightbox.is-open { opacity: 1; }

.sz-alert-lightbox__inner {
    position: relative;
    width: 100%;
    max-width: 1100px;
    aspect-ratio: 16 / 9;
    background: #000;
}
.sz-alert-lightbox__inner iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.sz-alert-lightbox__close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.sz-alert-lightbox__close svg { width: 18px; height: 18px; display: block; }
.sz-alert-lightbox__close:hover { background: rgba(255,255,255,0.3); }

/* =================================================================
 *  Device targeting (Breakpoint hiding)
 * ================================================================= */

/* Desktop only: hide on screens smaller than 992px */
@media (max-width: 991px) {
    .sz-alert--devices-desktop {
        display: none !important;
    }
}

/* Tablet & Mobile only: hide on screens 992px or larger */
@media (min-width: 992px) {
    .sz-alert--devices-tablet {
        display: none !important;
    }
}

/* Mobile only: hide on screens 576px or larger */
@media (min-width: 576px) {
    .sz-alert--devices-mobile {
        display: none !important;
    }
}
