.interactive-replay {
    width: 100%;
    position: relative;
    z-index: 20;
    background: #000;
    color: #fff;
    overflow: visible;
}

body.interactive-replay-modal-open {
    overflow: hidden;
}

.interactive-replay--modal-host {
    position: fixed;
    inset: 0;
    z-index: 10050;
    width: auto;
    background: transparent;
    pointer-events: none;
}

#replayDetailHost.is-interactive-replay-open {
    position: relative;
    z-index: 20;
    min-height: 0 !important;
    overflow: visible;
    background: transparent;
    scroll-margin-top: 122px;
}

.interactive-replay__stage {
    display: grid;
    grid-template-columns: minmax(0, var(--interactive-replay-facility-width, 38fr)) 6px minmax(0, var(--interactive-replay-sandtown-width, 36fr)) minmax(320px, 26fr);
    grid-template-rows: var(--interactive-replay-row-height, clamp(360px, 31vw, 560px)) 56px;
    height: auto;
    min-height: 0;
    position: relative;
    padding-bottom: 0;
    background: transparent;
}

.interactive-replay__pane {
    min-width: 0;
    background: #000;
    border-right: 2px solid #f58220;
    position: relative;
    overflow: hidden;
}

.interactive-replay__pane.is-switching-camera::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 6;
    background: rgba(0, 0, 0, .18);
    pointer-events: none;
}

.interactive-replay__pane.is-switching-camera::after {
    content: "Switching camera...";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 7;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px 0 40px;
    border: 1px solid rgba(255, 130, 32, .72);
    border-radius: 999px;
    background:
        radial-gradient(circle at 20px 50%, transparent 0 5px, #f58220 6px 7px, transparent 8px),
        rgba(5, 9, 10, .84);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    transform: translate(-50%, -50%);
    pointer-events: none;
    white-space: nowrap;
}

.interactive-replay__facility,
.interactive-replay__sandtown {
    grid-row: 1;
}

.interactive-replay__facility {
    grid-column: 1;
}

.interactive-replay__resizer {
    grid-column: 2;
    grid-row: 1;
    width: 6px !important;
    min-width: 6px !important;
    height: 100%;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    appearance: none;
    background: linear-gradient(90deg, transparent 0, transparent 2px, #f58220 2px, #f58220 4px, transparent 4px) !important;
    color: transparent !important;
    cursor: col-resize;
    opacity: .8;
    z-index: 5;
    font-size: 0;
    line-height: 0;
}

.interactive-replay__resizer:hover,
.interactive-replay__resizer:focus {
    opacity: 1;
    outline: none;
}

body.interactive-replay-resizing {
    cursor: col-resize;
    user-select: none;
}

.interactive-replay__sandtown {
    grid-column: 3;
}

.interactive-replay__chat {
    grid-column: 4;
    grid-row: 1;
    height: 100%;
    max-height: 100%;
}

.interactive-replay__bar {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
}

.interactive-replay__pane-label {
    position: absolute;
    z-index: 3;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    max-width: calc(100% - 260px);
    padding: 6px 10px;
    border: 1px solid rgba(255, 106, 0, .56);
    border-radius: 999px;
    background: rgba(0, 0, 0, .72);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
}

.interactive-replay__player {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.interactive-replay__player-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
    opacity: 1;
    transition: opacity .16s ease;
}

.interactive-replay__player-layer.is-pending,
.interactive-replay__player-layer.is-retiring {
    pointer-events: none;
}

.interactive-replay__player-layer.is-pending {
    opacity: 1;
}

.interactive-replay__player-layer.is-retiring {
    opacity: 0;
}

.interactive-replay__player-layer.is-pending::before {
    content: '';
    position: absolute;
    top: calc(50% - 34px);
    left: 50%;
    z-index: 6;
    width: 32px;
    height: 32px;
    background: url('../../Mageplaza_Core/lib/fileUploader/img/loading.gif') center / contain no-repeat;
    transform: translate(-50%, -50%);
}

.interactive-replay__player-layer.is-pending::after {
    content: 'Replay is loading, please wait...';
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 16px 16px;
    background: rgba(0, 0, 0, .72);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
}

.interactive-replay__player [data-player],
.interactive-replay__player .clappr-player,
.interactive-replay__player .player,
.interactive-replay__player .player-poster,
.interactive-replay__player-layer,
.interactive-replay__player-layer > div,
.interactive-replay__player video {
    width: 100% !important;
    height: 100% !important;
}

.interactive-replay__player video {
    object-fit: cover;
}

.interactive-replay__player .media-control,
.interactive-replay__player .media-control-background,
.interactive-replay__player .media-control-layer,
.interactive-replay__player .media-control-center-panel,
.interactive-replay__player .media-control-left-panel,
.interactive-replay__player .media-control-right-panel,
.interactive-replay__player .playback_rate,
.interactive-replay__player .seekbar,
.interactive-replay__player .dvr-controls,
.interactive-replay__player .drawer-container,
.interactive-replay__player .play-wrapper,
.interactive-replay__player .play-wrapper[data-poster],
.interactive-replay__player .player-poster.clickable,
.interactive-replay__player .player-poster[data-poster] {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.interactive-replay__player video {
    pointer-events: none;
}

.interactive-replay__chat {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: #07111f;
    border-left: 1px solid rgba(255,255,255,.12);
}

.interactive-replay__chat .chat-header {
    background: #07111f;
    padding: 20px 18px 14px;
    border-bottom: 1px solid rgba(255,255,255,.14);
}

.interactive-replay__chat .chat-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.interactive-replay__chat .chat-title {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

.interactive-replay__chat .live-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-left: 5px;
    border-radius: 50%;
    background: #22c55e;
}

.interactive-replay__chat .chat-count {
    border-radius: 16px;
    background: #17243a;
    color: #cbd5e1;
    font-size: 13px;
    padding: 5px 10px;
}

.interactive-replay__chat .chat-header-bottom {
    margin-top: 18px;
    color: #b8c5d8;
    font-size: 14px;
}

.interactive-replay__chat .current-channel span {
    color: #fff;
    font-weight: 700;
}

.interactive-replay__chat-messages {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    padding: 14px 18px 18px;
    background: #07111f;
}

.interactive-replay__chat-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 14px;
}

.interactive-replay__chat-avatar {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f58220;
    color: #111;
    font-size: 12px;
    font-weight: 800;
}

.interactive-replay__chat-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
    color: #09705f;
    font-size: 12px;
    font-weight: 700;
}

.interactive-replay__chat-text {
    margin-top: 4px;
    color: #111827;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.interactive-replay__chat-bubble {
    width: fit-content;
    max-width: min(310px, 100%);
    background: #fff;
    color: #111827;
    border-radius: 0 8px 8px 8px;
    padding: 9px 12px;
}

.interactive-replay__chat-time {
    color: #526075;
    font-weight: 600;
}

.interactive-replay__chat-item--admin .interactive-replay__chat-avatar {
    background: #0b2a28;
    color: #8affcf;
    box-shadow: 0 0 0 2px rgba(61, 220, 151, .25);
}

.interactive-replay__chat-item--admin .interactive-replay__chat-bubble {
    border: 1px solid rgba(61, 220, 151, .36);
    background: #0b2a28;
    color: #effff8;
}

.interactive-replay__chat-item--admin .interactive-replay__chat-meta {
    color: #8affcf;
}

.interactive-replay__chat-item--admin .interactive-replay__chat-time {
    color: rgba(230, 255, 245, .68);
}

.interactive-replay__chat-item--admin .interactive-replay__chat-text {
    color: #effff8;
}

.interactive-replay__chat-admin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 17px;
    max-width: 100%;
    padding: 2px 7px;
    border: 1px solid rgba(138, 255, 207, .38);
    border-radius: 6px;
    background: rgba(138, 255, 207, .12);
    color: #8affcf;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: normal;
}

.interactive-replay__chat-readonly {
    flex: 0 0 auto;
    padding: 14px 18px;
    border-top: 1px solid rgba(255,255,255,.14);
}

.interactive-replay__chat-readonly .input-group {
    display: flex;
    align-items: center;
    width: 100%;
    border: 1px solid #f58220;
    border-radius: 7px;
    background: #fff;
    overflow: hidden;
}

.interactive-replay__chat-readonly input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: #fff;
    color: #6b7280;
    min-height: 52px;
    padding: 0 14px;
}

.interactive-replay__chat-readonly .sendtext {
    width: 44px;
    height: 44px;
    margin-right: 5px;
    border: 0;
    border-radius: 50%;
    background: #f4b07d;
    color: #fff;
}

.interactive-replay__controls {
    position: relative;
    grid-column: 1 / -1;
    grid-row: 2;
    z-index: 4;
    display: grid;
    grid-template-columns: auto auto auto minmax(150px, 1fr) minmax(90px, 130px);
    gap: 10px;
    align-items: center;
    width: auto;
    min-height: 56px;
    padding: 9px 12px 12px;
    border: 0;
    border-top: 1px solid #f58220;
    border-right: 0;
    border-radius: 0;
    background: #05090a;
    backdrop-filter: none;
    box-shadow: none;
}

.interactive-replay__controls button,
.interactive-replay__camera-card {
    border: 1px solid #f58220;
    border-radius: 6px;
    background: #111;
    color: #fff;
}

.interactive-replay__controls button {
    min-width: 68px;
    min-height: 34px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(0,0,0,.78);
}

.interactive-replay__controls button.is-playing {
    background: #f58220;
    color: #111;
}

.interactive-replay__controls span {
    font-size: 11px;
    white-space: nowrap;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.7);
}

.interactive-replay__sync-badge {
    border: 1px solid rgba(34, 197, 94, .75);
    border-radius: 999px;
    color: #bbf7d0 !important;
    padding: 4px 8px;
    text-transform: uppercase;
    font-weight: 800;
}

.interactive-replay__controls input[type="range"] {
    width: 100%;
    min-width: 0;
    accent-color: #1d8dff;
    background: transparent;
}

.interactive-replay__volume {
    display: grid;
    grid-template-columns: auto minmax(64px, 1fr);
    gap: 6px;
    align-items: center;
    min-width: 0;
}

.interactive-replay__volume span {
    font-size: 11px;
}

.interactive-replay__camera-picker {
    position: relative;
}

.interactive-replay__camera-trigger.facility-current-camera-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 190px;
    max-width: 300px;
    min-height: 48px;
    border: 1px solid #f58220;
    border-radius: 8px;
    background: rgba(10, 16, 24, .94);
    color: #fff;
    padding: 8px 12px;
}

.interactive-replay__camera-menu.facility-camera-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 5;
    min-width: 240px;
    border: 1px solid #f58220;
    border-radius: 7px;
    background: #111;
    overflow: hidden;
}

.interactive-replay__camera-menu.is-hidden {
    display: none;
}

.interactive-replay__modal {
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0,0,0,.82);
}

.interactive-replay__modal-panel {
    width: min(720px, 100%);
    background: #0d1828;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    padding: 22px;
}

.interactive-replay__camera-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.interactive-replay__camera-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 88px;
    padding: 14px;
    text-align: left;
}

.interactive-replay__modal.sandtown-now-modal {
    position: fixed;
    inset: 0;
    z-index: 10051;
    overflow-y: auto;
    pointer-events: auto;
    background: rgba(0,0,0,.86);
    align-items: flex-start;
    padding-top: max(96px, env(safe-area-inset-top));
    padding-bottom: 36px;
}

.interactive-replay__modal .sandtown-now-modal__panel {
    width: min(920px, 100%);
    margin: auto 0;
    max-height: calc(100vh - 132px);
    overflow: auto;
    border: 1px solid #f58220;
    border-radius: 8px;
    background: #050505;
}

.interactive-replay__modal .sandtown-now-camera-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
}

.interactive-replay__modal .sandtown-now-camera-card__photo {
    background: #101010;
}

.interactive-replay__modal .sandtown-now-camera-card__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.interactive-replay__camera-initials {
    width: 100%;
    height: 100%;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f58220;
    font-size: 42px;
    font-weight: 800;
}

.interactive-replay__state {
    padding: 32px;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media (min-width: 992px) and (max-width: 1199px) {
    #replayDetailHost.is-interactive-replay-open {
        padding-top: 18px;
    }

	    .interactive-replay__stage {
	        grid-template-columns: minmax(0, var(--interactive-replay-facility-width, 36fr)) 6px minmax(0, var(--interactive-replay-sandtown-width, 34fr)) minmax(240px, 30fr);
        grid-template-rows: var(--interactive-replay-row-height, clamp(260px, 31vw, 390px)) 56px;
	    }

	    .interactive-replay__chat {
	        grid-row: 1;
	        height: auto;
	        max-height: none;
	    }

    .interactive-replay__chat .chat-header {
        padding: 12px 12px 10px;
    }

    .interactive-replay__chat .chat-title {
        font-size: 18px;
        line-height: 1.15;
    }

    .interactive-replay__chat .chat-header-bottom {
        margin-top: 8px;
        font-size: 12px;
    }

    .interactive-replay__chat-messages {
        padding: 10px 12px;
    }

    .interactive-replay__chat-readonly {
        padding: 10px 12px;
    }

    .interactive-replay__chat-readonly input {
        min-height: 42px;
    }

    .interactive-replay__chat-readonly .sendtext {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 991px) {
	    .interactive-replay__stage {
	        grid-template-columns: 1fr;
	        grid-template-rows: auto auto auto auto auto;
	        height: auto;
	    }

    .interactive-replay__facility {
        grid-column: 1;
        grid-row: 1;
    }

	    .interactive-replay__sandtown {
	        grid-column: 1;
	        grid-row: 4;
	    }

	    .interactive-replay__resizer {
	        display: none;
	    }

    .interactive-replay__player {
        height: clamp(220px, 58vw, 340px);
        min-height: 0;
    }

	    .interactive-replay__chat {
	        grid-column: 1;
	        grid-row: 5;
	        height: clamp(220px, 58vw, 340px);
	        min-height: 220px;
	        max-height: 340px;
	    }

    .interactive-replay__controls {
        grid-column: 1;
        grid-row: 2;
        grid-template-columns: auto auto auto;
        gap: 8px;
        margin: 0;
        min-height: 100px;
        padding: 8px 12px 12px;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
        background: #07111f;
    }

    .interactive-replay__time {
        justify-self: end;
    }

    .interactive-replay__sync-badge {
        justify-self: start;
    }

    .interactive-replay__seek,
    .interactive-replay__volume {
        grid-column: 1 / -1;
    }

    .interactive-replay__volume {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .interactive-replay__pane-label {
        top: 58px;
        right: 10px;
        max-width: calc(100% - 20px);
    }

    .interactive-replay__modal.sandtown-now-modal {
        padding: 76px 14px 24px;
    }

    .interactive-replay__modal .sandtown-now-modal__panel {
        max-height: calc(100vh - 100px);
    }
}
