/*
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
/* 
    Created on : 13-Oct-2021, 12:37:16
    Author     : Jamie
*/

/* Variables */
:root {
    --primary-text-color: #D22322;
    --secondary-text-color: #FFFFFF;
    --ternary-text-color: #1D1D1B;
    --primary-background-color: #333333;
    --secondary-background-color: #FFFFFF;
    --ternary-background-color: #D22322;
    --quaternary-background-color: #ECECEC;
}

/* Fonts */
@font-face {
    font-family: ProximaNova;
    src: url('../../../../uploads/2022/04/Proxima-Nova-Alt-Light.otf') format('opentype');
}

@font-face {
    font-family: ProximaNova;
    font-weight: 500;
    src: url('../../../../uploads/2022/04/Proxima-Nova-Bold.otf') format('opentype');
}

.search-bar-container {
    position: relative;
    border-radius: 5px;
    top: -10px;
    width: 22px;
    height: 22px;
}

.material-symbols-outlined {
    position: absolute;
    font-size: 22px;
    z-index: 1;
    color: var(--secondary-text-color);
    user-select: none;
    cursor: pointer;
}

.search-bar-container>input.search-bar-input {
    position: absolute;
    border: 0px solid transparent;
    border-radius: 5px;
    border-color: transparent;
    font-family: ProximaNova;
    font-size: 16px;
    user-select: none;

    height: 0px;
    top: 25px;
    padding: 0px 5px;
    left: -385px;
    width: 400px;

    transition: height 0.2s cubic-bezier(0.42, -0.27, 0.59, 1.23), border 0.2s cubic-bezier(0.42, -0.27, 0.59, 1.23), padding 0.2s cubic-bezier(0.42, -0.27, 0.59, 1.23);
}

.search-bar-container>.search-bar-input.active {
    height: 24px;
    border: 1px solid transparent;
    padding: 10px 5px;
}

.search-results-container {
    position: absolute;
    z-index: 1;
    background-color: white;
    border: 1px solid #CCC;
    border-radius: 5px;
    padding: 5px;

    top: 71px;
    left: -385px;
    height: 264px;
    width: 400px;
    max-height: 264px;
}

.search-results-container p {
    font-size: 18px;
}

.search-results-container h4 {
    font-size: 1.3em;
}

.search-results-container p {
    margin: 5px 0;
    color: var(--ternary-text-color);
}

.product-results,
.category-results {
    max-height: 150px;
    margin: 5px 0;
}

.scrollbar {
    overflow-y: auto;
}

@keyframes searching {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.search-bar-container>.spinner {
    position: absolute;
    height: 18px;
    width: 18px;
    top: 35px;
    left: -5px;

    animation-name: searching;
    animation-duration: 0.9s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

@media only screen and (max-width: 768px) {
    .search-bar-container {
        left: 2%;
        width: 96%;
    }
}

@media only screen and (max-width: 425px) {
    .search-bar-container {
        display: inline-flex;
        flex-wrap: wrap;
        align-items: center;
        height: 26px;
        padding: 15px 13px;
        box-sizing: border-box;
        width: 100%;
        height: auto;
        left: 0px;
    }

    .search-bar-container>.search-bar-input.active {
        border: 1px solid var(--primary-background-color);
        padding: 5px;
    }

    .search-bar-container>input.search-bar-input {
        position: initial;
        width: 0%;
        height: 24px;
        padding: 5px 0px;
        border: 1px solid transparent;

        transition: width 0.2s cubic-bezier(0.42, -0.27, 0.59, 1.23);
    }

    .search-bar-container>input.search-bar-input.active {
        width: 85%;
    }

    .material-symbols-outlined {
        position: initial;
        font-size: 26px;
        color: var(--primary-background-color);
    }

    .search-results-container {
        position: initial;
        width: 85%;
        margin-left: auto;
        margin-right: 11px;
    }

    .search-bar-container>.spinner {
        left: auto;
        right: 30px;
        top: initial;
    }
}