/*
    JSPWiki - a JSP-based WikiWiki clone.

    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); fyou may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
*/
/*
Section: SearchBox
    See SearchBox.jsp, UserBox.jsp

DOM structure:
(start code)
  	form#searchform.searchbox.col6.offset6.pull-right.form-inline

      input#query.form-control[type="text"][placeholder="Quick Navigation"]
      div.btn
        span.icon-search
        span.caret

	  ul.dropdown-menu.pull-right //quick navigation dropdown
(end)
*/

.searchbox {
    position:relative;   //container for the dropdown-menu
    //width:33%;

    > input {
        .opacity(0);
        width: 100%;
        //min-width:240px;

        padding-right: 2em;
        .transition( all 0.5s ease );

        + .btn {
            position: absolute;
            top: 0;
            right: 0;
            border: none;
            background: transparent;
        }

    }
    &:hover > input,
    &:focus > input {
        .opacity(1);

        + .btn { color: @btn-default-color; }
    }

    .dropdown-header .btn-block {
        padding: @padding-base-vertical @padding-base-horizontal;
    }
}


/*
Section: Quick Navigation DropDown
    The quick navigation section contains a drop-down menu,
    with auto-completion search results, and a list of recently searched commands.

    Uses bootstrap/dropdown.less

DOM Structure:
(start code)
    ul.dropdown-menu.pull-right

      li.dropdown-header
        button.btn.btn-xs.btn-primary.btn-block Full Search...

      li.findpages
        a[title="Create <page>"]
          label.btn.btn-danger.btn-xs.pull-right
            input#cloney.pull-left[type=checkbox]  Clone this page
          span.createpage  <page-name>

      li.findpages
          a[href]
            span.badge.pull-right <score>
            span <page>

      li.divider

      li.dropdown-header Recent Searches
      li.recents
          a[href]
      li.recents.clear
          a [Clear recent searches]
(end)
*/

.findpages {

    a[href*="&clone="] .createpage { font-weight:bold; }

    //some space between checkbox, .btn, .badge and text
    .pull-right { margin-left:.5em; }
    #cloney { margin-left:.5em;}

}
