.short-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    position: absolute;
    right: 0;
    top: 0;
}

.save-short-btn.saved {
    background: green;
    color: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.card-item {
    position: relative;
}

.bonus-content-image-trigger {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    overflow: hidden;
}

.bonus-content-image-trigger:focus {
    outline: 2px solid #ff8e0e;
    outline-offset: -2px;
}

.bonus-content-image-trigger .short-thumbnail {
    display: block;
}

/* Bonus Content video fullscreen sizing. */
.short-videos-page .short-player-wrapper:fullscreen,
.short-videos-page .short-player-wrapper [data-player]:fullscreen,
.short-videos-page .short-player-wrapper:-webkit-full-screen,
.short-videos-page .short-player-wrapper [data-player]:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    height: 100svh !important;
    border-radius: 0 !important;
    background: #000 !important;
    overflow: hidden !important;
}

.short-videos-page .short-player-wrapper:fullscreen .player,
.short-videos-page .short-player-wrapper:fullscreen .player-poster,
.short-videos-page .short-player-wrapper:fullscreen .media-control,
.short-videos-page .short-player-wrapper:fullscreen video,
.short-videos-page .short-player-wrapper [data-player]:fullscreen .player,
.short-videos-page .short-player-wrapper [data-player]:fullscreen .player-poster,
.short-videos-page .short-player-wrapper [data-player]:fullscreen .media-control,
.short-videos-page .short-player-wrapper [data-player]:fullscreen video,
.short-videos-page .short-player-wrapper:-webkit-full-screen .player,
.short-videos-page .short-player-wrapper:-webkit-full-screen .player-poster,
.short-videos-page .short-player-wrapper:-webkit-full-screen .media-control,
.short-videos-page .short-player-wrapper:-webkit-full-screen video,
.short-videos-page .short-player-wrapper [data-player]:-webkit-full-screen .player,
.short-videos-page .short-player-wrapper [data-player]:-webkit-full-screen .player-poster,
.short-videos-page .short-player-wrapper [data-player]:-webkit-full-screen .media-control,
.short-videos-page .short-player-wrapper [data-player]:-webkit-full-screen video {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

.short-videos-page .short-player-wrapper:fullscreen video,
.short-videos-page .short-player-wrapper [data-player]:fullscreen video,
.short-videos-page .short-player-wrapper:-webkit-full-screen video,
.short-videos-page .short-player-wrapper [data-player]:-webkit-full-screen video {
    object-fit: contain !important;
    object-position: center center !important;
}

.short-videos-page .short-player-wrapper video:fullscreen,
.short-videos-page .short-player-wrapper video:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    height: 100svh !important;
    background: #000 !important;
    object-fit: contain !important;
    object-position: center center !important;
}

.short-overlay-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 8px;
    z-index: 5;
}

.icon-btn {
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.58);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.icon-btn:hover {
    background: rgba(0, 0, 0, 0.82);
    border-color: rgba(255, 107, 18, 0.7);
    color: #ff8e0e;
}

.icon-btn.save-short.saved {
    background: #ff6b12;
    border-color: #ff8e0e;
    color: #fff;
}

.icon-btn.save-short.is-confirmed {
    background: #ff6b12;
    border-color: #ff8e0e;
    color: #fff;
    transform: scale(1.08);
}

.shorts-message {
    display: none;
    width: max-content;
    max-width: min(100%, 520px);
    margin: 0 0 12px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.shorts-message.error {
    display: block;
    background: rgba(0, 0, 0, 0.82);
    border: 1px solid rgba(255, 107, 18, 0.75);
    color: #fff;
}

body.bonus-content-image-modal-open {
    overflow: hidden;
    overscroll-behavior: none;
}

.bonus-content-image-modal {
    position: relative;
    box-sizing: border-box;
}

.custom-modal-overlay--bonus-content-image-modal {
    width: 100%;
    max-width: 100%;
    height: 100%;
}

.modals-wrapper .modal-popup.ee-custom-modal.bonus-content-image-modal-popup,
.modals-wrapper .modal-popup.ee-custom-modal.bonus-content-image-modal-popup._show {
    position: fixed !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    height: 100svh !important;
    padding: 24px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    transform: none !important;
    background: transparent !important;
}

.modals-wrapper .modal-popup.ee-custom-modal.bonus-content-image-modal-popup .modal-inner-wrap {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: auto !important;
    max-width: calc(100vw - 48px) !important;
    height: auto !important;
    max-height: calc(100vh - 48px) !important;
    max-height: calc(100svh - 48px) !important;
    margin: auto !important;
    box-sizing: border-box !important;
    background: transparent;
    box-shadow: none;
    overflow: visible !important;
    transform: none !important;
}

.modals-wrapper .modal-popup.ee-custom-modal.bonus-content-image-modal-popup .modal-header,
.modals-wrapper .modal-popup.ee-custom-modal.bonus-content-image-modal-popup .modal-footer {
    display: none;
}

.modals-wrapper .modal-popup.ee-custom-modal.bonus-content-image-modal-popup .modal-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    box-sizing: border-box;
    overflow: visible;
}

.bonus-content-image-modal .bonus-content-modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
    min-height: 0;
    max-height: 100%;
    box-sizing: border-box;
}

.bonus-content-image-modal .js-bonus-content-modal-image {
    display: block;
    width: auto;
    max-width: min(100%, calc(100vw - 48px));
    height: auto;
    max-height: calc(100vh - 48px);
    max-height: calc(100svh - 48px);
    border: 3px solid #fff;
    background: #000;
    box-sizing: border-box;
    object-fit: contain;
}

.bonus-content-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #000;
    color: #fff;
    cursor: pointer;
}

.bonus-content-modal-close:hover,
.bonus-content-modal-close:focus {
    background: #ff6b12;
    color: #fff;
    outline: none;
}

@media (max-width: 767px) {
    .modals-wrapper .modal-popup.ee-custom-modal.bonus-content-image-modal-popup,
    .modals-wrapper .modal-popup.ee-custom-modal.bonus-content-image-modal-popup._show {
        padding: 12px !important;
    }

    .modals-wrapper .modal-popup.ee-custom-modal.bonus-content-image-modal-popup .modal-inner-wrap {
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100vh - 24px) !important;
        max-height: calc(100svh - 24px) !important;
    }

    .bonus-content-image-modal .js-bonus-content-modal-image {
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        max-height: calc(100svh - 24px);
    }

    .bonus-content-modal-close {
        top: 8px;
        right: 8px;
    }
}
