/* Copyright (c) 2012 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. */

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  color: rgb(48, 57, 66);
  display: flex;
  flex-direction: column;
  font-size: 13px;
  height: 100%;
  margin: 0;
  overflow: auto;
}

.hidden {
  display: none !important;
}

img {
  flex-shrink: 0;
  height: 16px;
  padding-left: 2px;
  padding-right: 5px;
  vertical-align: top;
  width: 23px;
}

#container {
  display: flex;
  height: 100%
}

#infobar {
  background: rgb(255, 212, 0);
  display: none;
  padding: 4px 0;
  text-align: center;
}

#infobar.show {
  display: block;
}

#navigation {
  flex-shrink: 0;
  padding-top: 20px;
  width: 150px;
}

#content {
  flex-grow: 1;
}

#caption {
  color: rgb(92, 97, 102);
  font-size: 150%;
  padding-bottom: 10px;
  padding-left: 20px;
}

#serviceworker-internals {
  visibility: hidden;
}

.tab-header {
  -webkit-border-start: 6px solid transparent;
  padding-left: 15px;
}

.tab-header.selected {
  -webkit-border-start-color: rgb(78, 87, 100);
}

.tab-header > button {
  background-color: white;
  border: 0;
  cursor: pointer;
  font: inherit;
  line-height: 17px;
  margin: 6px 0;
  padding: 0 2px;
}

.tab-header:not(.selected) > button {
  color: #999;
}

#content > div {
  min-width: 32em;
  padding: 0 20px 65px 0;
}
#content > div:not(.selected) {
  display: none;
}

.content-header {
  background: linear-gradient(white, white 40%, rgba(255, 255, 255, 0.92));
  border-bottom: 1px solid #eee;
  font-size: 150%;
  padding: 20px 0 10px 0;
  z-index: 1;
}

#devices-help {
  margin-top: 10px;
}

.device-header {
  -webkit-box-align: baseline;
  -webkit-box-orient: horizontal;
  display: -webkit-box;
  margin: 10px 0 0;
  padding: 2px 0;
}

.device-name {
  font-size: 150%;
}

.device-serial {
  color: #999;
  font-size: 80%;
  margin-left: 6px;
}

.device-ports {
  -webkit-box-orient: horizontal;
  display: -webkit-box;
  margin-left: 8px;
}

.port-icon {
  background-color: rgb(64, 192, 64);
  border: 0 solid transparent;
  border-radius: 6px;
  height: 12px;
  margin: 2px;
  width: 12px;
}

.port-icon.error {
  background-color: rgb(224, 32, 32);
}

.port-icon.transient {
  background-color: orange;
  transform: scale(1.2);
}

.port-number {
  height: 16px;
  margin-right: 5px;
}

.browser-header {
  align-items: center;
  display: flex;
  flex-flow: row wrap;
  min-height: 33px;
  padding-top: 10px;
}

.browser-header > .browser-name {
  font-size: 110%;
  font-weight: bold;
}

.browser-header > .browser-user {
  color: #999;
  margin-left: 6px;
}

.browser-fallback-note {
  display: flex;
  flex-flow: row wrap;
  margin-left: 4px;
  margin-top: 5px;
  min-height: 15px;
}

.used-for-port-forwarding {
  background-image: url(../../../../ui/webui/resources/images/info.svg);
  height: 15px;
  margin-left: 20px;
  width: 15px;
}

.row {
  padding: 6px 0;
  position: relative;
}

.properties-box {
  display: flex;
}

.subrow-box {
  display: inline-block;
  vertical-align: top;
}

.subrow {
  display: flex;
  flex-flow: row wrap;
}

.subrow > div {
  margin-right: 0.5em;
}

.webview-thumbnail {
  display: inline-block;
  flex-shrink: 0;
  margin-right: 5px;
  overflow: hidden;
  position: relative;
  vertical-align: top;
}

.screen-rect {
  background-color: #eee;
  position: absolute;
}

.view-rect {
  background-color: #ccc;
  min-height: 1px;
  min-width: 1px;
  position: absolute;
}

.view-rect.hidden {
  background-color: #ddd;
}

.guest {
  padding-left: 20px;
}

.invisible-view {
  color: rgb(151, 156, 160);
}

.url {
  color: #999;
}

.list {
  margin-top: 5px;
}

.action {
  color: rgb(17, 85, 204);
  cursor: pointer;
  margin-right: 15px;
}

.action:hover {
  text-decoration: underline;
}

.browser-header .action {
  margin-left: 10px;
}

.list:not(.pages) .subrow {
  min-height: 19px;
}

.action.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.open > input {
  border: 1px solid #aaa;
  height: 17px;
  line-height: 17px;
  margin-left: 20px;
  padding: 0 2px;
}

.open > input:focus {
  border-color: rgb(77, 144, 254);
  outline: none;
  transition: border-color 200ms;
}

.open > button {
  line-height: 13px;
}

#device-settings {
  border-bottom: 1px solid #eee;
  padding: 5px 0;
}

.settings-bar {
  padding: 5px 0 5px 0;
}

.settings-bar label {
  display: inline-block;
  width: 35ex;
}

.node-frontend-action {
  margin: 6px 4px;
}

dialog.config::backdrop {
  background-color: rgba(255, 255, 255, 0.75);
}

dialog.config {
  background: white;
  border: 0;
  border-radius: 3px;
  box-shadow: 0 4px 23px 5px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0,0,0,0.15);
  color: #333;
  padding: 17px 17px 12px;
  position: relative;
}

#port-forwarding-enable {
  vertical-align: middle;
}

.close-button {
  background-image: url(chrome://theme/IDR_CLOSE_DIALOG);
  height: 14px;
  width: 14px;
}

.close-button:active {
  background-image: url(chrome://theme/IDR_CLOSE_DIALOG_P);
}

.close-button:hover {
  background-image: url(chrome://theme/IDR_CLOSE_DIALOG_H);
}

dialog.config > .close-button {
  position: absolute;
  right: 7px;
  top: 7px;
}

dialog.config > .title {
  font-size: 130%;
}

dialog.config > .list {
  border: 1px solid #eee;
  height: 180px;
  margin-bottom: 10px;
  margin-top: 10px;
  overflow-x: hidden;
}

.config-list-row {
  -webkit-flex-direction: row;
  display: -webkit-flex;
}

.config-list-row:hover {
  background-color: #eee;
}

.config-list-row.selected,
.config-list-row.selected:hover {
  background-color: #ccc;
}

.config-list-row input {
  border: 1px solid transparent;
  line-height: 20px;
  margin: 4px;
  min-width: 0;
  padding: 0 3px;
}

.config-list-row.fresh:not(.selected) input {
  border-color: #eee;
}

.config-list-row input.port {
  width: 4em;
}

.config-list-row input.location {
  -webkit-flex: 1;
  width: 100%;
}

.config-list-row:not(.empty) input.invalid {
  background-color: rgb(255, 200, 200);
}

.config-list-row .close-button {
  margin: 8px 8px;
}

.config-list-row.fresh .close-button,
.config-list-row:not(.selected):not(:hover) .close-button:not(:hover) {
  background-image: none;
  pointer-events: none;
}

.config-list-row:not(.selected) .close-button:not(:hover) {
  opacity: 0.5;
}

dialog.config > .message {
  margin-bottom: 12px;
  width: 20em;
}

.config-buttons {
  align-items: center;
  display: flex;
}

dialog.port-forwarding .target-discovery {
  display: none;
}

dialog.target-discovery .port-forwarding {
  display: none;
}

.config-buttons > label {
  flex-grow: 1
}
