/*
=======================================================

FREEBASE SUGGEST

This file is part of the freebase-suggest jQuery plugin.

It is maintained by Metaweb Technologies, Inc. and
available for use under a Creative Commons License.

Author: Kai Conragan (kai@metaweb.com)

    GLOSSARY
    
    .fbs-pane       : Outermost container for result list <div>
    .fbs-subpane    : Inner container for result list <div>
    .fbs-list       : Contained by .fbs-subpane, this is the actual results list <ul>
    .fbs-item       : Individual item in results list <li>
    .fbs-flyout-pane : Outermost container for flyout on specific object <div>

=======================================================
*/

/*
-------------------------------------------------------
Freebase Suggest Reset
-------------------------------------------------------

reset all Freebase Suggest elements to insure consisten cross-browser rendering

*/

.fbs-reset,
.fbs-reset h1,
.fbs-reset h2,
.fbs-reset h3,
.fbs-reset h4,
.fbs-reset h5,
.fbs-reset h6,
.fbs-reset p,
.fbs-reset img,
.fbs-reset dl,
.fbs-reset dt,
.fbs-reset dd,
.fbs-reset ol,
.fbs-reset ul,
.fbs-reset li {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-weight: inherit;
    font-style: inherit;
    font-size: 100%;
    font-family: inherit;
    vertical-align: baseline;
}

/*
-------------------------------------------------------
Freebase Suggest Chrome
-------------------------------------------------------

You can change the colors of Freebase Suggest by overriding
the following rules. We recommended that you copy/paste the
below rules into your own stylesheet to customize.

*/

.fbs-pane,
.fbs-flyout-pane,
li.nomatch,
a.fbs-more-link,
li.fbs-selected,
.fbs-flyout-images,
#fbs-topic-image { 
    background: #fff; 
}


.fbs-suggestnew { 
    color: #fff;
}

.fbs-pane,
.fbs-flyout-pane,
.fbs-flyout-subtitle,
.fbs-topic-properties strong { 
    color:  #666;
}

h3.fbs-topic-properties,
.fbs-flyout-pane p { 
    color: #444;
}

.fbs-item-name,
li.fbs-help-on-focus,
li.nomatch,
.fbs-nomatch-text,
.fbs-flyout-pane h3,
.fbs-properties-header { 
    color: #333;
}

.fbs-pane,
.fbs-flyout-pane { 
    border: 1px solid #bbb;
}

.fbs-flyout-pane {
    border-color: #ccc;
}

.fbs-list,
.fbs-list-icons,
.fbs-flyout-content,
.fbs-attribution, 
.fbs-header { 
    background-color: #f5f5f5;
}

.fbs-header { background: #fefefe; }

li.fbs-help-on-focus,
li.nomatch { 
    border-bottom: 1px solid #e5e5e5;
}

.fbs-item-name {
    border: 1px solid #f5f5f5;
}

h1#fbs-flyout-title,
li.fbs-selected .fbs-item-name { 
    color: #f60;
}

li.fbs-selected .fbs-item-name {
    border-color: #f60;
}

.fbs-item-type { 
    color: #777;
}

.fbs-nomatch-text {
    border-bottom: 1px solid #e5e5e5;
    background: #f8f8f8;
}

.fbs-suggestnew { 
    background: #999;
}


#fbs-flyout-title .fbs-flyout-label { 
    color: #aaa;
}

/* topic image */
#fbs-topic-image,
.fbs-flyout-images {
    border: 1px solid #a9a9a9;
}

.fbs-suggestnew-button,
.fbs-flyout-pane { 
    border: 1px solid #9a9a9a;
}

ul.fbs-list,
.fbs-flyout-content,
.fbs-attribution,
li.fbs-item, 
.fbs-header {
    border: 1px solid #e5e5e5;
}

.fbs-header { border-bottom: 0; }

li.fbs-item {
    border-top: 0;
    border-right: 0;
    border-left: 0;
}

.fbs-attribution {
    border-top: 0;
}

/*
-------------------------------------------------------
Freebase Suggest Typography
-------------------------------------------------------

    establish base typography size by:
    1. Setting parent div to font-size 16px;
    2. Setting inner div to font-size 62.5%, giving us a 10px baseline
    3. Setting global style rules
*/

.fbs-pane,
.fbs-flyout-pane {
    font-size: 16px;
    font-family: Helvetica Neue, Arial, Helvetica, sans-serif;
}

ul.fbs-list,
.fbs-flyout-content,
.fbs-attribution,
div.fbs-header {
  font-size: 62.5%;
}


/* insure <strong> displays bold */
.fbs-pane strong,
.fbs-flyout-pane strong {
  font-weight: bold;
}

/*
-------------------------------------------------------
Freebase Suggest Structure
-------------------------------------------------------
*/

ul.fbs-list,
.fbs-flyout-content,
.fbs-attribution {
    margin: 2px;
}

.fbs-flyout-content { margin-bottom: 0; }
.fbs-attribution    { margin-top: 0; }

.fbs-pane        { width: 325px; } /* results list container */
.fbs-flyout-pane { width: 319px; margin-left: 3px; } /* flyout container, 3px narrower on each side to create drawer appearance */

ul.fbs-list {    
    max-height: 320px;  
    overflow: auto;
    overflow-x: hidden;
    border-bottom: 0;
}

.fbs-flyout-content,
.fbs-attribution {
  padding: 5px;
}

.fbs-flyout-content:after {
    content: ".";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;
}
  

/*
-------------------------------------------------------
Freebase Suggest Results List
-------------------------------------------------------
*/

/* each .fbs-item is a single returned result */
li.fbs-help-on-focus,
li.nomatch {
    padding: 6px 8px 7px 6px;
    font-size: 1.4em;
    line-height: 1;
}

/* show more results */
li.fbs-more { padding: 0; background: transparent;}

a.fbs-more-link {
    display: block;
    padding: 4px;
    font-weight: bold;
    font-size: 12px;
}

.fbs-more .fbs-help {
    display: none;
}

.fbs-header {
    font-weight: bold;
    padding: 4px 6px;
    margin: 2px 2px -2px 2px;
}


.fbs-item-alias,
.fbs-item-type,
.fbs-item-name {
    display:block;
    overflow: hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
}

.fbs-item-name {
    padding: 5px 8px 4px 6px;
    font-size: 1.4em;
    line-height: 1;
}

/* result name */
.fbs-item-name strong {
    font-weight: bold;
}

/* hover state of .fbs-item */
li.fbs-selected { 
    cursor: pointer;
}

/* what the object is */
.fbs-item-type  {
    font-size: 0.9em;
}

/* also known as */
.fbs-item-alias {
    float: right;
    max-width: 40%;
    vertical-align:bottom;
}
.fbs-item-alias:before { content:'...'; }

/*
-------------------------------------------------------
Freebase Suggest No Results
-------------------------------------------------------
*/

li.nomatch {
    padding: 0;
}

.fbs-nomatch-text {
    display: block;
    font-weight: bold;
    line-height: 1;
}

.fbs-nomatch-text,
.nomatch h3,
ul.fbs-search-tips {
    padding: 6px 8px 7px 6px;
}

.nomatch h3 {
    font-weight: bold;
}

ul.fbs-search-tips li {
  list-style: disc;
  margin-left: 1.6em;
  margin-bottom: 0.3em;
}

/*
-------------------------------------------------------
Freebase Suggest Create New
-------------------------------------------------------
*/

/* suggest new container */
.fbs-suggestnew {
    padding: .4em .3em .5em 8px;
}

.fbs-suggestnew-button {
    cursor: pointer;
    padding: 0.2em 0.3em;
    margin-left: 0px !important;
    max-width: 17em;
}

.fbs-suggestnew-description { margin-bottom: 0.6em; }

/* (Shift + Enter) */
.fbs-more-shortcut,
.fbs-suggestnew-shortcut {
  margin-left: 0.4em;
  font-size: 90%;
}

/*
-------------------------------------------------------
Freebase Suggest Flyout Elements
-------------------------------------------------------
*/

/* the object title */
h1#fbs-flyout-title {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 0.5em;
    margin-top: 0.3em;
}

/* denotes topic, type, view, base, etc. */
#fbs-flyout-title .fbs-flyout-label {
    font-weight: normal;
}

/* Image for single topic result */
#fbs-topic-image {
    float: left;
    padding: 1px;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Image pair for views/base/etc. */
.fbs-flyout-images {
    float: left;
    margin: 0 10px 0 0;
    padding: 1px 0 1px 1px;
}

.fbs-flyout-images img {
    float:left;
    margin-right: 1px;
}

.fbs-flyout-subtitle {
    font-size: 1.1em;
    margin-bottom: 0.5em;
}

.fbs-flyout-pane h3 {
    font-size: 1em;
    line-height: 1.4;
    margin-bottom: 0.25em;
}

.fbs-properties-header {
    font-size: 1em;
    font-weight: bold;
    margin: 0.5em 0;
}

h3.fbs-topic-properties {
    font-size: 1.2em;
    font-weight: bold;
}

.fbs-topic-properties strong {
    display: block;
    font-size: 0.8em;
}

.fbs-flyout-pane p {
  font-size: 1.2em;
  line-height: 1.4;
}

/* this class is applied with fbs-topic-flyout when a thumbnail is present
   in order to provide a fixed margin on text to prevent poor text wrapping
   around thumbnail
*/
p.image-true,
h3.image-true,
h1.image-true { margin-left: 85px; }

.fbs-meta-info { margin-left: 110px; }

/* generic flyout list */
.fbs-flyout-list li {
    font-size: 1em;
    margin-left: 15px;
}

#fbs-domain-flyout #fbs-flyout-title { margin-bottom: 0.5em; }

/*
-------------------------------------------------------
Freebase Suggest Attribution
-------------------------------------------------------
*/

.fbs-attribution {
    padding-right: 72px; /* accommodate attribution background image */
    background-image: url(http://suggest.freebaseapps.com/fbs-attribution);
    background-repeat: no-repeat;
    background-position: center right;
    min-height: 15px;
}

.fbs-flyout-types {
    font-style: italic;
    line-height: 1; 
    font-size: 1.2em;
}



/*
---------------------------
text expand
----------------------------
*/
.fbs-icon-text-expand {
    background:transparent url(http://www.freebase.com/resources/images/templates/topic/icon-text-input-expand-contract.gif) no-repeat scroll 0 0;
    border:0 none;
    margin:0;
    padding:1px 6px;
    vertical-align: bottom;
}
.fbs-icon-text-collapse {
    background:transparent url(http://www.freebase.com/resources/images/templates/topic/icon-text-input-expand-contract.gif) no-repeat scroll 0 -25px;
    border:0 none;
    float:right;
    height:16px;
    margin:3px 3px 0 0;
    padding:0;
    width:16px;
}

.fbs-expand-pane {
    border:2px solid #006EE9;
    width:250px;
}

.fbs-expand-textarea {
    min-height:200px;
    height:200px;
    width:250px;
    border:0 none;
    margin:0;
}
.fbs-expand-toolbar {
    background:#F2F2F2 none repeat scroll 0 0;
    border-top:1px solid #CCCCCC;
    color:#818181;
    font-size:0.9em;
    min-height:20px;
}
.fbs-expand-charcounter {
    padding:5px 25px 5px 10px;
}
/*

-------------------------------------------------------
Freebase SuggestIE Hacks
-------------------------------------------------------
We can't use conditional comments so we have to resort
to inline Internet Explor fixes

*/

* html .fbs-list,
* html .fbs-list-icons { height: expression( this.scrollHeight > 410 ? "410" : "auto" ); /* sets max-height for IE */ }

* html .fbs-item-alias,
* html .fbs-item-type,
* html .fbs-item-name {
    width : 253px !important;
}

* html .fbs-item-name{ width: 100%; }
* html .fbs-item-alias { display:none; }

* html .fbs-flyout-content:after { height: 1px; }

/*
----------------------------
Temporary hacks
----------------------------
these are just to force some
design changes before we can fully
update the templates.
*/

.fbs-item-type,
.unicode {
  display:none;
}


