/*
Copyright (c) 2010 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
*/
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  cursor: default;
}

list {
  display: block;
  overflow-x: hidden;
  overflow-y: visible; /* let the container do the scrolling */
}

list > * {
  text-decoration: none;
  padding: 5px;
}

list > * > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  color: black;
  width: 100%;
  -webkit-box-sizing: border-box;
  background: 0 50% no-repeat;
  -webkit-padding-start: 20px;
}

list > * > * > span {
  -webkit-transition: all .15s;
  text-decoration: none;
  color: #000;
  cursor: pointer;
  opacity: .4;
}

list > * > :first-child {
  font-weight: bold;
  font-size: 110%;
}

list > * > :last-child {
  overflow: hidden;
}

list > * > * > .folder {
  background-image: url("../images/folder_closed.png");
  background-repeat: no-repeat;
  background-position: 0% 50%;
  display: inline-block;
  -webkit-padding-start: 18px;
}

html[dir=rtl] list > * > * > .folder {
  background-image: url("../images/folder_closed_rtl.png");
  background-position: 100% 50%;
}

html[os=mac] list > * > * > .folder {
  background-image: url("../images/bookmark_bar_folder_mac.png");
}

list > * > * > :hover {
  text-decoration: underline;
  color: blue;
  opacity: 1;
}

list > * > * > :active {
  color: -webkit-activelink;
}

html[dir=rtl] list .label {
  background-position: 100% 50%;
}

list > .folder > .label {
  background-image: url("../images/folder_closed.png");
}

/* We need to ensure that even empty labels take up space */
list > * > .label:empty:after,
list > * > .url:empty:after {
  content: " ";
  white-space: pre;
}

list > .folder > .url:empty:after {
  content: "";
}

/*
/* Edit mode
*/

list .label input,
list .url input {
  /* Do not inherit the line-height */
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: black;
  background: white;
  border: 1px solid black;
  margin: -2px -8px -2px -3px;
  padding: 1px 7px 1px 1px;
  outline: none;
  text-decoration: none;
}

html[dir=rtl] list .label input,
html[dir=rtl] list .url input {
  margin: -2px -3px -2px -8px;
  padding: 1px 1px 1px 7px;
}

list [editing] .label,
list [editing] .url,
list [editing] > * {
  overflow: visible;
  opacity: 1;
}

list [editing] .url {
  text-decoration: none;
  color: inherit;
}

list .url form {
  display: inline;
}

list .url > form > input {
  -webkit-transition: color .15s, background-color .15s;
}

list .url > form > :invalid {
  background: #fdd;
  color: black;
}

/* end editing */

html[dir=rtl] list > .folder > .label {
  background-image: url("../images/folder_closed_rtl.png");
}

html[os=mac] list > .folder > .label {
  background-image: url("../images/bookmark_bar_folder_mac.png");
}

html[os=mac] .tree-label {
  background-image: url("../images/bookmark_bar_folder_mac.png");
}

html[os=mac] .tree-row[selected] > .tree-label {
  background-image: url("../images/bookmark_bar_folder_mac.png");
}

.main {
  position: absolute;
  top: 85px;
  left: 0;
  right: 0;
  bottom: 0;
}

#tree-container {
  position: absolute;
  left: 5px;
  width: 200px;
  top: 0;
  bottom: 0;
  overflow: auto;
  -webkit-box-sizing: border-box;
  padding: 0px 5px 5px 5px;
}

#tree {
  min-width: 100%;
  overflow: visible; /* let the container do the scrolling */
  display: inline-block;
}

#list {
  position: absolute;
  left: 205px;
  right: 0;
  top: 0;
  bottom: 0;
  -webkit-box-sizing: border-box;
  padding: 0 5px 5px 5px;
}

.logo {
  -webkit-appearance: none;
  border: 0;
  background: 50% 50% no-repeat url("../images/bookmarks_section.png");
  width: 67px;
  height: 67px;
  cursor: pointer;
  margin: 10px;
  float: left;
}

html[dir=rtl] #tree-container {
  left: auto;
  right: 0;
}

html[dir=rtl] #list {
  left: 0;
  right: 200px;
}

.header > div {
  float: left;
  margin: 32px 2px;
  margin-bottom: 0;
}

.header form {
  margin: 0;
}

html[dir=rtl] .logo,
html[dir=rtl] .header > div,
html[dir=rtl] .header form {
  float: right;
}

#drop-overlay {
  position: absolute;
  display: none;
  pointer-events: none;
  border: 1px solid hsl(214, 91%, 85%);;
  -webkit-border-radius: 3px;
  -webkit-box-sizing: border-box;
  background-color: hsla(214, 91%, 85%, .5);
  overflow: hidden;
  z-index: -1;
}

#drop-overlay.line {
  border: 3px solid black;
  border-top-color: transparent;
  border-bottom-color: transparent;
  background-color: black;
  background-clip: padding-box;
  height: 8px;
  -webkit-border-radius: 0;
  z-index: 10;
}

.toolbar button {
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  font: inherit;
  padding: 0;
  background: -webkit-canvas(drop-down-arrow) 100% 50% no-repeat;
  padding-right: 11px;
}

html[dir=rtl] .toolbar button {
  background-position: 0% 50%;
  padding-right: 0;
  padding-left: 11px;
}
