@namespace url(http://www.w3.org/1999/xhtml);

/* Filed as "paintless", but this does contain rules 
 * which use Google's own CSS color values.
 * Add-on styles must account for that by using
 * more specific selectors.
 */

/*
 * DOMAINS
 */

@-moz-document domain("google.com") {

/* Combined rules for generic changes.
*/

/* Destroy */
 /* 'sponsored links' */
 #mbEnd
  {
    display: none !important;
  }

/* Auto Width */
 /* search results */
 .g .j
  {
    width: auto !important;
  }

/* Bottom or Top Border gets full border. */
 td#headerText,
 #container > #footer,
 #header > .header_tab,
 .bb,
 .bt,
 .hd,
 .hpm_title,
 .sub_cat_title
  {
    border: 1px solid #36c !important;
  }

/* No Border */
 .searchleftnav
  {
    border: 0 !important;
  }

/* No Margin */
 noop
  {
    margin: 0 !important;
  }

/* No Padding */
 noop
  {
    padding: 0 !important;
  }

/* Normalize Backgrounds */
 /* Light blue header */
 .hd
  {
    background: #d5ddf3 !important;
  }

/* Normalize Padding */
 .t
  {
    padding: 3px !important;
  }


/* The rest effects specific items individually.
 */

/* Google bar */
 #gbar
  {
    height: 1em !important;
    min-height: 16px !important;
    padding: .25em .5em !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    z-index: 101 !important;
  }
 #guser,
 /* lol gmail */
 HTML > BODY > DIV:first-child > DIV > DIV > DIV > DIV > DIV > DIV > DIV > DIV:first-child > DIV > DIV:first-child > DIV > DIV:first-child + DIV + DIV
  {
    height: 1em !important;
    min-height: 16px !important;
    padding: .25em .5em !important;
    text-align: right !important;

    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    z-index: 100 !important;
  }
 #guser table.gaialinks
  {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
  }
 #gbar + :not(#guser),
 #guser + :not(#gbar),
  /* iGoogle */
 #doc3,
  /* Picasa */
 #lhid_topnav
  {
    margin-top: 2em !important;
  }
 #gbar *,
 #guser *,
 #gbi
  {
    z-index: 100 !important;
  }

}

@-moz-document domain("google.com") {


/* The rest effects specific items individually.
 */

/* Image Search Thumbnail Table */
 td[id^="tDataImage"]
  {
    vertical-align: top !important;
  }
 td[id^="tDataText"]
  {
    vertical-align: bottom !important;
  }

}

@-moz-document domain("mail.google.com") {

/* Tweak domain styles that trash GMail.
 */

/* Google bar */
 #gbar + div + div:not(#guser),
 HTML > BODY > DIV:first-child > DIV > DIV > DIV > DIV > DIV > DIV > DIV > DIV:first-child > DIV > DIV:first-child > DIV > DIV:first-child + DIV + DIV > *
  {
    margin-top: 0 !important;
  }
 HTML > BODY > DIV:first-child > DIV > DIV > DIV > DIV > DIV > DIV > DIV > DIV:first-child > DIV > DIV:first-child > DIV > DIV:first-child + DIV + DIV > *
  {
    padding-top: 0 !important;
  }
 HTML > BODY > DIV:first-child > DIV > DIV > DIV > DIV > DIV > DIV > DIV > DIV:first-child > DIV > DIV:last-child > DIV:first-child
  {
    margin-top: 2em !important;
  }


}


@-moz-document domain("maps.google.com") {

}


/*
 * URL-PREFIXES
 */


@-moz-document url-prefix("http://www.google.com/reader/") {


/* Tweak domain styles that trash Reader.
 */

/* Google bar */
 #main
  {
    margin-top: 1.5em !important;
  }


/* Specifics.
 */

 /* This thing is horrible.
  * No, positioning does not work.
  */
 #search
  {
    margin-left: -480px !important;
    padding-left: 75% !important;
  }

}

@-moz-document url-prefix("http://www.google.com/ig/") {

 #wrapper > #backhome
  {
    margin: 2.5em 0 2em 1em !important;
    padding: 5px !important;
  }

}