/*
    ATLAS Intent Widget CSS
    Copyright (c) 2020 Canadian Tire Corporation
*/
/* Common styles */

/* End common styles */

.autocomplete-suggestions-container.pty-aiw {
    position: absolute;
    min-height: 570px;
    z-index: 9998;
    box-sizing: border-box;
    text-align: left;
    cursor: default;
    border: 1px solid #ccc;
    background: #fff;
    font-family: Lato;
    box-shadow: 0 8px 8px 0 rgba(47, 47, 47, 0.33);
    display: none;
}

.autocomplete-suggestions-container.aiw-fixed {
    position: fixed;
}

.autocomplete-product-grid-suggestions-container {
    position: absolute;
    min-height: 570px;
    z-index: 9999;
    overflow: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    text-align: left;
    cursor: default;
    border: 1px solid #ccc;
    background: #fff;
    font-family: Lato;
}

/* core styles should not be changed */
.autocomplete-suggestions.pty-aiw {
    position: relative;
    top: 0 !important;
    z-index: 9999;
    min-height: auto;
    overflow: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    text-align: left;
    cursor: default;
    background: #E8E8E8;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    color: #323232;
    font-family: Lato;
    padding-bottom: 12px;
}

.pty-aiw .autocomplete-suggestion-title {
    color: #323232;
    font-size: 16px;
    font-weight: bold;
    padding: 20px 10px 10px 20px;
    font-family: Lato;
}

.pty-aiw .autocomplete-suggestion {
    display: block;
    position: relative;
    line-height: 26px;
    white-space: normal;
    overflow: hidden;
    overflow-wrap: break-word;
    height: 26px;
    padding: 0 20px 0 20px;
    cursor: pointer;
    /*border-bottom: 0 solid #ccc;*/
    font-family: Lato;
    font-size: 13px;
    font-style: normal;
    font-weight: normal;
    color: #323232;
}

.autocomplete-product-grid-suggestions.pty-aiw {
    /* position: absolute; */
    background: #fff;
    height: auto;
    font-family: Lato;
    font-size: 13px;
    font-style: normal;
    font-weight: normal;
    display: block;
    cursor: pointer;
    top: 0;
}

.autocomplete-product-grid-suggestion.pty-aiw {
    display: flex;
    position: relative;
    box-sizing: border-box;
    background: #fff;
    height: 100px;
    padding: 0 10px;
    margin: 5px 1px;
    font-family: Lato;
    font-size: 13px;
    font-style: normal;
    font-weight: normal;
    border-bottom: 1px solid #efefef;
}

.pty-aiw .autocomplete-product-grid-description {
    display: block;
    padding: 5px 10px 5px 5px;
    color: #323232;
}

.pty-aiw .autocomplete-suggestion.selected:after {
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAANCAYAAACUwi84AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAjBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+QWNvcm4gdmVyc2lvbiA0LjUuODwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8dGlmZjpDb21wcmVzc2lvbj41PC90aWZmOkNvbXByZXNzaW9uPgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43MjwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WFJlc29sdXRpb24+NzI8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgpDyBsAAAAA6ElEQVQYGW1ROw6CQBRkVzpqP42VhVFaCjrEE9jrCbyPhb1HsAbpCCQkJMbGqIl6BWgI4AxRAsSXTDK7M/ve7K4Iw3AqpdxnWbYxTfOtdEqWZbkDLFVVT57njTu6IouiWAMXCBNN09yuSfCE7/tDjHGAObrdhRC2YRhPapWBJI7jAXI4oDrwABY01QZsKFEU9THOBa1M6Gi3DF/THKYzODW3x81fcUye50esBwDHrGoDg7I9AurNoJKnm7fA8pamaRWQmgiCYMQrgs8oJkliW5b1oshSgQMwQ/srsITYem4+9RY4Ufz3Fx8dAHf96fgjYwAAAABJRU5ErkJggg==);
    width: 8px;
    height: 20px;
    background-color: transparent;
    background-repeat: no-repeat;
    overflow: hidden;
    position: absolute;
    top: 8px;
    right: 17px;
    display: block;
    content: '';
    filter: grayscale(100%) sepia(71%) brightness(63%) hue-rotate(69deg) saturate(1000%) contrast(71%) invert(8%);
    -webkit-filter: grayscale(100%) sepia(71%) brightness(63%) hue-rotate(69deg) saturate(1000%) contrast(71%) invert(8%);
    -moz-filter: grayscale(100%) sepia(71%) brightness(63%) hue-rotate(69deg) saturate(1000%) contrast(71%) invert(8%);
}

.pty-aiw .autocomplete-thumbnail-wrp {
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: flex-end;
    flex: 0 0 auto;
    height: 80px;
    width: 80px;
    padding: 1px 10px 3px;
    box-sizing: border-box;
    margin-right: 15px;
    margin-top: auto;
    margin-bottom: auto;
}

.pty-aiw .autocomplete-thumbnail {
    max-width: 80px;
    max-height: 80%;
    float: none;
    margin: 0;
}

.autocomplete-products-title {
    color: #323232;
    font-size: 13px;
    font-weight: bold;
    padding: 20px 10px 10px 20px;
    font-family: Lato;
}

.autocomplete-products-title strong {
    color: #080;
}


.autocomplete-clear-control {
    color: #080;
    float: right;
    cursor: pointer;
    font-size: 13px;
}

/* we want to popular history from AEM's list, but we don't want to show it */
.global-header__recent-search-list {
    display: none !important;
}

.autocomplete-more-results {
    height: 30px;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
    line-height: 30px;
    width: inherit;
    position: absolute;
    bottom: 0;
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none;
    z-index: inherit;
}

.autocomplete-more-results.selected {
    color: #000;
}

.pty-aiw p.autocomplete-product-grid-price {
    padding: 0 0 0 4px;
    margin: 0;
    font-size: 13px;
    font-weight: bold;
    min-height: 21px;
}

.pty-aiw .was-price {
    color: #666;
    font-weight: 400;
    text-decoration: line-through;
}

.pty-aiw .sale-price {
    margin-left: 8px;
    color: #000;
}

.pty-aiw p.autocomplete-product-grid-name {
    padding: 0 0 0 4px;
    margin: 0;
    font-size: 13px;
    line-height: 20px;
    font-weight: bold;
    max-height: 82px;
    overflow: hidden;
    -ms-word-break: break-word;
    word-wrap: break-word;
}

.autocomplete-suggestion b {
    font-family: Lato;
    font-weight: normal;
}

.autocomplete-suggestion b.category {
    font-family: Lato;
}

.autocomplete-suggestion .termin {
    font-family: Lato;

}

.pty-aiw .autocomplete-suggestion.selected {
    font-family: Lato;
    background: transparent;
    background-color: white;
    color: #00792B;
}

.autocomplete-suggestion.selected:after {
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAANCAYAAACUwi84AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAjBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+QWNvcm4gdmVyc2lvbiA0LjUuODwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8dGlmZjpDb21wcmVzc2lvbj41PC90aWZmOkNvbXByZXNzaW9uPgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43MjwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WFJlc29sdXRpb24+NzI8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgpDyBsAAAAA6ElEQVQYGW1ROw6CQBRkVzpqP42VhVFaCjrEE9jrCbyPhb1HsAbpCCQkJMbGqIl6BWgI4AxRAsSXTDK7M/ve7K4Iw3AqpdxnWbYxTfOtdEqWZbkDLFVVT57njTu6IouiWAMXCBNN09yuSfCE7/tDjHGAObrdhRC2YRhPapWBJI7jAXI4oDrwABY01QZsKFEU9THOBa1M6Gi3DF/THKYzODW3x81fcUye50esBwDHrGoDg7I9AurNoJKnm7fA8pamaRWQmgiCYMQrgs8oJkliW5b1oshSgQMwQ/srsITYem4+9RY4Ufz3Fx8dAHf96fgjYwAAAABJRU5ErkJggg==);
    width: 8px;
    height: 20px;
    background-color: transparent;
    background-repeat: no-repeat;
    overflow: hidden;
    position: absolute;
    top: 8px;
    right: 17px;
    display: block;
    content: '';
    filter: grayscale(100%) sepia(71%) brightness(63%) hue-rotate(69deg) saturate(1000%) contrast(71%) invert(8%);
    -webkit-filter: grayscale(100%) sepia(71%) brightness(63%) hue-rotate(69deg) saturate(1000%) contrast(71%) invert(8%);
    -moz-filter: grayscale(100%) sepia(71%) brightness(63%) hue-rotate(69deg) saturate(1000%) contrast(71%) invert(8%);
}

.autocomplete-suggestion:after {
    display: none;
    content:''
}

.pty-aiw .autocomplete-suggestion.selected b {
    font-family: Lato;
    color: #00792B;
}

.pty-aiw .autocomplete-suggestion.selected .termin {
    color: #00792B;
    font-family: Lato;
}

.aiw-no-results {
    display: none;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 15px;
    text-transform: uppercase;
    font-weight: bold;
    color: #444;
    font-size: 13px;
    -ms-word-break: break-word;
    word-wrap: break-word;
    line-height: 130%;
}

.autocomplete-product-grid-suggestion.selected::after {
    content: '';
    position: absolute;
    height: calc(100% + 5px);
    top: -5px;
    right: -2px;
    width: 8px;
    background: #00792B;
    margin: auto;
}

.autocomplete-product-grid-suggestion.selected .autocomplete-product-grid-name {
    color: #00792B;
    text-decoration: none;
}

.autocomplete-product-grid-suggestion.selected .autocomplete-thumbnail {
    opacity: 0.85;
}

.suggested-item-text,
.termin,
.past-search-text,
.search-term-text {
    margin: 0 15px 0 15px;
}

@media only screen and (max-width: 767px) {
    .autocomplete-product-grid-suggestions,
    .autocomplete-more-results {
        display: none !important;
    }

    .suggested-item-text,
    .termin,
    .past-search-text,
    .search-term-text {
        margin: 0 15px 0 15px;
    }

    .suggested-item:not(:last-child),
    .category-item:not(:last-child),
    .past-search:not(:last-child),
    .past-search:not(:searched-term) {
        border-bottom: 1px solid #ccc;
    }

    .autocomplete-suggestion.category-item,
    .autocomplete-suggestion.suggested-item,
    .autocomplete-suggestion.past-search,
    .autocomplete-suggestion.searched-term {
        height: 32px;
        line-height: 32px;
    }

    .autocomplete-suggestion.category-item .termin,
    .autocomplete-suggestion.suggested-item b,
    .autocomplete-suggestion.category-item,
    .autocomplete-suggestion.suggested-item,
    .autocomplete-suggestion.past-search,
    .autocomplete-suggestion.searched-term {
        font-size: 13px;
        vertical-align: inherit;
    }

    .autocomplete-suggestions.pty-aiw {
        margin: 0;
        padding-bottom: 12px;
    }

    .autocomplete-suggestions-container.pty-aiw {
        min-height: auto;
        top: 87px !important;
        min-width: calc(100vw - 16px) !important;
        margin-left: -268px;
        margin-top: 1px;
    }

    .pty-aiw .autocomplete-thumbnail-wrp {
        width: 100%;
    }

    .pty-aiw p.autocomplete-product-grid-name {
        font-size: 13px;
        line-height: 14px;
    }

    .pty-aiw p.autocomplete-product-grid-price {
        font-size: 13px;
        min-height: 19px;
        padding-top: 10px;
    }
    
    .autocomplete-suggestion.selected:after {
        background-image: none !important;
    }
}

@media only screen and (max-width: 359px) {
    .autocomplete-suggestions-container.pty-aiw {
        margin-left: -228px;
    }
}

.aiw-mobile-view .autocomplete-product-grid-suggestions {
    display: none !important;
}

.aiw-mobile-view.autocomplete-suggestions-container {
    min-height: auto;
}

.aiw-mobile-view .autocomplete-suggestion.suggested-item,
.aiw-mobile-view .autocomplete-suggestion.category-item,
.aiw-mobile-view .autocomplete-suggestion.past-search,
.aiw-mobile-view .autocomplete-suggestion.searched-term {
    margin: 0 15px 0 15px;
    padding: 0;
}

.aiw-mobile-view .autocomplete-suggestions.pty-aiw {
    background-color: white;
}

.aiw-mobile-view .autocomplete-thumbnail-wrp.pty-aiw {
    width: 100%;
}

.aiw-mobile-view .autocomplete-product-grid {
    display: flex;
    justify-content: center;
}

.aiw-mobile-view .autocomplete-product-grid-suggestion.pty-aiw {
    display: inline-block;
    width: 33.3%;
    height: auto;
    border-top: 1px #EEEEEE solid;
    border-bottom: 1px #EEEEEE solid;
    margin: 0;
}

.aiw-mobile-view .autocomplete-product-grid-suggestion.pty-aiw:not(:last-child) {
    border-right: 1px #EEEEEE solid;
}

.aiw-mobile-view img.autocomplete-thumbnail.pty-aiw {
    width: 50px;
}

.aiw-mobile-view .pty-aiw .autocomplete-suggestion-title {
    padding-left: 15px;
}

.aiw-mobile-view .suggested-item:not(:last-child),
.aiw-mobile-view .category-item:not(:last-child),
.aiw-mobile-view .past-search:not(:last-child),
.aiw-mobile-view .past-search:not(:searched-term) {
    border-bottom: 1px solid #ccc;
}

.aiw-mobile-view .autocomplete-suggestion.category-item,
.aiw-mobile-view .autocomplete-suggestion.suggested-item,
.aiw-mobile-view .autocomplete-suggestion.past-search,
.aiw-mobile-view .autocomplete-suggestion.searched-term {
    height: 32px;
    line-height: 32px;
}

.aiw-mobile-view .autocomplete-suggestion.category-item .termin,
.aiw-mobile-view .autocomplete-suggestion.suggested-item b,
.aiw-mobile-view .autocomplete-suggestion.category-item,
.aiw-mobile-view .autocomplete-suggestion.suggested-item,
.aiw-mobile-view .autocomplete-suggestion.past-search,
.aiw-mobile-view .autocomplete-suggestion.searched-term {
    font-size: 13px;
    vertical-align: inherit;
}

.aiw-mobile-view .autocomplete-suggestion.selected:after {
    background-image: none !important;
}
