:root {
    --myprot-story-ring: #18a957;
    --myprot-story-bg: transparent;
}

/* =========================================
   MAIN STORIES CONTAINER
========================================= */

.myprot-stories {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: transparent !important;
}


/* =========================================
   BRAND STORIES HORIZONTAL TRACK
========================================= */

.myprot-stories-track {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;

    padding: 2px 12px 5px;

    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.myprot-stories-track::-webkit-scrollbar {
    display: none;
}


/* =========================================
   BRAND ITEM
========================================= */

.myprot-story-brand {
    flex: 0 0 auto;

    width: 100px !important;
    min-width: 100px !important;

    height: auto !important;

    border: 0 !important;
    outline: 0 !important;

    padding: 0 !important;
    margin: 0 !important;

    background: transparent !important;
    background-color: transparent !important;

    box-shadow: none !important;

    color: inherit;

    cursor: pointer;

    text-align: center;

    font: inherit;

    border-radius: 0 !important;

    -webkit-appearance: none;
    appearance: none;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
}


/* Remove any hover background */

.myprot-story-brand:hover,
.myprot-story-brand:focus,
.myprot-story-brand:active,
.myprot-story-brand:visited {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}


/* =========================================
   STORY RING
========================================= */

.myprot-story-ring {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100px;
    height: 100px;

    flex: 0 0 100px;

    margin: 0;

    border-radius: 50%;

    padding: 2px;

    background: #18a957;

    transition: none !important;
}


/* =========================================
   BRAND LOGO
========================================= */

.myprot-story-avatar {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    border-radius: 50%;

    background: #fff;

    padding: 2px;

    overflow: hidden;
}

.myprot-story-avatar img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    border-radius: 50%;
}


/* =========================================
   FALLBACK LETTER
========================================= */

.myprot-story-letter {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    border-radius: 50%;

    background: #111;

    color: #fff;

    font-weight: 700;
    font-size: 24px;
}


/* =========================================
   BRAND NAME
========================================= */

.myprot-story-name {
    display: block !important;

    width: 100px;
    max-width: 100px;

    margin: 6px auto 0;

    padding: 0;

    text-align: center;

    font-size: 11px;
    line-height: 16px;

    font-weight: 500;

    color: #111;

    background: transparent !important;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================================
   STORY VIEWER
========================================= */

.myprot-story-viewer {
    position: fixed;

    inset: 0;

    z-index: 999999;

    display: none;

    align-items: center;
    justify-content: center;
}

.myprot-story-viewer.is-open {
    display: flex;
}


/* =========================================
   VIEWER BACKDROP
========================================= */

.myprot-story-backdrop {
    position: absolute;

    inset: 0;

    background: rgba(0, 0, 0, .92);
}


/* =========================================
   STORY DIALOG
========================================= */

.myprot-story-dialog {
    position: relative;

    z-index: 2;

    width: min(100vw, 520px);

    height: min(100vh, 920px);

    background: #111;

    overflow: hidden;

    border-radius: 0;

    touch-action: pan-y;
}


/* =========================================
   TOP AREA
========================================= */

.myprot-story-top {
    position: absolute;

    z-index: 5;

    top: 0;
    left: 0;
    right: 0;

    padding: 10px 10px 0;
}


/* =========================================
   PROGRESS BAR
========================================= */

.myprot-story-progress {
    display: flex;

    gap: 4px;

    width: 100%;

    height: 3px;
}

.myprot-progress-bar {
    position: relative;

    flex: 1;

    min-width: 0;

    overflow: hidden;

    border-radius: 99px;

    background: rgba(255, 255, 255, .35);
}

.myprot-progress-bar::after {
    content: "";

    position: absolute;

    inset: 0;

    transform: scaleX(0);

    transform-origin: left center;

    background: #fff;
}

.myprot-progress-bar.is-complete::after {
    transform: scaleX(1);
}

.myprot-progress-bar.is-running::after {
    animation:
        myprotStoryProgress
        var(--myprot-duration)
        linear
        forwards;
}


@keyframes myprotStoryProgress {

    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }

}


/* =========================================
   VIEWER HEADER
========================================= */

.myprot-story-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    padding-top: 12px;

    color: #fff;
}

.myprot-story-brand-info {
    display: flex;

    align-items: center;

    gap: 9px;

    min-width: 0;
}


/* =========================================
   VIEWER AVATAR
========================================= */

.myprot-viewer-avatar {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    border-radius: 50%;

    overflow: hidden;

    background: #fff;
}

.myprot-viewer-avatar img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.myprot-viewer-avatar span {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    background: #111;

    color: #fff;

    font-weight: 700;
}


/* =========================================
   VIEWER BRAND NAME
========================================= */

.myprot-viewer-brand {
    font-size: 14px;

    font-weight: 700;

    text-shadow:
        0 1px 4px rgba(0, 0, 0, .5);
}


/* =========================================
   CLOSE BUTTON
========================================= */

.myprot-story-close {
    width: 40px;
    min-width: 20px;
    height: 40px;
    border: 0;
    padding: 0;
    background: transparent !important;
    color: #fff;
    font-size: 32px;
    line-height: 40px;
    cursor: pointer;
}


/* =========================================
   STORY MEDIA
========================================= */

.myprot-story-media {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #111;
}

.myprot-story-image,
.myprot-story-video {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    user-select: none;

    -webkit-user-drag: none;
}


/* =========================================
   OLD < > BUTTONS
   Hidden — navigation is by clicking
   left/right halves of the Story
========================================= */

.myprot-story-nav {
    display: none !important;
}


/* =========================================
   BUY BUTTON
========================================= */

.myprot-story-bottom {
    position: absolute;

    z-index: 7;

    left: 0;
    right: 0;

    bottom: 0;

    display: flex;

    justify-content: center;

    padding:
        0
        16px
        22px;
}

.myprot-story-instagram {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 0 20px;

    border-radius: 999px;

    background: rgba(255, 255, 255, .94);

    color: #111 !important;

    font-size: 13px;

    font-weight: 700;

    text-decoration: none !important;

    box-shadow:
        0 4px 18px rgba(0, 0, 0, .25);
}


/* =========================================
   DESKTOP / TABLET SCROLL BUTTONS
========================================= */

.myprot-brand-scroll {
    position: absolute;

    padding: 0;

    min-width: 15px !important;

    z-index: 3;

    top: 50%;

    transform: translateY(-50%);

    width: 15px;

    height: 54px;

    border: 0;

    border-radius: 7px;

    background: transparent !important;

    color: #000 !important;

    box-shadow:
        0 2px 10px rgba(0, 0, 0, .12);

    font-size: 32px;

    line-height: 50px;

    align-items: center;

    justify-content: center;

    cursor: pointer;
}

.myprot-brand-scroll-prev {
    left: 2px;
}

.myprot-brand-scroll-next {
    right: 2px;
}

.myprot-brand-scroll:disabled {
    opacity: .35;

    cursor: default;
}


/* =========================================
   DESKTOP + TABLET
   7 STORIES
========================================= */

@media (min-width: 601px) {

    .myprot-brand-scroll {
        display: flex;
    }

    .myprot-stories-track {
        gap: 16px;

        padding-left: 48px;
        padding-right: 48px;
    }

    .myprot-story-brand {

        width:
            calc(
                (100% - 6 * 16px) / 7
            ) !important;

        min-width:
            calc(
                (100% - 6 * 16px) / 7
            ) !important;

        height: auto !important;
    }

    .myprot-story-ring {
        width: 100px;
        height: 100px;

        flex: 0 0 100px;
    }

    .myprot-story-name {
        width: 100px;
        max-width: 100px;

        margin-top: 6px;
    }

}


/* =========================================
   MOBILE
   4 STORIES + PART OF 5TH
========================================= */

@media (max-width: 600px) {

.myprot-brand-scroll {
        display: none !important;
    }

    .myprot-stories-track {
        gap: 10px !important;
        padding-left: 8px;
        padding-right: 8px;
    }

    .myprot-story-brand {
        width: 72px !important;
        min-width: 72px !important;
        height: auto !important;
    }

    .myprot-story-ring {
        width: 72px !important;
        height: 72px !important;
        flex: 0 0 72px !important;
    }

    .myprot-story-name {
        width: 72px;
        max-width: 72px;
        margin-top: 6px;
        font-size: 11px;
        line-height: 16px;
    }

    .myprot-story-dialog {
        width: 100vw;
        height: 100dvh;
    }

}


/* =========================================
   CLEAN MYPROT STYLE
========================================= */

.myprot-stories,
.myprot-stories-track,
.myprot-story-brand,
.myprot-story-brand:hover,
.myprot-story-brand:focus,
.myprot-story-brand:active,
.myprot-story-brand:visited {

    background: transparent !important;

    background-color: transparent !important;

    box-shadow: none !important;
}

.myprot-story-brand:hover .myprot-story-ring,
.myprot-story-brand:focus .myprot-story-ring,
.myprot-story-brand:active .myprot-story-ring {

    transform: none !important;

    box-shadow: none !important;
}

.myprot-story-ring {

    transition: none !important;
}


/* =========================================
   PAUSE STATE
========================================= */

.myprot-stories.is-paused
.myprot-progress-bar.is-running::after {

    animation-play-state: paused !important;
}

.myprot-stories.is-paused
.myprot-story-media {

    cursor: pointer;
}