@import '~bootstrap/scss/bootstrap';

@import url('https://fonts.googleapis.com/css?family=Nunito:400,600,700&display=swap');

$font-fmaily: "Nunito", Times, serif;

$bg-color: #f5f5f5; //FBFBFB
$font-color: #222222;

$yellow: #ffe714;
$blue-light: #3d91e9;
$blue-dark: #095B92;

$error-color: $font-color;

$header-title-color: $blue-light;

$navbar-brand-color: $font-color;
$navbar-menulinks-color: $yellow;
$hambuger_menubars-color: $yellow;

$voucher_card-bg: $bg-color;
$voucher_card-color: $font-color;
$voucher_card-title-color: $blue-dark;

$voucher_card-claimable_button-bg: #4CAF50;
$voucher_card-claimable_button-color: #ffffff;
$voucher_card-unclaimable_button-bg: grey;
$voucher_card-unclaimable_button-color: #D9D9D9;

$voucher_card-usable_button-bg: $blue-light;
$voucher_card-usable_button-color: $yellow;
$voucher_card-unusable_button-bg: grey;
$voucher_card-unusable_button-color: #D9D9D9;

$voucher_usage-bg: $blue-light;
$voucher_usage-color: $bg-color;
$voucher_usage-button-bg: $yellow;
$voucher_usage-button-color: $blue-dark;

$register-modal-bg: $blue-light;
$register-modal-color: $bg-color;
$register-modal-title-color: $yellow;
$register-modal-button-bg: $yellow;
$register-modal-button-color: $blue-dark;

body {
    background-color: $bg-color;
    color: $font-color;
    font-family: $font-fmaily;
}

.footer{
    //position: absolute;
    //bottom: 0;
    //width: 100%;
    ////height: 60px;
    //line-height: 60px;
    //background-color: #f5f5f5;

}
.container {
    padding: 0;
}

.navbar {
    margin-bottom: 0 !important;
    background: $blue-dark;

    .navbar-brand {
        color: $navbar-brand-color;
        max-width: 60%;
        height: inherit;
        padding-bottom: 0;
        padding-top: 0;

        img {
            max-height: 80px;
        }
    }
    .navbar-toggler {
        padding: 0;
        .menu-bar {
            display: block;
            width: 25px;
            height: 4px;
            margin-bottom: 4px;
            position: relative;
            
            background: $hambuger_menubars-color;
            border-radius: 3px;
            z-index: 1;
            
            
            &:last-child {
                margin-bottom: 0px;
            }
        }
    }
    
    .navbar-nav {
        
        .nav-item {
            color: $navbar-menulinks-color;
            &:hover {
                text-decoration: underline;
            }
        }

        a {
            color: inherit;
        }
    }
}

.justify-space-between {
    justify-content: space-between;
}

.arrow {
    box-sizing: border-box;
    height: 7px;
    width: 7px;
    display: inline-block;
    border-style: solid;
    border-color: $font-color;
    border-width: 0px 1px 1px 0px;
    transition: border-width 150ms ease-in-out;

    &.right {
        transform: rotate(-45deg);
    }

    &.left {
        transform: rotate(135deg);
    }

    &.down {
        transform: rotate(45deg);
        margin-left: 0.3em;
        margin-bottom: 0.1em;
    }

    &.up {
        transform: rotate(-135deg);
    }
}

.tick {
    display:inline-block;
  
    &:after{
        /*Add another block-level blank space*/
        content: '';
        display: block;
    
        /*Make it a small rectangle so the border will create an L-shape*/
        width: 5px;
        height: 10px;
    
        /*Add a white border on the bottom and left, creating that 'L' */
        border: solid #000;
        border-width: 0 2px 2px 0;
    
        /*Rotate the L 45 degrees to turn it into a checkmark*/
        transform: rotate(45deg);
    }
}

.header-title {
    padding: 0 15px;
    color: $header-title-color;
    font-weight: 700;
    text-transform: uppercase;
}

// voucher_feed and register
#register-modal {
    .modal-content {
        background-color: $register-modal-bg;
        color: $register-modal-color;
        box-shadow: 2px 2px 3px rgba(0,0,0,0.1);
    }

    .modal-header {
        border-bottom: none;
    }

    .modal-title {
        color: $register-modal-title-color;
    }

    .modal-body {
        padding-top: 0;
        padding-bottom: 0;
    }
    
    .modal-footer {
        border-top: none;
        justify-content: center;
    }

    .form {
        .form-group {
            font-size: 14px !important;
        }
        .form-control {
            font-size: 14px;
        }
        .input-group-text {
            font-size: 14px;
        }

        input {
            box-shadow: 2px 2px 3px rgba(0,0,0,0.1);
        }
    
        .form-text {
            &.error {
                color: $error-color;
            }
        }

        .form-check {
            .form-text {
                margin-left: -1.25rem;
            }
            .form-check-label {
                font-size: 14px;
            }
        }


        .form-group {
            .select2 {
                span {
                    height: 35px;
                    line-height: 35px;
                    border-radius: 0.25rem 0 0 0.25rem;
                    border-color: #ced4da;
                }
            }
        }


        a {
            color: inherit;
            text-decoration: underline;
        }

    }

    #register-modal-countrycode {
        cursor: pointer;
    }

    #register-modal-submit {
        background-color: $register-modal-button-bg;
        color: $register-modal-button-color;
    }
}


#register_page {
    background-color: $register-modal-bg;
    color: $register-modal-color;
    padding: 1rem;
    .form {
        .form-group {
            font-size: 14px !important;
        }
        .form-control {
            font-size: 14px;
        }
        .input-group-text {
            font-size: 14px;
        }

        input {
            box-shadow: 2px 2px 3px rgba(0,0,0,0.1);
        }
    
        .form-text {
            &.error {
                color: $error-color;
            }
        }

        .form-check {
            .form-text {
                margin-left: -1.25rem;
            }
            .form-check-label {
                font-size: 14px;
            }
        }


        .form-group {
            .select2 {
                span {
                    height: 35px;
                    line-height: 35px;
                    border-radius: 0.25rem 0 0 0.25rem;
                    border-color: #ced4da;
                }
            }
        }


        a {
            color: inherit;
            text-decoration: underline;
        }


        button[type="submit"] {
            background-color: $register-modal-button-bg;
            color: $register-modal-button-color;
        }

    }

    .button-container {
        text-align: center;
        margin-top: 1em;
    }

    #register-modal-countrycode {
        cursor: pointer;
    }

    #register-modal-submit {
        background-color: $register-modal-button-bg;
        color: $register-modal-button-color;
    }
}



// voucher_feed and my_vouchers

.voucher_card-wrapper {
    background-color: $voucher_card-bg;
    color: $voucher_card-color;
    border: 1px solid #EEE;
    box-shadow: 2px 2px 3px rgba(0,0,0,0.1);
    margin: 0.5em;

    @media screen and (max-width: 479px) {
        margin-left: 0;
        margin-right: 0;
    }
}
.voucher_card {

    max-width: 400px;

    a {
        color: inherit;
        &:hover, &:active, &:visited {
            text-decoration: none;
        }
    }
    
    @media screen and (max-width: 575px) {
        margin: auto;
    }

    .voucher_card-content {
        display: flex;
        flex-direction: column;
        font-size: 14px;

        .voucher_card-title {
            color: $voucher_card-title-color
        }
    }

    .voucher_card-image {
        height: 210px;
        max-height: 40vh;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center center;

        @media screen and (max-width: 575px) {
            height: calc(70vw - 1em);
        }

        @media screen and (max-width: 479px) {
            height: 100vw;
        }
    }

    .voucher_card-tc {
        font-size: 12px;
        padding: 10px 0;

        div[data-toggle] {
            cursor: pointer;
        }

        .arrow {
            border-color: $voucher_card-color;
        }
    }

    .voucher_card-claimable, .voucher_card-unclaimable {
        padding: 8px 10px;
        text-align: center;
        font-size: 15px;
        cursor: pointer;
        border-radius: 0.5em;
        font-weight: bold;
        letter-spacing: 1px;
    }
    
    .voucher_card-claimable {
        background-color: $voucher_card-claimable_button-bg;
        color: $voucher_card-claimable_button-color;
    }

    .voucher_card-unclaimable {
        background-color: $voucher_card-unclaimable_button-bg;
        color: $voucher_card-unclaimable_button-color;
    }


    .voucher_card-usable {
        background-color: $voucher_card-usable_button-bg;
        color: $voucher_card-usable_button-color;
    }

    .voucher_card-unusable {
        background-color: $voucher_card-usable_button-bg;
        color: $voucher_card-usable_button-color;
    }

}

.ui-loader {
    display: none;
}


#usemy_vouchers-13DIGIT {

    .voucher_card {

        .voucher_card-claimable, .voucher_card-unclaimable {
            border-radius: 0;
        }

        .voucher_card-claimable {
            touch-action: none;
            position: relative;

            &::before {
                content: "";
                position: absolute;
                top: 0;
                right: 0;
                // border-width: 0 16px 16px 0;
                // border-style: solid;
                // border-color: rgba($voucher_card-claimable_button-color, 1) $bg-color;
                height: 16px;
                width: 16px;
                background: linear-gradient(
                    to top right,
                    $voucher_card-claimable_button-color 0%, 
                    $voucher_card-claimable_button-color 50%,
                    $bg-color 50%,
                    $bg-color 100%
                    );
                box-shadow: 0 2px 2px rgba(0,0,0,0.2), -2px 2px 2px rgba(0,0,0,0.1);
                transition: height 200ms ease, width 200ms ease;
            }



            &.swiped {
                &::before {
                    height: 100%;
                    width: 100%;
                    background: $voucher_card-claimable_button-color;
                    box-shadow: none;
                    transition: height 200ms ease, width 200ms ease;
                }
            }
        }
        .voucher_card-tc {
            padding-bottom: 0;
        }
    }
}

#use_voucher-modal {

    .modal-content {
        background: $voucher_usage-bg;
        color: $voucher_usage-color;
        box-shadow: 2px 2px 3px rgba(0,0,0,0.1);
    }


    .modal-header {
        padding-bottom: 0em;
        border-bottom: 0;
    }

    .modal-footer {
        display: block;
        text-align: center;
        border-top: 0;
    }

    .modal-body {
        padding-top: 0em;
    }

    .use_voucher-codes {
        margin: 1.5em auto 1em auto;
        
        .use_voucher-barcode {
            display: none;
            margin-bottom: 0.5em;
        }

        .use_voucher-digits {
            font-size: 1.5rem;
            font-weight: 600;
            letter-spacing: 4px;
            word-break: break-all;
            line-height: 1;
        }
    }

    .use_voucher-message {
        margin-top: 0.5em;
        color: $voucher_usage-button-bg;
    }

    #use_voucher-modal-submit {
        background: $voucher_usage-button-bg;
        color: $voucher_usage-button-color;

        &.claimed{
            background-color: grey;
            color: #D9D9D9;
        }
    }

}

#voucher_single {
    .voucher_single-image {
        max-height: 100%;
        max-width: 100%;
        width: 40vh;
        display: block;
        margin: 0 auto;
        // max-height: 40vh;
        // background-size: cover;
        // background-position: center center;

        // @media screen and (max-width: 575px) {
        //     height: calc(70vw - 1em);            
        // }

        // @media screen and (max-width: 479px) {
        //     height: 100vw;            
        // }
    }

    .voucher_single-claimable, .voucher_single-unclaimable {
        color: $bg-color;
        background-color: $blue-light;
        padding: 1em;
        text-align: center;
        font-size: 14px;
        cursor: pointer;
        font-weight: bold;
        letter-spacing: 1px;
    }

    .voucher_single-unclaimable {
        background-color: $voucher_card-unclaimable_button-bg;
        color: $voucher_card-unclaimable_button-color;
    }

    .voucher_single-title {
        color: $blue-dark;
        font-size: 1.1rem;
        font-weight: 600;
    }

    .voucher_single-location, .voucher_single-expiry {
        font-size: 0.85rem;
        color: rgba($font-color, 0.8);
    }

    .voucher_single-tc {
        margin-top: 0.8em;
    }


}


.img-responsive.mobile {
    display: none;
}

.carousel-inner.mobile {
    display: none;
}

@media only screen and (max-width: 600px) {
    .img-responsive {
        display: none;
    }
    .img-responsive.mobile {
        display: block;
    }
    .carousel-inner {
        display: none;
    }
    .carousel-inner.mobile {
        display: block;
    }
}