///////////////////////////////////////////////////////////////
// Device: Desktop
///////////////////////////////////////////////////////////////

.lafourchette {
    background-color: $color-grey;
    border-bottom: 6px solid $color-golden;
    position: relative;
    height: auto;
    overflow: hidden;

    .mobile-only {
        display: none;
    }
    .desktop-only {
        display: block;
    }

    .api-error-msg {
        display: none;
        color: $color-golden;
        display: none;
        width: 100%;
        text-align: center;
        height: 100%;
        margin: 200px 0 200px 0;
        font-size: 1.6rem;
        .api-error-msg-wrapper {
            display: table-cell;
            width: 100%;
            text-align: center;
            vertical-align: middle;
        }
    }

    &.api-error {
        .api-error-msg {
            display: table !important;
        }
        #lafourchette-steps, #lafourchette-restaurants-list {
            display: none !important;
        }
    }

    .lafourchette-header {
        display: table;
        position: relative;
        width: 100%;
        height: 100%;
        img {
            width: 100%;
        }
    }

    .lafourchette-header-title {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        color: $color-white;
        font-size: 1.6rem;
        text-transform: uppercase;
        text-align: center;
        width: 100%;
        left: 0;
    }

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

    .lafourchette-restaurants-list {
        list-style: none;
        margin-top: 15px;
        overflow: hidden;
    }

    .lafourchette-restaurants-list-item {
        cursor: pointer;
        display: inline-block;
        width: 22%;
        &:hover, &.active {
            .lafourchette-restaurants-list-item-img {
                border-color: $color-golden;
            }
        }
        picture {
            display: block;
            img {
                width: 100%;
                border: none;
                vertical-align: middle;
            }
        }
    }

    .lafourchette-restaurants-list-item-img {
        display: block;
        border: 1px solid transparent;
        transition: border-color 200ms ease;
    }

    .lafourchette-restaurants-list-item-label {
        text-transform: uppercase;
        color: white;
        display: inline-block;
        text-align: center;
        margin-top: 5px;
        font-size: 1.2vw;
    }

    .lafourchette-button {
        margin: 50px auto 40px auto;
        &.button-grey {
            background-color: #454344;
            color: $color-white;
            font-family: "lucien-light";
            display: inline-block;
            height: 40px;
            padding: 0 20px 0 20px;
            line-height: 40px;
            margin: 0;
            margin-left: 1.5%;
        }
        &#pricing-and-vailability {
            display: inline-block;
            width: auto;

            background-color: grey;
            border-color: grey;
            cursor: default;

            &.active {
                background-color: $color-golden;
                border-color: $color-golden;
                cursor: pointer;
            }
        }
    }

    .lafourchette-nav-mobile {
        display: none;
    }

    .lafourchette-nav-list {
        display: flex;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .lafourchette-nav-list-item {
        border-top: 1px solid grey;
        border-left: 1px solid grey;
        border-bottom: 1px solid $color-golden;
        cursor: pointer;
        display: block;
        flex-basis: 0;
        flex-grow: 1;
        position: relative;
        margin: 0;
        padding: 10px 0 10px 0;
        min-height: 62px;
        .icon-svg {
            color: grey;
            display: inline-block;
            width: 20px;
            height: 20px;
            svg {
                fill: grey;
            }
        }
        &:first-child {
            border-left: none;
        }
        &.active {
            background-color: $color-grey-darker;
            border-color: $color-golden;
            border-bottom: 1px solid $color-grey-darker;
            border-right: 1px solid $color-golden;
            border-left: 1px solid $color-golden;
            &:last-child {
                border-right: 1px solid transparent;
            }
            &:first-child {
                border-left: 1px solid transparent;
            }
            .icon-svg {
                color: $color-golden;
                svg {
                    fill: $color-golden;
                }
            }
        }
        &.itemnext {
            border-left: 1px solid transparent;
        }
        .icon-peoples {
            width: 30px;
            height: 25px;
        }
        .icon-promo {
            width: 25px;
            height: 25px;
        }
        .icon-coordonnees {
            width: 14px;
            height: 20px;
            margin-right: 4px;
        }
    }

    .lafourchette-nav-list-item-wrapper {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 100%;
        text-align: center;
    }

    .lafourchette-form-select {
        background-color: $color-grey !important;
        border: 1px solid $color-grey-border-light;
        float: left;
        font-size: 0.75em;
        padding: 12px 8px;
    }

    .lafourchette-form-text {
        background-color: $color-grey !important;
        float: left;
        border: 1px solid $color-grey-border-light;
        height: 40px;
        padding: 0 10px;
        font-size: 0.75em;
    }

    .lafourchette-form-select-civility {
        width: 20%;
        display: inline-block;
        float: left;
        margin-right: 1.5%;
        select {
            padding: 12px 8px;
        }
    }

    .lafourchette-form-text-firstname {
        width: 35%;
        display: inline-block;
        float: left;
        margin-right: 1.5%;
    }

    .lafourchette-form-text-name {
        width: 35%;
        display: inline-block;
    }

    .lafourchette-form-text-email {
        width: 93%;
        margin-top: 12px !important;
    }

    .lafourchette-form-text-phone1 {
        width: 30%;
        margin-right: 1.5%;
        display: inline-block;
        float: left;
        select {
            padding: 12px 8px;
        }
    }

    .lafourchette-form-text-phone2 {
        width: 61.5%;
        display: inline-block;
    }

    .lafourchette-nav-list-item-label {
        color: $color-white;
        text-transform: uppercase;
        font-size: 0.6em;
    }

    .lafourchette-content-offer, .lafourchette-form-select-civility-mobile {
        $itemsize: 16px;

        .lafourchette-form-radio-item {
            position: relative;
        }

        label:before {
            content: "";
            display: inline-block;
            width: $itemsize;
            height: $itemsize;
            border-radius: $itemsize;
            margin-right: 10px;
            position: absolute;
            left: 0;
            bottom: 1px;
            border: 1px solid grey;
        }
        input {
            float: left;
        }
        input[type=radio] {
            display: none;
            width: 30px;
        }
        input[type=radio]:checked + label:before {
            content: "";
            display: inline-block;
            width: $itemsize;
            height: $itemsize;
            background-color: $color-golden;
            text-align: center;
        }

        .lafourchette-form-radio-item-civility {
            position: relative;
            width: 50%;
            float: left;
            label {
                padding-left: 30px;
                line-height: 10px;
            }
        }
    }

    .lafourchette-form-checkboxes {
        $itemsize: 16px;
        float: left;
        width: 60%;
        margin-top: 10px !important;

        .lafourchette-form-checkboxes-title {
            margin-bottom: 20px;
            display: inline-block;
            font-size: 1vw;
        }
        .lafourchette-form-checkboxe-item {
            position: relative;
        }
        label {
            font-family: "lucien-light";
            color: $color-grey-lighter;
            display: block;
            margin-left: 30px;
            font-size: 0.9vw;
            max-width: 90%;
        }
        label:before {
            content: "";
            display: inline-block;
            width: $itemsize;
            height: $itemsize;
            margin-right: 10px;
            position: absolute;
            left: 0;
            bottom: 1px;
            border: 1px solid grey;
        }
        input {
            float: left;
            width: 30px;
            display: none;
        }
        input[type=checkbox]:checked + label:before {
            content: "";
            display: inline-block;
            width: $itemsize;
            height: $itemsize;
            background-color: $color-golden;
            text-align: center;
        }
    }

    .lafourchette-nav-content {
        background-color: $color-grey-darker;
        color: $color-white;
    }

    .lafourchette-content-offer-title {
        display: block;
        font-family: "lucien-bold";
        text-transform: uppercase;
        padding: 30px 0 10px 0;
        font-size: 1.2vw;
    }

    .lafourchette-content-offer {
        input[type="radio"] {
            width: 20px;
            float: left;
        }
    }

    .lafourchette-content-block-promo {
        width: 65%;
        float: left;
        margin-top: 30px;
    }

    .lafourchette-content-offer-promo, .lafourchette-content-nooffer-promo {
        font-family: "lucien-light";
        font-weight: normal;
        padding-top: 4px;
        text-transform: uppercase;
        padding-left: 25px;
        font-size: 1.3vw;
    }

    .lafourchette-content-offer-conditions {
        font-family: "lucien-light";
        color: $color-grey-lighter;
        font-size: 1.2vw;
    }

    .lafourchette-content-codepromo-title {
        display: block;
        margin-bottom: 10px;
        font-size: 1.2vw;
    }

    .lafourchette-content-codepromo-field {
        background-color: $color-grey !important;
        float: left;
        border: 1px solid $color-grey-border-light;
        height: 40px;
        width: 25%;
    }

    #lafourchette-confirmation {
        float: right;
        margin: 0;
        margin-top: 41px;
        width: 35%;
        padding: 20px 0;
        &:hover {
            padding: 20px 0;
        }
    ;
        font-size: 1.2vw;
    }

    #lafourchette-promo-validate, #lafourchette-promo-help {
        width: auto;
    }

    #lafourchette-booking-btn {
        float: right;
        padding: 20px 10% 20px 10% !important;
        font-size: 0.8vw;
    }

    .lafourchette-content-step {
        display: none;
    }
    .lafourchette-content-step1,
    .lafourchette-content-step3,
    .lafourchette-content-step4,
    .lafourchette-content-step5 {
        text-align: left;
    }

    .lafourchette-content-step-wrapper {
        max-width: 80%;
        margin: 0 auto;
        padding-bottom: 30px;
        min-height: 420px;
        .form-block {
            padding: 6px;
            margin-top: 24px;
            &:after {
                content: '';
            }
        }
    }

    .lafourchette-content-step-back {
        font-family: 'lucien-light';
        color: $color-grey-lighter;
        cursor: pointer;
        display: block;
        padding-top: 30px;
    }

    .lafourchette-hourly-list-title, .lafourchette-people-list-title {
        text-align: left;
        display: block;
        padding-top: 30px;
        text-transform: uppercase;
        margin-bottom: 10px;
    }

    .lafourchette-hourly-list, .lafourchette-people-list {
        color: $color-grey-lighter;
        list-style: none;
        padding: 0;
    }

    .lafourchette-hourly-list-item, .lafourchette-people-list-item {
      display: inline-block;
      margin-bottom: 5px;
      width: 24%;

      &:hover, &.selected
      {
        .lafourchette-hourly-list-item-content, .lafourchette-people-list-item-content
        {
          background-color: $color-golden;
          color: $color-white;
        }
      }
    }

    .lafourchette-hourly-list-item-content, .lafourchette-people-list-item-content
    {
      background-color: $color-grey;
      cursor: pointer;
      display: block;
      padding: 12px 0 8px 0;
      height: 40px;
      text-align: center;
      transition: background-color 200ms ease;
    }

    #lafourchette-steps {
        .lafourchette-header {
            height: 100px;
        }
    }

    .lafourchette-form {
        .form-block {
            position: relative;
        }
        .error-message {
            position: absolute;
            top: 40px;
            font-weight: bold;
        }
    }

    .lafourchette-confirmation-blocinfo {
        margin-bottom: 40px;
        span {
            color: $color-grey-light;
            font-family: 'lucien-light';
        }
    }

    .lafourchette-confirmation-title {
        display: block;
        text-transform: uppercase;
        padding-top: 45px;
        font-family: 'lucien-bold';
        font-weight: normal;
    }

    .lafourchette-confirmation-title-mail {
        display: block;
        margin-bottom: 30px;
    }

    .lafourchette-confirmation-subtitle {
        display: block;
        font-family: 'lucien-bold';
        font-weight: normal;
    }

    .lafourchette-confirmation-img {
        display: inline-block;
        float: left;
        margin-right: 30px;
    }
}

///////////////////////////////////////////////////////////////
// Device: Desktop XL
///////////////////////////////////////////////////////////////

@include desktop-xl {
    .api-error-msg {
        margin: 0 !important;
    }
    .lafourchette-restaurants-list-item-label {
        font-size: 1rem !important;
    }
    .lafourchette-content-offer-conditions {
        font-size: 0.9rem !important;
    }
    .lafourchette-content-offer-promo, .lafourchette-content-nooffer-promo {
        font-size: 1rem !important;
    }
    #lafourchette-confirmation {
        font-size: 1rem !important;
    }
    .lafourchette-content-offer-title {
        font-size: 1rem !important;
    }
    .lafourchette-content-codepromo-title {
        font-size: 1rem !important;
    }
    .lafourchette-form-checkboxes-title {
        font-size: 0.9rem !important;
    }
    .lafourchette-form-checkboxes {
        label {
            font-size: 0.8rem !important;
        }
    }
    #lafourchette-booking-btn {
        font-size: 1em !important;
    }

    .lafourchette-form-select {
        font-size: 0.9em !important;
        padding: 10px 8px !important;
    }

    .lafourchette-form-select-civility {
        select {
            padding: 10px 8px !important;
        }
    }

    .lafourchette-form-text {
        font-size: 0.9em !important;
    }
}

///////////////////////////////////////////////////////////////
// Device: Tablet
///////////////////////////////////////////////////////////////

@include tablet-landscape-and-below {
    .lafourchette {
        height: auto !important;
    }
    .lafourchette-content-offer-conditions {
        font-size: 0.8rem !important;
    }
    .lafourchette-content-offer-promo, .lafourchette-content-nooffer-promo {
        font-size: 0.9rem !important;
    }
    #lafourchette-confirmation {
        font-size: 0.9rem !important;
    }
    .lafourchette-content-offer-title {
        font-size: 0.9rem !important;
    }
    .lafourchette-content-codepromo-title {
        font-size: 0.9rem !important;
    }
    #lafourchette-booking-btn {
        font-size: 1rem !important;
        width: 35% !important;
    }
    .lafourchette-form-checkboxes {
        label {
            font-size: 0.8rem !important;
        }
    }
    #lafourchette-booking-btn {
        font-size: 1em !important;
    }
    .lafourchette-form-checkboxes-title {
        font-size: 1rem !important;
    }
}

@include tablet-portrait-and-below {
    .lafourchette-restaurants-list-item-label {
        font-size: 1rem !important;
    }
    .lafourchette-content-offer-conditions {
        font-size: 0.9rem !important;
    }
    .lafourchette-content-offer-promo, .lafourchette-content-nooffer-promo {
        font-size: 1rem !important;
    }
    #lafourchette-confirmation {
        font-size: 1rem !important;
    }
    .lafourchette-content-offer-title {
        font-size: 1rem !important;
    }
    .lafourchette-content-codepromo-title {
        font-size: 1rem !important;
    }
}

///////////////////////////////////////////////////////////////
// Device: Mobile
///////////////////////////////////////////////////////////////

@include mobile-landscape-and-below {
    .lafourchette {
        height: auto;
        background-color: $color-grey-darker;

        .mobile-only {
            display: block;
        }
        .desktop-only {
            display: none;
        }
        #mobile-confirm-step0 {
            width: 90%;
        }

        .lafourchette-header-mobile, .lafourchette-nav-mobile-step {
            $headermobilesize: 80px;
            background-color: $color-grey-dark;
            text-transform: uppercase;
            height: $headermobilesize;
            line-height: $headermobilesize;
            text-align: center;
        }

        .lafourchette-nav-mobile-step {
            position: relative;
            display: none;
        }
        .lafourchette-nav-mobile-step1 {
            display: block;
        }

        .lafourchette-nav-mobile-step-title {
            color: $color-golden;
            font-size: 0.85em;
        }

        .lafourchette-nav-mobile-step-back {
            cursor: pointer;
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            width: 40px;
            background-color: #444444;
            img {
                height: 30px;
                margin-top: 25px;
            }
        }

        .lafourchette-header-mobile-title {
            color: $color-golden;
        }

        .lafourchette-nav-desktop {
            display: none;
        }

        .lafourchette-nav-mobile {
            display: block;
        }

        .lafourchette-restaurants-list-item {
            width: 80%;
            height: auto;
            margin-bottom: 30px;
        }

        .lafourchette-hourly-list-item, .lafourchette-people-list-item {
            font-size: 0.8rem;
            width: 23%;
        }

        #mobile-confirm-step2 {
            margin-top: 100px;
        }

        .lafourchette-content-step2 {
            .lafourchette-form-select {
                font-size: 0.75rem !important;
            }
        }

        #lafourchette-confirmation {
            float: none;
            display: block;
            clear: both;
            width: auto;
            margin-top: 110px;
        }

        .lafourchette-content-codepromo-field {
            width: 42% !important;
            margin-right: 1%;
        }

        .lafourchette-form-text-firstname,
        .lafourchette-form-text-name,
        .lafourchette-form-text-email {
            width: 100% !important;
        }

        .lafourchette-form-checkboxes {
            width: 100% !important;
        }

        #lafourchette-booking-btn {
            float: none !important;
            width: 100% !important;
            margin: 30px auto 0px auto !important;
        }

        .lafourchette-content-block-promo {
            width: 100% !important;
        }

        #lafourchette-promo-validate {
            width: 33.6%;
            padding: 0;
            text-align: center;
        }

        .lafourchette-confirmation-img {
            width: 100% !important;
            margin-top: 30px;
            margin-bottom: 20px;
            img {
                width: 100%;
            }
        }

        .lafourchette-button-confirmation-back {
            text-transform: uppercase;
            text-align: center;
            background-color: $color-grey-light !important;
            transition: all 200ms ease;
            &:hover {
                background-color: $color-white !important;
                color: black;
            }
        }

        .lafourchette-form-text, .lafourchette-form-select {
            font-size: 0.75em;
        }

        .lafourchette-form-text-phone1 {
            width: 37%;
        }

        .lafourchette-content-step-wrapper {
            max-width: 90%;
        }
    }
}
