/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#body {
  background-color: white;
}

/**
 * Debugger content
 */

#chrome-globals, #sources {
  width: 200px;
}

/**
 * Lists and headers
 */

.list-item {
  padding: 2px;
}

.list-item:not(.selected):not(.empty):hover {
  background: #cddae5;
}

.list-item.selected {
  background: Highlight;
  color: HighlightText;
}

.list-item.empty {
  color: GrayText;
  padding: 2px;
}

/**
 * Sources searching
 */

#globalsearch {
  background-color: white;
  min-height: 10px;
}

#globalsearch > vbox:not(:empty) {
  min-height: 10px;
  max-height: 150px;
}

.dbg-source-results:not(:last-child) {
  border-bottom: 1px dotted #aaa;
}

.dbg-results-header {
  -moz-padding-start: 6px;
}

.dbg-results-header .location {
  font-weight: 600;
}

.dbg-results-header .match-count {
  -moz-padding-start: 6px;
  color: GrayText;
}

.dbg-results-container .line-number {
  background: hsl(0,0%,89%);
  min-width: 40px;
  -moz-padding-end: 4px;
  -moz-border-end: 1px dotted #aaa;
  text-align: end;
  font: 8pt monospace;
  color: hsl(0,0%,55%);
}

.dbg-results-container .line-contents {
  -moz-padding-start: 4px;
  font: 8pt monospace;
}

.dbg-results-container .line-contents:hover {
  background: #cddae5;
}

.dbg-results-container .line-contents > .string {
  padding: 1px;
}

.dbg-results-container .line-contents > .string[match=true] {
  background: rgba(255, 255, 0, 0.65);
  padding: 0;
  border: 1px solid #aaa;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.25s ease-in-out;
}

.dbg-results-container .line-contents > .string[match=true][focused] {
  transition-duration: 0.1s;
  transform: scale(1.75, 1.75);
}

/**
 * Searchbox panel
 */

#searchbox-panel .description {
  margin: -6px 0 8px 0;
}

#searchbox-panel button.operator {
  min-width: 0;
  margin: 0;
  padding: 0;
  font: 9pt monospace;
}

#searchbox-panel label.operator {
  -moz-padding-start: 6px;
  padding-bottom: 1px;
}

/**
 * Filtered sources panel
 */

#filtered-sources-panel {
  padding: 4px;
}

.dbg-source-item {
  background: #f4f4f4;
  border: 1px solid #ddd;
  border-top-color: #fff;
}

.dbg-source-item.selected {
  background: #cddae5;
}

.dbg-source-item:first-of-type {
  border-top-color: #ddd;
  border-radius: 4px 4px 0 0;
}

.dbg-source-item:last-of-type {
  border-radius: 0 0 4px 4px;
}

.dbg-source-item:only-of-type {
  border-radius: 4px 4px 4px 4px;
}

.dbg-source-item:not(:hover) {
  text-shadow: 0 1px #fff;
}

.dbg-source-item-name {
  color: #333;
  font-weight: 600;
}

.dbg-source-item-details {
  color: #888;
}

/**
 * Stack frames and breakpoints pane
 */

#stackframes\+breakpoints {
  min-width: 50px;
}

#stackframes\+breakpoints[animated] {
  transition: margin 0.25s ease-in-out;
}

/**
 * Variables and watch expressions pane
 */

#variables\+expressions {
  min-width: 50px;
}

#variables\+expressions[animated] {
  transition: margin 0.25s ease-in-out;
}

/**
 * Stack frames view
 */

#stackframes {
  min-height: 10px;
}

.dbg-stackframe {
  -moz-padding-start: 4px;
  -moz-padding-end: 4px;
}

.dbg-stackframe-name {
  font-weight: 600;
}

.dbg-stackframe-details {
  -moz-padding-start: 4px;
}

/**
 * Breakpoints view
 */

#breakpoints {
  min-height: 10px;
}

#breakpoints > vbox:not(:empty) {
  min-height: 10px;
  max-height: 200px;
}

.dbg-breakpoint:not(:last-child) {
  border-bottom: 1px solid #eee;
}

.dbg-breakpoint-info {
  font-weight: 600;
}

.dbg-breakpoint-text {
  font: 8pt monospace;
}

#conditional-breakpoint-panel .description {
  margin: -6px 0 8px 0;
}

#conditional-breakpoint-panel textbox {
  margin: 0 0 -2px 0;
}

/**
 * Watch expressions view
 */

#expressions {
  min-height: 10px;
  max-height: 125px;
}

.dbg-expression {
  height: 20px;
  -moz-padding-start: 8px;
}

.dbg-expression-arrow {
  width: 10px;
  height: auto;
  background: url("chrome://browser/skin/devtools/commandline.png") 0px 4px no-repeat;
}

.dbg-expression-input {
  font: 9pt monospace;
}

.dbg-expression-delete {
  opacity: 0;
}

.dbg-expression-delete:hover {
  opacity: 1;
}

.dbg-expression:hover > .dbg-expression-delete:not(:hover) {
  opacity: 0.5;
  transition: opacity 0.2s ease-in-out;
}

/**
 * Variables view
 */

#variables {
  min-height: 10px;
}

.dbg-variable-delete {
  opacity: 0;
}

.dbg-variable-delete:hover {
  opacity: 1;
}

.variable-or-property:hover > .title > .dbg-variable-delete:not(:hover),
.variable-or-property:focus > .title > .dbg-variable-delete:not(:hover) {
  opacity: 0.5;
  transition: opacity 0.2s ease-in-out;
}

.dbg-variable-edit {
  background: url("chrome://browser/skin/tabview/edit-light.png") center no-repeat;
  width: 20px;
  height: 16px;
  cursor: pointer;
}

.dbg-variable-throbber {
  background: url("chrome://global/skin/icons/loading_16.png") center no-repeat;
  width: 16px;
  height: 16px;
}

/**
 * Scope element
 */

.scope:focus > .title {
  background: Highlight;
  color: HighlightText;
}

.scope > .title {
  text-shadow: 0 1px #222;
  color: #fff;
}

.scope > .details {
  -moz-margin-start: 2px;
  -moz-margin-end: 1px;
}

.scope > .details.nonenum:not(:empty) {
  border-top: 1px solid #ddd;
}

/**
 * Variable element
 */

.variable {
  -moz-margin-start: 1px;
  -moz-margin-end: 1px;
  border-bottom: 1px solid #eee;
  transition: background 1s ease-in-out;
}

.variable[changed] {
  background: rgba(255, 255, 0, 0.65);
  transition-duration: 0.4s;
}

.variable:focus > .title {
  background: Highlight;
  color: HighlightText;
  border-radius: 4px;
}

.variable > .title > .name {
  font-weight: 600;
}

.variable:not(:focus) > .title > .name {
  color: #048;
}

.variable > .title > .value {
  -moz-padding-start: 6px;
  -moz-padding-end: 4px;
}

.variable[editable] > .title > .value {
  cursor: text;
}

.variable:not([non-header]) > .details {
  -moz-margin-start: 10px;
}

/**
 * Property element
 */

.property {
  transition: background 1s ease-in-out;
}

.property[changed] {
  background: rgba(255, 255, 0, 0.65);
  transition-duration: 0.4s;
}

.property:focus > .title {
  background: Highlight;
  color: HighlightText;
  border-radius: 4px;
}

.property:not(:focus) > .title > .name {
  color: #881090;
}

.property > .title > .value {
  -moz-padding-start: 6px;
  -moz-padding-end: 4px;
}

.property[editable] > .title > .value {
  cursor: text;
}

.property:not([non-header]) > .details {
  -moz-margin-start: 10px;
}

/**
 * Non enumerable, configurable and writable variables and properties
 */

.variable[proto] > .title > .name,
.property[proto] > .title > .name,
.variable[non-enumerable]:not([self]):not([exception]) > .title > .name,
.property[non-enumerable]:not([self]):not([exception]) > .title > .name {
  opacity: 0.5;
}

.variable[non-configurable] > .title > .name,
.property[non-configurable] > .title > .name {
  border-bottom: 1px dashed #99f;
}

.variable[non-configurable][non-writable] > .title > .name,
.property[non-configurable][non-writable] > .title > .name {
  border-bottom: 1px dashed #f99;
}

.variable[non-writable] > .title:after,
.property[non-writable] > .title:after {
  content: " ";
  display: inline-block;
  width: 16px;
  height: 16px;
  background: url("chrome://browser/skin/identity-icons-https.png") no-repeat;
  opacity: 0.5;
}

@media (min-resolution: 2dppx) {
  .variable[non-writable] > .title:after,
  .property[non-writable] > .title:after {
    background-image: url("chrome://browser/skin/identity-icons-https@2x.png");
    background-size: 32px;
  }
}

.variable[exception]:not(:focus) > .title > .name,
.property[exception]:not(:focus) > .title > .name {
  color: #a00;
  text-shadow: 0 0 8px #fcc;
}

.variable > tooltip > label,
.property > tooltip > label {
  margin: 0 2px 0 2px;
}

.variable[non-enumerable] > tooltip > label[value="enumerable"],
.property[non-enumerable] > tooltip > label[value="enumerable"],
.variable[non-configurable] > tooltip > label[value="configurable"],
.property[non-configurable] > tooltip > label[value="configurable"],
.variable[non-writable] > tooltip > label[value="writable"],
.property[non-writable] > tooltip > label[value="writable"] {
  text-decoration: line-through;
}

/**
 * Variables and properties editing
 */

.element-value-input {
  -moz-margin-start: 4px !important;
}

.element-name-input {
  -moz-margin-start: -2px !important;
  color: #048;
  font-weight: 600;
}

.element-value-input,
.element-name-input {
  max-width: 30em;
  border: 1px solid #999 !important;
  box-shadow: 1px 2px 4px #aaa;
}

/**
 * Variables and properties searching
 */

.variables-searchinput.devtools-searchinput {
  min-height: 24px;
}

.variable[non-match],
.property[non-match] {
  border: none;
  margin: 0;
}

/**
 * Token value colors
 */

.variable-or-property:not(:focus) > .title > .token-undefined {
  color: #bbb;
}

.variable-or-property:not(:focus) > .title > .token-null {
  color: #999;
}

.variable-or-property:not(:focus) > .title > .token-boolean {
  color: #777;
}

.variable-or-property:not(:focus) > .title > .token-number {
  color: #c40a16;
}

.variable-or-property:not(:focus) > .title > .token-string {
  max-width: 30em;
  color: #1c00cf;
}

.variable-or-property:not(:focus) > .title > .token-other {
  color: #333;
}

/**
 * Expand/collapse arrow
 */

.arrow {
  -moz-appearance: treetwisty;
  -moz-margin-start: 10px;
  -moz-margin-end: 5px;
}

.arrow[open] {
  -moz-appearance: treetwistyopen;
}

.arrow[invisible] {
  visibility: hidden;
}

/**
 * Toolbar Controls
 */

#toggle-panes {
  background: none;
  box-shadow: none;
  border: none;
  list-style-image: url("chrome://browser/skin/devtools/debugger-expand.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px);
}

#toggle-panes:not([panesHidden]) {
  list-style-image: url("chrome://browser/skin/devtools/debugger-collapse.png");
}

#toggle-panes:active {
  -moz-image-region: rect(0px, 32px, 16px, 16px);
}

#resume {
  list-style-image: url("chrome://browser/skin/devtools/debugger-play.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px);
}

#resume[checked=true] {
  -moz-image-region: rect(0px, 32px, 16px, 16px);
}

#step-over {
  list-style-image: url("chrome://browser/skin/devtools/debugger-step-over.png");
}

#step-in {
  list-style-image: url("chrome://browser/skin/devtools/debugger-step-in.png");
}

#step-out {
  list-style-image: url("chrome://browser/skin/devtools/debugger-step-out.png");
}

#debugger-controls > toolbarbutton {
  border-width: 0;
  -moz-border-end-width: 1px;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  outline-offset: -3px;
}

#debugger-controls > toolbarbutton:last-of-type {
  -moz-border-end-width: 0;
}

#debugger-controls {
  border: 1px solid hsla(210,8%,5%,.45);
  border-radius: 3px;
  box-shadow: 0 1px 0 hsla(210,16%,76%,.15) inset, 0 0 0 1px hsla(210,16%,76%,.15) inset, 0 1px 0 hsla(210,16%,76%,.15);
  margin: 0 3px;
}
