/*
 * Copyright (c) 2014 Adobe Systems Incorporated. All rights reserved.
 *  
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"), 
 * to deal in the Software without restriction, including without limitation 
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 
 * and/or sell copies of the Software, and to permit persons to whom the 
 * Software is furnished to do so, subject to the following conditions:
 *  
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *  
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
 * DEALINGS IN THE SOFTWARE.
 *
 */

@first-launch-width: 86rem;
@first-launch-bg: #282828;
@first-launch-item-active: #D7D7D7;
@first-launch-bg-alt: #424242;
@first-launch-mid-bg-alt: mix(@item-active, @bg-alt, 70%);
@first-launch-backdrop-color: rgba(14, 14, 14, 0.3);
@first-launch-item-hover: #F4F4F4;
@first-launch-item-inactive: #C2C2C2;
@first-launch-underlines: #808080;
@first-launch-item-disabled: #757575;
@first-launch-icon-disabled: #919191;
@first-launch-icon-hover: #F0F0F0;
@first-launch-icon-active: #D7D7D7;
@first-launch-icon-inactive: #DDDDDD;
@first-launch-focus-highlight: #3691ff;
@carousel-button-radius: 3.2rem;

.first-launch__dialog {
    background-color: @first-launch-bg;
    color: @first-launch-item-active;
}

.keyboard-shortcut__dialog {
    background-color: @bg-dialog;
    color: @item-active;
}
    
.first-launch__dialog, .keyboard-shortcut__dialog {
    line-height: normal;
    width: @first-launch-width;
    max-height: 66rem; //this is important for use with dialog.showModa()
    height:66rem;
    border-radius: 0.8rem;
    overflow: hidden;
    margin-left: 0;
}

.keyboard-shortcut__content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 2.4rem 4.8rem 4.8rem 4.8rem;
    width: 76rem;
    font-size: 1.5rem;

    li {
        clear: both;
        line-height: 4.5rem;
        height: 4.5rem;
        border-bottom: @hairline solid @bg-alt;
        color: @mid-bg-alt;
        
        .button-simple {
            display: inline-block;
            padding-top: .3rem;
            height: 4.2rem;
            float: left;
            margin-right: 1rem;
        }
    }
}

.keyboard-shortcut__title {
    border-bottom: @hairline solid @mid-bg-alt;
    font-size: 1.8rem;
    line-height: 4.8rem;
}

.keyboard-shortcut__column-1, .keyboard-shortcut__column-2 {
    height: 34rem;
}

.keyboard-shortcut__column-1 {
    width: 30rem;
}

.keyboard-shortcut__column-2 {
    width: 40rem;
}

.keyboard-shortcut__name {
    float: left;
}

.keyboard-shortcut__instr {
    float: right;
    font-weight: bold;
    color: @item-active;
}

.first-launch__dialog::backdrop, .keyboard-shortcut__dialog::backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}
.keyboard-shortcut__dialog::backdrop {
    background-color: @backdrop-color;
}

.first-launch__dialog::backdrop {
    background-color: @first-launch-backdrop-color;
}

.first-launch__carousel {
    background-color: @first-launch-bg;
    color: @first-launch-item-active;
    font-size: 2.5rem;
    width: 86rem;
    height: 66rem;
    position: relative;
}

.carousel__slide {
    position: absolute;
    top: 0;
    width: 100%;
    height: 66rem;
    display: none;
    opacity: 0;
}

.carousel__slide__shown {
    display: block;
    opacity: 1;
}

.carousel__slide__full {
    padding-left: 4.8rem;
    padding-right: 4.8rem;
    padding-top: 6rem;
    height: 100%;
    text-align: center;
    position: relative;
    
    h1 {
        padding-top: 6rem;
        font-size: 3.2rem;
        padding-bottom: 14.2rem;
    }
    
    h2 {
        font-size: 2.4rem;
        line-height: 3.2rem;
        font-weight: lighter;
    }
    
    h3 {
        font-size: 1.8rem;
        line-height: 3.2rem;
        font-weight: lighter;
    }
    
    p {
        font-size: 1.8rem;
        line-height: 2.5rem;
        margin-bottom: 1.5rem;
    }
    
    img {
        width: 100%;
        position: absolute;
        top: 0;
        left: 0;
    }
    img.no-scale {
        width: auto;
        position: relative;
    }
}

.carousel__slide__head {
    height: 43.7rem;
 
    &.links {
        display: flex;
        justify-content: space-around;
    }
       
    img, video {
        display: block;
        max-width: 100%;
    }
    
    .block-link__image {
        width: auto;
        height: 8rem;
        flex-grow: 0;
    }
}

.carousel__slide__body {
    padding-top: 6rem;
    padding-left: 6rem;
    padding-right: 6rem;
    text-align: center;
    
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.4rem;
        margin-bottom: 1rem;
    }

    p {
        color: @first-launch-mid-bg-alt;
        font-size: 1.8rem;
    }
}

.carousel__nav {
    position: absolute;
    width: 100%;
    bottom: 4.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    padding-top: 3.6rem;
    border-top: @first-launch-underlines solid @hairline;
    
    .dot {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        width: 10rem;
        height: 7.2rem;
        svg {
            display: block;
            fill: @first-launch-icon-disabled;
            width: 10rem;
            height: 3.6rem;
            align-self: flex-start;
        }

        h3 {
            font-size: @text-large;
            color: @first-launch-item-disabled;
            align-self: flex-end;
        }

        &.current, &.current:hover {
            svg {
                fill: @first-launch-focus-highlight;
            }
            h3 {
                color: @first-launch-focus-highlight;
            }
        }
        &:hover {
            h3 {
                color: @first-launch-item-inactive;
            }
            svg {
                fill: @first-launch-icon-inactive;
            }
        }
    }
}

.carousel__slide__head__list, .carousel__slide__three__list {
    width: 50%;
    float: left;
    padding-top: 16rem;
    padding-left: 0rem;
    padding-right: 0rem;
    
    h3 {
        font-size: @text-large;
        margin-bottom: 3.2rem;
    }
    
    p {
        color: @first-launch-mid-bg-alt;
        font-size: @text-medium;
        height: 9rem;
    }
    
    a {
        cursor: pointer;
        text-decoration: underline;
    }
}
.carousel__slide__three__list {
    width: 33.3%;

    h2 {
        color: @first-launch-icon-active;
    }

    div:hover {

        svg {
            fill: @first-launch-icon-hover;
        }

        h2 {
            color: @first-launch-item-hover;
        }
    }

    svg {
        fill: @first-launch-icon-active;
        width: 100%;
        height: 3.6rem;
        margin-bottom: 2.4rem;
    }
}

.carousel__slide-button__continue {
    position: absolute;
    display: block;
    bottom: 16rem;
    left: 50%;
    transform: translateX(-50%);
    padding-left: 2rem;
    padding-right: 2rem;
    border: @hairline solid @first-launch-item-active;
    border-radius: @carousel-button-radius;
    font-size: 1.5rem;
    font-weight: 900;
    line-height: @carousel-button-radius;
    cursor: pointer;
    
    &:hover {
        color: @first-launch-item-hover;
        border: @hairline solid @first-launch-item-hover;
    }
}

.carousel__slide-button__next, 
.carousel__slide-button__prev,
.carousel__slide-button__started {
    position: absolute;
    border-radius: @carousel-button-radius;
    border: @hairline solid @first-launch-underlines;
    top: -49.2rem;
    cursor: pointer;
    &:hover {
        border-color: @first-launch-item-hover;
    }
}

.carousel__slide-button__started {
    width: auto;
    padding-left: @carousel-button-radius/2;
    padding-right: @carousel-button-radius/2;
    border-color: @item-active;
    font-size: 1.5rem;
    line-height: @carousel-button-radius;
}

.carousel__slide-button__next, 
.carousel__slide-button__prev {
    width: @carousel-button-radius;
    height: @carousel-button-radius;
    display: flex;
    align-items: center;
    justify-content: center;

    svg {
        width: 1rem;
        height: 1rem;
        fill: @first-launch-icon-inactive;
        stroke: none;
    }

    &:hover svg {
        fill: @first-launch-icon-active;
        stroke: none;
    }
}

.carousel__slide-button__prev {
    left: 1.6rem;
}

.carousel__slide-button__next,
.carousel__slide-button__started {
    right: 1.6rem;
}

.carousel__slide__block {
    width: 33%;
    border-left: 0.5rem solid black;
    border-right: 0.5rem solid black;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align:center;
    font-size: 1.6rem;
    color: @first-launch-item-active;
    
    &:first-child {
        border: none;
    }
    
    &:last-child {
        border: none;
    }
}

.carousel__slide__block-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.block-link__image img {
    width: 3.5rem;
    height: 3.5rem;
}

.carousel__slide .advertisement {
    margin-top: 0;

    h3 {
        font-size: 1.8rem;
        line-height: 3.2rem;
        font-weight: lighter;
    }

    em {
        font-weight: 400;
        white-space: nowrap;
    }

    a {
        color: @first-launch-focus-highlight;
    }
}

:lang(ja) .advertisement,
:lang(de) .advertisement {
    text-align: left;
}

:lang(fr) .carousel__slide__body {
    padding-right: 2em;
    padding-left: 2em;
}

// LANGUAGE SPECIFIC STYLES //

/**** FRENCH *****/

:lang(fr) .carousel__slide__full {
    &.slide-0 {

        padding-top: 0rem;

        img {
            top: -6rem;
        }
    }

    &.slide-5 {
        h2 {
            padding-left: 10rem;
            padding-right: 10rem;
        }
    }
}

:lang(fr) .carousel__slide-button__continue {
    bottom: 15rem;
}

:lang(fr) .carousel__nav .dot {
    width: 12rem;
}

/**** GERMAN *****/

:lang(de) .carousel__nav .dot {
    width: 12rem;
}

:lang(de) .carousel__slide__full.slide-0 {
    padding-top: 1rem;

    h3 {
        text-align: left;
        padding-left: 9.5rem;
        padding-right: 9.5rem;
    }

    img {
        top: -5rem;
    }
}

:lang(de) .carousel__slide-button__continue {
    bottom: 14rem;
}

/**** JAPANESE *****/

:lang(ja) .carousel__slide__full {
    &.slide-0 {
        padding-top: 1rem;

        h3 {
            text-align: left;
            // The padding on either side needs to be equal so that the content is centered
            padding-left: 5rem;
            padding-right: 5rem;
        }
        img {
            top: -5rem;
        }
    }

    &.slide-3 {
        
        img {
            top: 3rem;
        }

        h2 {
            padding-left: 0rem;
            padding-right: 0rem;
        }

        h2:first-of-type {
            // The padding on either side needs to be equal so that the content is centered
            padding-left: 5rem;
            padding-right: 5rem;
        }
    }

    &.slide-4 {
        h2 {
            padding-left: 9rem;
            padding-right: 9rem;
        }
    }

    &.slide-5 {
        h2 {
            padding-left: 6rem;
            padding-right: 6rem;
        }

    }

    &.slide-6 {
        h2 {
            padding-left: 9rem;
            padding-right: 9rem;
        }
    }
}

:lang(ja) .carousel__slide-button__continue {
    bottom: 14rem;
}
