/** Begin basic styles and resets **/
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: Cabin, Arial, sans-serif;
    height: 100%;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    padding: 0;
}

h1 {
    font-size: 30pt;
}

h2 {
    font-size: 26pt;
}

h3 {
    font-size: 22pt;
}

h4 {
    font-size: 18pt;
}

input[type=text], textarea {
    -webkit-appearance: none;
    outline: none;
    border: none;
}

.hidden {
    display: none;
}

.choose-photo-wrapper-template.hidden {
    display: none !important;
}

.wrapper {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: black;
    opacity: 0.5;
}

.spinner {
    top: 50%;
    left: 50%;
}

.page {
    background-color: white;
    width: 100%;
    left: 0;
    position: absolute;
    display: none;
    margin-bottom: 10px;
}

.page1 {
    z-index: 10;
    display: block;
}

.header {
    background-color: #d3e7e9;
    height: 30px;
    padding: 10px 0;
    width: 100%;
    border-bottom: solid 3px #f48931;
    position: relative;
    color: #5d7075;
}

.header-content {
    text-align: center;
}

.header-title {
    text-transform: uppercase;
    margin: 0 auto;
    font-size: 16pt;
    display: inline-block;
    vertical-align: middle;
}

.header-camera-image {
    background-position: 0 -75px;
    height: 26px;
    width: 30px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

.header::after {
    position: absolute;
    bottom: 0;
    content: '';
    width: 100%;
    height: 3px;
    background-color: white;
}

.errors {
    display: none;
    width: 80%;
    margin: 10px auto;
    padding: 10px;
    border-radius: 5px;
    color: #b94a48;
    background-color: #f2dede;
    border-color: #eed3d7;
}

.errors ul {
    width: 75%;
}

.back-button {
    font-size: 16pt;
    vertical-align: middle;
    display: none;
    text-transform: uppercase;
    position: absolute;
    left: 10px;
    height: 26px;
    color: #569aa5;
}

.next-button {
    font-size: 16pt;
    vertical-align: middle;
    display: none;
    text-transform: uppercase;
    position: absolute;
    right: 10px;
    height: 26px;
    color: #4b5a61;
}

.back-button-image, .next-button-image {
    width: 16px;
    height: 18px;
    vertical-align: middle;
    display: inline-block;
}

.back-button-image {
    background-position: 0 -112px;
}

.next-button-image {
    background-position: 0 -150px;
}

.portrait-navigation {
    display: none;
    height: 30px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f1f1;
}

.content {
    width: 100%;
    height: 100%;
}

.button-wrapper {
    height: 100%;
    width: 200px;
    margin: 15px auto 0;
}

.review-and-submit-wrapper {
    height: 100%;
    width: 290px;
    margin: 15px auto;
    padding-bottom: 15px;
    border-bottom: 2px solid #eaf3f4;
}

.button {
    height: 24px;
    padding: 10px 0;
    width: 200px;
    margin-bottom: 20px;
    border-radius: 5px;
    background: black;
    color: white;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.button-content {
    text-align: center;
}

.button span {
    font-size: 13pt;
    vertical-align: middle;
    display: inline-block;
}

.button-logo-img-wrapper {
    display: inline-block;
    border-right: 1px solid white;
    margin-right: 5px;
}

.sprite {
    background-image: url(/images/reels/mobile-feed-icon-sprites.png);
}

.button-logo-img {
    margin-right: 17px;
}

/** Begin Page 1 (Select Photos) Styles **/

.camera-roll-button {
    background-color: #f48931;
}

.camera-roll-input {
    visibility: hidden;
    width: 0;
    height: 0;
}

.facebook-button {
    background: -webkit-linear-gradient(#43608c, #486ea6);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #43608c), color-stop(100%, #486ea6));
}

.instagram-button {
    background: -webkit-linear-gradient(#226b86, #3c80a4);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #226b86), color-stop(100%, #3c80a4));
}

.facebook-button .button-logo-img {
    background-position: 0 0;
    width: 13px;
    height: 24px;
}

.instagram-button .button-logo-img {
    background-position: 0 -37px;
    width: 25px;
    height: 25px;
}

/** Begin Page 2 (Review & Submit Form) styles **/

.picture-row {
    margin-bottom: 10px;
}

.photo-row {
    position: relative;
}

.photo-row .progress {
    position: absolute;
    bottom: 4px;
    left: 0;
    margin: 0;
    width: 100px;
}

.progress .bar {
    width: 0;
    background-color: #f38630; /* pumpkin */
    -webkit-transition: width 1.5s ease;
    transition: width 1.5s ease;
    height: 12px;
    display: none;
}

.preview-thumbnail {
    width: 100px;
    height: 100px;
    background-position: 50% 50%;
    margin-right: 10px;
    display: inline-block;
}

.preview-thumbnail.loading {
    opacity: 0.4;
}

.preview-input {
    display: inline-block;
    vertical-align: top;
    height: 100px;
    width: 175px;
}

.preview-input textarea {
    display: block;
    width: 100%;
    font-size: 12pt;
    color: #838383;
    outline: none;
    border: 2px solid #e4e4e4;
    padding: 0;
    margin: 0;
}

.preview-input span {
    display: block;
    color: #569aa5;
}

.preview-input a {
    color: #f47525;
    float: right;
}

.terms-link {
    color: black;
}

.form-wrapper {
    width: 290px;
    margin: 0 auto;
}

.form-input {
    margin-bottom: 3px;
}

.form-label {
    display: inline-block;
    vertical-align: middle;
    width: 100px;
}

.form-input input[type=text],
.form-input input[type=email] {
    display: inline-block;
    vertical-align: middle;
    border: 2px solid #f1f1f1;
    border-radius: 2px;
    font-size: 14pt;
    color: #838383;
    width: 160px;
    outline: none;
    -webkit-appearance: none;
}

.form-input input[type=checkbox] {
    display: inline-block;
    vertical-align: middle;
}

.form-label.long {
    width: 250px;
}

.form-submit {
    text-align: center;
    margin-bottom: 10px;
}

.form-submit button {
    border: none;
    outline: none;
    background-color: #f48931;
    width: 200px;
    height: 44px;
    margin: 0 auto;
    border-radius: 5px;
    color: white;
    text-transform: uppercase;
    font-size: 16pt;
}

.form-submit.disabled button {
    opacity: 0.4;
}

.overall-upload-progress {
    display: none; /* Turned off by default.  Needs to be enabled per-reel via custom CSS */
}

.overall-upload-progress .progress {
    margin: 4px 0;
}

/** Begin Page 3 (Photos Submitted) styles **/

.congratulations-header {
    text-align: center;
    color: #f48931;
    margin-bottom: 15px;
}

.congratulations-subtext {
    font-style: italic;
    text-align: center;
}

.coupon-block {
    padding: 5px;
    margin-bottom: 10px;
}

.photos-submitted-wrapper {
    margin-top: 15px;
}

.add-more-photos {
    margin-top: 15px;
    text-align: center;
}

.add-more-photos-icon-wrapper {
    background: #d5e0e5;
    border-radius: 100px;
    height: 40px;
    width: 40px;
    position: relative;
    margin: 0 auto;
}

.plus {
    height: 20px;
    width: 21px;
    display: inline-block;
    position: absolute;
    left: 9px;
    top: 10px;
    background-position: 0 -225px;
}

.add-more-photos a {
    text-transform: uppercase;
    color: #569aa5;
    font-size: 14pt;
    font-weight: bold;
}

/** Begin Page 5 (Facebook/Instagram Photo Chooser) styles **/

.photo-chooser-wrapper {
    margin: 0 auto;
    width: 85%;
    display: none;
}

.photo-chooser-wrapper .photo-error-messages,
.photo-chooser-wrapper .video-error-messages,
.media-type-toggle-container.instagram {
    padding-top: 1em;
}

.media-type-toggle-button {
    text-decoration: underline;
    cursor: pointer;
}

.choose-photo-wrapper {
    display: inline-block;
    vertical-align: middle;
    position: relative;
}

.choose-photo-wrapper img {
    width: 50px;
    height: 50px;
    border: 2px solid transparent;
}

.choose-photo-wrapper img.selected {
    border: 2px solid #39b54a;
}

.choose-photo-wrapper .chosen-overlay {
    display: none;
    position: absolute;
    top: 2px;
    left: 2px;
    opacity: 0.5;
    background-color: #39b54a;
    z-index: 10;
    width: 50px;
    height: 50px;
}

.choose-photo-wrapper .selected-image {
    width: 25px;
    height: 25px;
    vertical-align: middle;
    top: 15px;
    left: 14px;
    position: absolute;
    z-index: 100;
    background-position: 0 -181px;
}

.facebook-page-chooser {
    text-align: center;
    margin: 10px 0;
}

.facebook-page-chooser select {
    padding: 2px 0;
    font-size: 10pt;
    outline: none;
    display: block;
    margin: 0 auto;
}

/** Begin Media Query styles **/

/** Target iPhone 5 **/
@media screen and (min-device-width: 640px) and (device-aspect-ratio: 40/71) {
    .button-wrapper {
        width: 825px;
    }

}

/** Target portrait orientation **/
@media screen and (orientation: portrait) {
    .portrait-only.show {
        display: block;
    }

    .back-button.portrait-only.show,
    .next-button.portrait-only.show {
        display: inline-block;
    }

    .congratulations-wrapper,
    .coupon-block {
        width: 90%;
        margin: 0 auto;
    }

    .choose-photo-wrapper {
        margin: 5px;

    }

}

/** Target landscape orientation **/
@media screen and (orientation: landscape) {
    .back-button.landscape-only.show,
    .next-button.landscape-only.show {
        display: inline-block;
    }

    .photos-submitted-wrapper {
        width: 90%;
        margin: 15px auto 0;
    }

    .congratulations-wrapper,
    .coupon-block {
        width: 46%;
        display: inline-block;
        vertical-align: top;
    }

    .congratulations-wrapper {
        margin-right: 4%;
    }

    .congratulations-header {
        font-size: 25pt;
    }

    .oauth-wrapper {
        width: 50%;
    }

    .photo-chooser-wrapper {
        width: 80%;
    }

    .choose-photo-wrapper {
        margin: 11px;
    }

}

/** Target iPhone < 5 **/
@media screen and (device-aspect-ratio: 2/3) {}

/** Retina things **/
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and ( min--moz-device-pixel-ratio: 2),
only screen and ( -o-min-device-pixel-ratio: 2/1),
only screen and ( min-device-pixel-ratio: 2),
only screen and ( min-resolution: 192dpi),
only screen and ( min-resolution: 2dppx) {

    .sprite {
        background-image: url(/images/reels/mobile-feed-retina-sprites.png);
        background-size: 30px;
    }

    .header-camera-image {
        background-position: 0 -75px;
    }

    .facebook-button .button-logo-img {
        background-position: 0 0;
    }

    .instagram-button .button-logo-img {
        background-position: 0 -38px;
    }

    .back-button-image {
        background-position: 0 -112px;
    }

    .next-button-image {
        background-position: 0 -150px;
    }

    .plus {
        background-position: 0 -715px;
    }

    .choose-photo-wrapper .selected-image {
        background-position: 0 -180px;
    }

}
