$borderGrayNew: #858c8e; .search-bar:not(.locator .search-bar) { position: relative; height: 35px; .search-box-wrapper { max-height: 65vh; position: absolute; width: 100%; z-index: 10; } #dfp-search-box { background: #fff; color: #000; border-radius: 0 0 6px 6px; border: 1px solid #F1F1F1; min-height: 1px; display: none !important; } .is-active #dfp-search-box { display: block !important; } &.is-voice-enabled .search-container { input.voice-search-icon-container { top: 2px; opacity: 1; pointer-events: all; @media (min-width: $screen-md-min) { top: 2px; } } } &.is-voice-enabled.is-listening .search-container { input.voice-search-icon-container { background-position: 9px 121%; } } .search-container { position: relative; input.site-search-field { @include font-size(16px); padding: 4px 40px 5px 6px; margin-bottom: 0; font-style: italic; box-sizing: border-box; } input.search-icon-container { position: absolute; right: 0; top: 1px; bottom: 0; width: 35px; border: 0; line-height: 1; padding: 7px 12px; background: url('//media.officedepot.com/image/upload/f_auto,q_auto/gtools/images/svg/icons/header/search.svg') center center no-repeat; box-sizing: border-box; transition: 250ms all ease-in-out; @include font-size($base-font-size); } input.voice-search-icon-container { position: absolute; right: 25px; height: 30px; top: -20px; opacity: 0; pointer-events: none; bottom: 0; width: 35px; border: 0; background: url('//media.officedepot.com/image/upload/f_auto,q_auto/gtools/images/common/icons/icon_voice_search.png') top center no-repeat; background-size: 17px; background-position: 9px 5px; transition: 250ms all ease-in-out; @include font-size($base-font-size); } } .search-bar-dropdown { opacity: 0; z-index: 10; left: 0; width: 100vw; max-height: 0px; overflow: hidden; margin-top: -30px; position: static !important; background: $white; pointer-events: none; border-radius: 0 !important; transition: all 200ms ease-in-out; @media (min-width: $screen-sm-min) { width: 100%; position: absolute; } &-heading { color: darken($gray, 10%); padding: 10px; font-size: 11px; background: $gray-light; } a { display: block; color: darken($gray, 10%); padding: 10px 0px 10px 21px; font-size: 11px; &:after { content: ' '; border-bottom: 1px solid $gray-light; width: 100%; display: block; margin-right: -10px; margin-top: 10px; margin-bottom: -10px; } &:before { display: block; float: left; margin: 5px 0 0 -14px; content: ' '; border-radius: 100%; background: $red; height: 7px; width: 7px; opacity: 0; transition: all 200ms ease-in-out; } &:hover, &:focus { font-weight: bold; color: darken($gray, 10%) !important; background: lighten($gray-medium, 40%); } &:focus:before { opacity: 1; } &:hover { text-decoration: underline; } } &-widget li:last-of-type a:after { display: none; } } &.is-active { .search-bar-dropdown { opacity: 1; margin-top: 6px; overflow: auto; max-height: 65vh; pointer-events: all; border: 1px solid $gray-light; @media (min-width: $screen-sm-min) { margin-top: 0px; } } } } .no-svg .search-container .search-icon-container { background: url('//media.officedepot.com/image/upload/f_auto,q_auto/gtools_bsd/images/us/bsd/header/search_icon.png') center center no-repeat; } html { width: 100%; height: 100%; } body{ position: relative; width: 100%; height: 100%; -webkit-overflow-scrolling: touch; } /* FullScreen Active State Overlay */ body.has-search-active { overflow: hidden; position: fixed; -webkit-overflow-scrolling : touch; height: 100% !important; } .refresh.header-responsive { .search-container { display: flex; height: 100%; .site-search-field { padding: 0.25rem 6rem 0.25rem 1rem; font-style: normal; border-radius: 0.25rem; } } .search-bar-dropdown-heading { background: none; font-weight: 700; font-size: 1rem; } .search-icon-container, .close-search { border: none; background: none; position: absolute; outline: none; } .close-search { top: 6px; right: 14px; svg { height: 16px; width: 16px; fill: $white; } } .search-icon-container { top: 7px; right: 0px; } .is-active .search-bar-dropdown { border: 1px solid $borderGrayNew; border-top: none; width: 100%; a { text-decoration: none; font-size: 0.85rem; padding: 10px; &:after { border-bottom: none; } &:before { background: transparent; } &:hover, &:focus { color: $blue !important; background-color: $blue-light; } } } .reset-search { position: absolute; right: 60px; height: 100%; padding-right: 5px; border-right: 1px solid $gray; cursor: pointer; svg { width: 15px; height: 15px; position: relative; top: 7px; } } } /**** tablet ***/ @media (min-width: $screen-xs) and (max-width: $screen-xs-max) { .refresh.header-responsive { .search-list-item { width: 40%; padding-right: 0!important; } } } @media (min-width: 601px) { .close-search { display: none; } } /*** Mobile Device ***/ @media (max-width: 600px) { .refresh.header-responsive { .show-search-overlay { position: fixed; width: 100%; height: 100%; background: $white; z-index: 1000; top: 0; .search-overlay-header { width: 100%; height: 72px; background: $red; } } .search-list-item { padding:0; } .site-search-field, .voice-search-icon-container { visibility: hidden; } &.search-overlay-added { .search-list-item { z-index: 1001; position: absolute; left: 0; width: 100%; .search-container { width: 90%; } } .site-search-field, .voice-search-icon-container { visibility: visible; } .search-bar-dropdown { margin-top: 0; border: none; } .search-box-wrapper { left: 0; position: fixed; } .search-icon-container { border-left: 1px solid $borderGrayNew; } .voice-search-icon-container { margin-right: 10px; border-radius: 0px; margin-top: 1px; } .reset-search-overlay { display: block; position: absolute; top: 3px; right: 3px; font-size: 1.4rem; } .reset-search { border-right: none; } } .search-bar.is-active { .search-bar-dropdown { max-height: 85vh; margin-top: 0.5rem; } } } }