// // Citizen - Search Styles // https://starcitizen.tools // // TODO: Make it configurable and flexible #site-search { #search-form { position: absolute; z-index: -1; // Not interactable margin: 7px 0 8px; // 1px h3 screen reader top: 0; right: @icon-box-size + @icon-padding * 2; opacity: 0; .boxshadow(4); transition: @transition-opacity; // Search field #search-input { padding: 12px 15px; width: 0; max-width: calc(~"100vw -"@icon-box-size * 2 + @icon-padding * 4 + @margin-side ); border: 1px solid @base-90; transition: @transition-width, @transition-box-shadow; &:focus { outline: 0; .boxshadow(5); } } // Search field button #search-button { .button-blue; width: @icon-box-size + @icon-padding * 2; height: 41px; border: 0; cursor: pointer; //somehow it is not pointer &:hover, &:active, &:focus { .button-blue-active; } } } #search-toggle-icon-container { display: flex; align-items: center; justify-content: center; height: inherit; #search-toggle-icon { opacity: @opacity-icon; position: absolute; margin-top: -2px; margin-left: -2px; width: 10px; height: 10px; border: solid 2px @base-0; border-radius: 100%; transform: rotate(-45deg); transition: @transition-transform, @transition-height, @transition-opacity, @transition-border-color; &:before, &:after { content: ''; position: absolute; width: 2px; background-color: @base-0; transition: inherit; } &:before { top: 10px; left: 3px; height: 10px; } &:after { opacity: 0; top: -1px; left: 4px; height: 18px; transform: rotate(-90deg); } } } #search-toggle { &:checked { ~#search-form { z-index: 5; opacity: 1; #search-input { width: 400px; } } ~#search-toggle-icon-container #search-toggle-icon { border-color: transparent; &:before { height: 18px; transform: translate(1px, -11px); } &:after { opacity: 1; } &:hover { ~#search-toggle-icon-container #search-toggle-icon { border-color: @base-0; &:after { opacity: 0; } } } } &:hover { ~#search-toggle-icon-container #search-toggle-icon { border-color: @base-0; &:after { height: 12px; } } } } &:hover { ~#search-toggle-icon-container #search-toggle-icon { opacity: @opacity-icon-active; &:before { height: 5px; transform: translate(0px, 5px); } } } } } .suggestions { .boxshadow(4); .suggestions-results { border: 0; .suggestions-result { padding: @margin-side / 2 15px; } } .suggestions-special { padding: @margin-side / 2 15px; border: 0; background-color: @base-90; } .suggestions-result-current { background-color: @accent-10; } } // RTL tweaks .rtl { #site-search { #search-form { left: @icon-box-size + @margin-side + @icon-padding; right: unset; } } }