/* The search panel is a full-screen layer on top of the reader, with its own scrollbar.
   Scrolling it never moves the reader underneath. */
#search-page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: scroll;
    overscroll-behavior: contain;       /* scrolling past the end doesn't pass through to the reader */
    background-color: #ffffff;
    z-index: 1100;                      /* above the reader's fixed header and footer */
}

/* while the search panel is open, the reader underneath can't scroll */
body.search-open {
    overflow: hidden;
}

#search-header{
    position: sticky;                   /* stays at the top of the search panel, aligned with the results */
    top: 0;
    width: 93%;
    margin: 0 auto;
    background-color: #ffffff;
    padding-top: 15px;
    padding-bottom: 12px;               /* space between the search box and the results scrolling underneath */
    z-index: 1;
    box-shadow: -8px 0 0 #fff, 8px 0 0 #fff;   /* covers the result rows' edges as they scroll under */
}

#search-menu {
    color:#2659AE   ;    
    padding: 0;
    display: inline;
    cursor:pointer;
    font-size:0.95em;
}

#search-menu li {
    display:inline;
    margin-right:14px;
    padding-left: 0px;
}

.search-page-container{
    padding-top:8px;
    padding-bottom:10px;
}

#search-page-search-container{
    display: block ;
    width: 93%;
    margin: 0 auto;
    padding-left: 1px;
    padding-right: 1px;
}

#search-page-help-container{
    display:none ;
}

.search-page-container h3{
    color: #940302;
    padding: 8px 0px 8px 0px ;
    margin: 0px 0px;
}

#search-page-help-container p{
    padding:2px 0px 2px 0px;
    margin:2px 0px 2px 0px;
}

.search-spacer{
    height:7px;
}

.larger{
    font-size:110%;
}


/*-------------------------------------------------------------- */

.search-result{
    margin: 0 -8px;                     /* keeps the text aligned with the search box */
    padding: 12px 8px;
    border-bottom: 1px solid #eeeeee;   /* divider line between results */
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.search-result:hover{
    background-color: #f4f7fd;          /* soft blue tint over the whole result */
}

.search-result hr{
    display: none;                      /* replaced by the border above */
}

/* line + label where each new batch of results starts (after See More) */
.search-batch-divider{
    padding: 8px 8px;
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
    color: #333;
    font-size: 16px !important;         /* stays small; the JS sets result text sizes */
    font-weight: 700;
    background-color: #e0e0e0;
}

.search-result-text{
    font-size: 1.3em;    
    line-height: 1.25em;
    display:inline;     
    color: #111;   
    cursor: pointer;
    text-align: left;
}

.search-result-info-a{
    font-size: 1.15em;      
    cursor:pointer;
    display:inline;    
    font-weight: 500;    
}

.not-visited{
    color:#3775dd;
}

.visited{
    color:#609;
}

.search-result-info-b {
    color:#006621 ;
    font-size:18px;
    display:block;
}

.search-result-info-a:link, .search-result-info-a:visited, .search-result-info-b:link, .search-result-info-b:visited{
    text-decoration: none;
}

.search-result-info-a:hover{
    text-decoration:underline;
}

/*-------------------------------------------------------------- */


#search-lang-sel{
    position:relative;
    width: calc(100% - 36px);
}

#search-form {
    display: flex;
    padding-top: 18px;
}


#search-input{
    font-size:20px;
    border:1px solid #aaaaaa;
    height:40px;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    border-top-right-radius: 0px;
    border-bottom-right-radius: 0px;    
    -webkit-appearance: none;           /* legacy iOS needs this */
    flex-grow: 2;
    padding:0;
    padding-left:10px;
    margin:0;
    background-color: #FFFFE5;
}

textarea:focus, input:focus{
    outline: none;
}

#search-button3 {
    height:40px;
    width:36px;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;    
    text-align: center;
    color:#fafafa;
    border:1px solid #3775dd;
    background-color:#3775dd;
    cursor:pointer;
    padding:0;
    margin:0;
}

button:focus {outline:0;}

.search-icon-in-search-page{
    width: 20px;
    height: 20px;
    stroke-width: 0;
    stroke: currentColor;
    fill: currentColor;
    color:#eeeeee ;

    user-select: none;
    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -o-user-select: none;

    pointer-events: none;
}

#search-input::-webkit-search-cancel-button{
    margin-left:7px;
    margin-right:7px;
}

#ms {
    width: 100%;
}

/* overwride multiple-select */
.selected{
    background-color:#3775dd;
    color:#fafafa;
}

.ms-choice {
    height: 34px;
    line-height: 34px;
    -webkit-border-radius: 0px;
    -moz-border-radius: 0px;
    border-radius: 0px;
    font-size:15px;
    background-color: #efefef;
    border: solid #b0b0b0 1px;
}

.ms-choice:hover {
    text-decoration: none;
    cursor:pointer;
    background-color: #e8e8e8;
    border: solid #a8a8a8 1px;
}

.ms-drop ul > li {
padding: 3px 8px;
}

/*-------------------------------------------------------------- */

.search-btn {
    padding:8px 12px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 1px rgba(0,0,0,0.24);
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
    background: #3775dd;
    color:#fafafa;
    margin-top:6px;
    float:left;
    cursor: pointer;
    font-size:14px;
}

.search-btn:hover {
    text-decoration: none;
    cursor:pointer;
}

.search-noselect {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none;   /* Chrome/Safari/Opera */
    -khtml-user-select: none;    /* Konqueror */
    -moz-user-select: none;      /* Firefox */
    -ms-user-select: none;       /* IE/Edge */
    user-select: none;           /* non-prefixed version, currently not supported by any browser */
}

#search-status{
    color:#777;
    padding-top: 7px;
    padding-bottom: 25px
}

/* spinner */
.search-spinner {
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top: 3px solid #3775dd;
    width: 30px;
    height: 30px;
    -webkit-animation: spin 0.4s linear infinite; /* Safari */
    animation: spin 0.4s linear infinite;
  }
  
  /* Safari */
  @-webkit-keyframes spin {
    0% { -webkit-transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); }
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }


.search-footer{
    padding-bottom:160px;
}

.search-spinner-container {
    padding-top:10px;
    padding-left: 10px;
}

.icon-return-from-search{
    cursor: pointer;
    width: 24px;
    height: 24px;
    stroke-width: 0;
    stroke: currentColor;
    fill: currentColor;
    color: #2659AE;

    user-select: none;
    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -o-user-select: none;

    pointer-events: none; 
    padding-right:10px;

}

/*---------------------------------------------------------------------------------------------------*/

@media only screen and (min-width: 480px) {

    #search-header,
    #search-page-search-container {
        width: 90%;
    }    
}

@media only screen and (min-width: 900px) {

    #search-header,
    #search-page-search-container {
        width: 750px;
    }

    .search-result-text{
        font-size: 17px;    
        line-height: 140%;              
    }
    
    .search-result-info-a{
        font-size: 1.0em;    
        line-height: 1.2em;        
    }    

    #search-results {
        text-align: left;
    }
}