/* "fairplex-wide"*/

*,
*:before,
*:after {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
}

html,
body {
    min-height: 100%;
}

body {
    background: transparent url(../img/bg-body-noisy.jpg) center center no-repeat;
    background-size: cover;
}

.container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}

.outer {
    border-radius: 76px;
    overflow: hidden;
    max-width: 100%;
    width: 696px;
    margin: 0 auto;
}

.disclaimer {
    width: 684px;
    margin: 0 auto;
    text-align: center;
    max-width: 100%;
    color: white;
    font-family: "work-sans", sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-shadow: 0 4px 3px rgba(0, 0, 0, 0.50);
    margin-top: 8px;
    letter-spacing: .5px;
    padding: 0 16px;
}

.wrapper {
    border: 60px solid transparent;
    border-image: url(../img/border.png) 116 round;
    position: relative;
}

.wrapper__inner {
    position: relative;
    margin: -44px;
    border: solid 4px #021344;
    border-radius: 64px;
    z-index: 2;
    width: calc(100% + 88px);
    height: calc(100% + 88px);
    overflow: hidden;
    background: transparent url(../img/bg-yellow.png) center center repeat;
    background-size: 100px 100px;
}

.header img {
    display: block;
}

.label {
    margin: 0 -4px;
    border-radius: 100px;
    border: solid 4px #021344;
    overflow: hidden;
}

.label img {
    display: block;
    margin: 0 auto;
}

img.label-img--desktop {
    display: none;
}

.cookie-slider-container {
    border-bottom: solid 4px #021344;
    width: 100%;
    padding: 20px;
}

.cookie-slider {
    width: 100%;
    border: solid 4px #021344;
    height: 208px;
}

.cookie-slides {
    text-align: center;
}

.cookie-slide {
    width: 100%;
    overflow: hidden;
}

.cookie {
    width: 100%;
    position: relative;
    margin: 0 auto;
    background: #4A55FD url(../img/bg-lightest-blue.png) center center repeat;
    background-size: 100px 100px;
    height: 200px;
}

.conveyor-belt {
    height: 50%;
    position: absolute;
    bottom: 0; 
    left: 0;
    width: 100%;
    background: #081852 url(../img/bg-dark-blue.png) center center repeat;
    background-size: 100px 100px;
}

.conveyor-belt__seam {
    position: absolute;
    width: 4px;
    height: calc(100% - 4px);
    background-color: #152FA4;
    margin-left: -2px;
    top: 4px;
}

.conveyor-belt__seam--left {
    left: 12.5%;
}

.conveyor-belt__seam--center {
    left: 50%;
}

.conveyor-belt__seam--right {
    left: 87.5%;
}

.cookie:after {
    height: 40px;
    background-color: #021344;
    content:"";
    display: block;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    z-index: 1;
    transition: width ease-in-out 200ms;
    width: 160px;
    bottom: 30px; 
}

.cookie-image {
    position: absolute;
    top: 50%; 
    left: 50%;
    width: 100%;
    height: 100%;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
    z-index: 2;
    transition: opacity ease-in-out 300ms;
    transform: translate(-50%,-50%);
}

.cookie-image--closed {
    background-image: url(../img/cookie-closed.png);
    /*width: 252px;
    height: 232px;*/
    width: 126px;
    height: 116px;
}

.cookie-image--open {
    background-image: url(../img/cookie-open.png);
    opacity: 0;
    /*width: 552px;
    height: 232px;*/
    width: 276px;
    height: 116px;
}

.fortune {
    opacity: 0;
    position: absolute;
    top: 47.5%; 
    left: 50%;
    max-width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    background: #FEE7D7 url(../img/bg-cream.png) center center repeat;
    background-size: 100px 100px;
    z-index: 3;
    min-width: 220px;
    transform: translate(-50%, -50%);
    transition: opacity ease-in-out 300ms;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 60px;
    border: solid 4px #021344;
    /*text-transform: uppercase;*/
    font-family: "work-sans", sans-serif;
    font-weight: 600;
    color: #021344;
}

.cookie-slide--active .cookie-image--open,
.cookie-slide--active .fortune {
    opacity: 1;
}

.cookie-slide--active .cookie-image--closed {
    opacity: 0;
}

.cookie-slide--active .cookie:after {
    width: 300px;
}

.controls {
    text-align: center;
    padding: 12px 0;
    position: relative;
}

.star {
    width: 20px;
    height: 20px;
    background: transparent url(../img/star.png) center center no-repeat;
    background-size: contain;
    position: absolute;
    /*display: none;*/
}

.star--top-left {
    top: 16px;
    left: 16px;
}
.star--top-right {
    top: 16px;
    right: 16px;
}
.star--bottom-right {
    bottom: 16px;
    right: 16px;
}
.star--bottom-left {
    bottom: 16px;
    left: 16px;
}

.button-container,
.button-container__inner {
    padding: 8px;
    border-radius: 200px;
    display: inline-block;
    background-size: 100px 100px;
}

.button-container {
    background: #FEA120 url(../img/bg-light-orange.png) center center repeat;
}

.button-container__inner {
    background: #FE5B20 url(../img/bg-dark-orange.png) center center repeat;
}

.button {
    display: inline-block;
    border: solid 4px #021344;
    background-color: #E72052;
    border-radius: 200px;
    padding: 12px 24px;
    color: #fee7d7;
    font-family: "fairplex-wide", serif;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 18px;
    text-shadow:
        1px 1px 0 #021344,
        -1px 1px 0 #021344,
        1px -1px 0 #021344,
        -1px -1px 0 #021344;
    letter-spacing: .05em;
    transition: width ease-in-out 250ms;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.button:active {
    background-color: #B3002D;
    color: #D7B49C;
}

.share {
    display: inline-block;
    background-color: #021344;
    color: #FEE7D7;
    font-family: "fairplex-wide", serif;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 16px;
    border: none;
    text-decoration: none;
    z-index: 5;
    height: 42px;
    padding: 0 20px;
    line-height: 40px;
    margin: -30px auto 0 auto;
    text-align: center;
    letter-spacing: 1px;
    border-radius: 60px;
    cursor: pointer;
    position: relative;
    padding-right: 48px;
}

.share img {
    display: block;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

@media (max-height: 652px) {
    /*.cookie-slider {
        height: 208px;
    }
    .cookie {
        height: 200px;
    }
    .cookie:after {
        bottom: 30px;
    }
    .controls {
        padding-top: 12px;
        padding-bottom: 12px;
    }*/
    .button-container,
    .button-container__inner {
        padding: 4px;
    }
    .button {
        padding-top: 8px;
        padding-bottom: 8px;
    }
}

/**
 * Large Mobile
 */
@media (min-width: 540px) {
    img.label-img--mobile {
        display: none;
    }
    img.label-img--desktop {
        display: block;
    }
}

/**
 * Tablet
 */
@media (min-width: 768px) {
    .disclaimer {
        font-size: 12px;
    }
    .cookie-slider {
        height: 248px;
    }
    .cookie {
        height: 240px;
    }
    .cookie:after {
        width: 220px;
        bottom: 20px;
        height: 50px;
    }
    .cookie-slide--active .cookie:after {
        width: 440px;
    }
    .cookie-image--closed {
        background-image: url(../img/cookie-closed.png);
        width: 189px;
        height: 174px;
    }

    .cookie-image--open {
        background-image: url(../img/cookie-open.png);
        opacity: 0;
        width: 414px;
        height: 174px;
    }
    .fortune {
        padding: 16px 20px;
        font-size: 14px;
    }
    .star {
        display: block;
        width: 24px;
        height: 24px;
    }
    .star--top-left {
        top: 20px;
        left: 30px;
    }
    .star--top-right {
        top: 20px;
        right: 30px;
    }
    .star--bottom-right {
        bottom: 20px;
        right: 30px;
    }
    .star--bottom-left {
        bottom: 20px;
        left: 30px;
    }
    .button-container,
    .button-container__inner {
        padding: 12px;
    }
    .button {
        font-size: 24px;
        padding: 16px 32px;

        text-shadow:
            2px 2px 0 #021344,
            -2px 2px 0 #021344,
            2px -2px 0 #021344,
            -2px -2px 0 #021344;
    }
    @media (max-height: 810px) {
        /*.cookie-slider {
            height: 248px;
        }
        .cookie {
            height: 240px;
        }
        .cookie:after {
            bottom: 20px;
        }
        .controls {
            padding-top: 16px;
            padding-bottom: 16px;
        }*/
        .button-container,
        .button-container__inner {
            padding: 8px;
        }
        .button {
            padding-top: 12px;
            padding-bottom: 12px;
        }
    }
}

/**
 * Desktop
 */
@media (min-width: 1024px) {
    .disclaimer {
        font-size: 14px;
    }
    .cookie-slider {
        height: 288px;
    }
    .cookie {
        height: 280px;
    }
    .cookie:after {
        width: 300px;
        bottom: 10px;
        height: 60px;
    }
    .cookie-slide--active .cookie:after {
        width: 580px;
    }
    .cookie-image--closed {
        background-image: url(../img/cookie-closed.png);
        width: 252px;
        height: 232px;
    }
    .cookie-image--open {
        background-image: url(../img/cookie-open.png);
        opacity: 0;
        width: 552px;
        height: 232px;
    }
    .fortune {
        font-size: 16px;
    }
    .star--top-left {
        top: 35px;
        left: 50px;
    }
    .star--top-right {
        top: 35px;
        right: 50px;
    }
    .star--bottom-right {
        bottom: 35px;
        right: 50px;
    }
    .star--bottom-left {
        bottom: 35px;
        left: 50px;
    }
    .button-container,
    .button-container__inner {
        padding: 16px;
    }
    .button {
        font-size: 30px;
        padding: 20px 40px;
        text-shadow:
        4px 0 0 #021344,
        -4px 0 0 #021344,
        0 4px 0 #021344,
        0 -4px 0 #021344,
        3px 3px 0 #021344,
        -3px 3px 0 #021344,
        3px -3px 0 #021344,
        -3px -3px 0 #021344;
    }
    @media (max-height: 880px) {
        /*.cookie-slider {
            height: 288px;
        }
        .cookie {
            height: 280px;
        }
        .cookie:after {
            bottom: 10px;
        }
        .controls {
            padding-top: 20px;
            padding-bottom: 16px;
        }*/
        .button-container,
        .button-container__inner {
            padding: 12px;
        }
        .button {
            padding-top: 16px;
            padding-bottom: 16px;
        }
    }
}

