/* Okna Ogladaj (MRWin) - wyniesione z _mr_watch.tpl, zeby przegladarka je pamietala. */
/* ── Pływające okna w stylu X.com: czerń, cienkie linie, dużo powietrza ── */
.mrw {
    position: fixed;
    z-index: 20000000;   /* wyzej niz .theater-close-btn / .theater-chat-expand-btn (9999999) na tej stronie */
    display: flex;
    flex-direction: column;
    background: #000;
    border: 1px solid #2f3336;
    border-radius: 16px;
    box-shadow: 0 0 24px rgba(255,255,255,0.04), 0 0 4px 1px rgba(255,255,255,0.06);
    overflow: hidden;
    opacity: 0;
    transform: scale(.98);
    transition: opacity .15s ease, transform .15s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    contain: layout paint;
}
.mrw.mrw-in {
    opacity: 1;
    transform: none;
}
.mrw-bar {
    flex: 0 0 53px;
    height: 53px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px 0 16px;
    background: rgba(0,0,0,0.86);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #2f3336;
    cursor: move;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}
.mrw-ic {
    color: #71767b;
    font-size: 14px;
    flex: 0 0 auto;
    display: inline-flex;
}
.mrw-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #e7e9ea;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.mrw-btns {
    display: flex;
    gap: 2px;
    flex: 0 0 auto;
}
.mrw-btn {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #71767b;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s ease, color .15s ease;
}
.mrw-btn:hover {
    background: rgba(239,243,244,0.1);
    color: #e7e9ea;
}
.mrw-btn:active {
    background: rgba(239,243,244,0.15);
}
.mrw-btn.mrw-close:hover {
    background: rgba(244,33,46,0.1);
    color: #f4212e;
}
.mrw-body {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    background: #000;
}
.mrw-body iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #000;
}
.mrw-load {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    z-index: 2;
    transition: opacity .25s ease;
}
.mrw-load::after {
    content: '';
    width: 28px;
    height: 28px;
    border: 2.5px solid rgba(0,83,203,0.2);
    border-top-color: #0053cb;
    border-radius: 50%;
    animation: mrw-spin .75s linear infinite;
}
.mrw-load.mrw-hide {
    opacity: 0;
    pointer-events: none;
}
@keyframes mrw-spin {
    to { transform: rotate(360deg); }
}
.mrw-rs {
    position: absolute;
    z-index: 4;
    touch-action: none;
}
.mrw-rs-e  { top: 53px; right: -3px; width: 8px; bottom: 10px; cursor: ew-resize; }
.mrw-rs-w  { top: 53px; left: -3px; width: 8px; bottom: 10px; cursor: ew-resize; }
.mrw-rs-s  { left: 10px; right: 10px; bottom: -3px; height: 8px; cursor: ns-resize; }
.mrw-rs-se { right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; }
.mrw-rs-sw { left: 0; bottom: 0; width: 18px; height: 18px; cursor: nesw-resize; }
.mrw-rs-se::before {
    content: '';
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 7px;
    height: 7px;
    border-right: 2px solid #2f3336;
    border-bottom: 2px solid #2f3336;
    border-radius: 0 0 2px 0;
}
.mrw:hover .mrw-rs-se::before {
    border-color: #536471;
}

/* Podczas przeciagania/skalowania iframe nie moze lapac zdarzen myszy */
.mrw.mrw-busy .mrw-body { pointer-events: none; }
.mrw.mrw-busy { transition: none; }

/* Zwiniecie do samego paska tytulu */
.mrw.mrw-rolled { height: 53px !important; min-height: 0 !important; }
.mrw.mrw-rolled .mrw-bar { border-bottom: 0; }
.mrw.mrw-rolled .mrw-body,
.mrw.mrw-rolled .mrw-rs { display: none !important; }

/* Maksymalizacja */
.mrw.mrw-maxed {
    left: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0;
    border-width: 0;
    box-shadow: none;
}
.mrw.mrw-maxed .mrw-bar { cursor: default; }
.mrw.mrw-maxed .mrw-rs { display: none; }

@media (max-width: 760px) {
    .mrw {
        left: 0 !important;
        top: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        border-radius: 0;
        border-width: 0;
        box-shadow: none;
    }
    .mrw .mrw-bar { cursor: default; }
    .mrw .mrw-rs,
    .mrw .mrw-max { display: none !important; }
}
