/* 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. */

html {
  height: 100%;
  overflow: hidden;
}

body {
  display: -webkit-box;
  height: 100%;
  margin: 0;
}

/* Header */

header {
  -webkit-padding-end: 19px;
  -webkit-padding-start: 20px;
  background-color: #F6F6F6;
  border-bottom: 1px solid #d2d2d2;
}

#print-preview #navbar-container {
  -webkit-border-end: 1px solid #c8c8c8;
  -webkit-box-orient: vertical;
  background-color: white;
  display: -webkit-box;
  position: relative;
  user-select: none;
  width: 310px;
  z-index: 2;
}

#navbar-content-title {
  color: black;
  font-size: 1.25em;
  font-weight: normal;
  margin: 0;
  padding-bottom: 6px;
  padding-top: 16px;
}

#navbar-scroll-container {
  -webkit-box-flex: 1;
  background: #fbfbfb;
  border-top: 1px solid #f3f3f3;
  overflow-y: auto;
  padding-top: 2px;
}

/* Settings */

.two-column {
  display: table-row;
}

.right-column {
  -webkit-padding-end: 20px;
  display: table-cell;
  width: 99%;
}

.right-column .radio input[type='radio'],
.right-column label input[type='checkbox'] {
  --min-size: 13.19px;
  --size: 1.1em;
  height: var(--size);
  min-height: var(--min-size);
  min-width: var(--min-size);
  width: var(--size);
}

.left-column {
  -webkit-padding-end: 20px;
  -webkit-padding-start: 20px;
  display: table-cell;
  min-width: 70px;
  vertical-align: middle;
}

.left-column h1 {
  color: #646464;
  font-size: 1em;
  margin-bottom: 0;
  margin-top: 0;
}

.two-column.visible .left-column,
.two-column.visible .right-column {
  padding-bottom: 5px;
  padding-top: 5px;
}

.two-column.visible .left-column.multirow {
  padding-top: 13px;
  vertical-align: top;
}

.two-column:not(.visible) .left-column,
.two-column:not(.visible) .right-column {
  padding-bottom: 0;
  padding-top: 0;
  transition: padding-bottom 150ms, padding-top 150ms;
}

.two-column:not(.visible) select {
  border-top-width: 0;
  margin-top: 0;
  padding-top: 0;
}

p {
  -webkit-line-box-contain: block;
  margin: 0;
  margin-bottom: 10px;
}

h1 {
  color: #808080;
  font-weight: 300;
}

#print-preview .navbar-link {
  margin: 8px 20px;
}

button.loading {
  cursor: progress;
}

#print-preview button.default {
  font-kerning: none;
  font-weight: bold;
}

#print-preview button.default:not(:focus):not(:disabled) {
  border-color: #808080;
}

span.hint {
  background: white;
  display: block;
  font-size: 0.9em;
  font-weight: bold;
  height: 0;
  margin: 0;
  overflow: hidden;
  transition: color 200ms;
}

span.hint.visible {
  animation-duration: 200ms;
  animation-fill-mode: forwards;
  color: rgb(140, 20, 20);
  height: auto;
  margin-bottom: -5px;
  margin-top: 5px;
  padding-bottom: 5px;
  user-select: text;
}

span.hint.closing {
  background: transparent;
  height: 0 !important;
  margin: 0;
  opacity: 0;
  transition: margin 150ms, height 150ms, opacity 150ms;
}

.collapsible {
  height: 0;
  position: relative;
}

.collapsible.visible {
  animation-duration: 200ms;
  animation-fill-mode: forwards;
  height: auto;
}

.collapsible.closing {
  height: 0 !important;
  opacity: 0;
  overflow: hidden;
  transition: margin 150ms, height 150ms, opacity 150ms;
}

.collapsible.closing > * {
  position: absolute;
}

select {
  width: 100%;
}

label {
  user-select: none;
}

.hidden-section {
  background: white;
  position: relative;
}

.extra {
  background: white;
  height: 0;
  opacity: 0;
  padding-top: 0;
  position: absolute;
  visibility: hidden;
}

.visible .extra {
  animation-duration: 200ms;
  animation-fill-mode: forwards;
  height: auto;
  opacity: 1;
  overflow: hidden;
  padding-bottom: 0;
  position: static;
  visibility: visible;
}

.closing .extra {
  height: 0 !important;
  opacity: 0;
  overflow: hidden;
  padding-top: 0;
  position: static;
  transition: padding-top 100ms, height 100ms, opacity 200ms, background 300ms;
  visibility: visible;
}

/* Individual settings sections  */

/* TODO(estade): this should be in a shared location but I'm afraid of the
 * damage it could do. */
[hidden] {
  display: none !important;
}

@keyframes dancing-dots-jump {
  0% { top: 0; }
  55% { top: 0; }
  60% { top: -10px; }
  80% { top: 3px; }
  90% { top: -2px; }
  95% { top: 1px; }
  100% { top: 0; }
}

span.jumping-dots > span {
  animation: dancing-dots-jump 1800ms infinite;
  padding: 1px;
  position: relative;
}

span.jumping-dots > span:nth-child(2) {
  animation-delay: 100ms;
}

span.jumping-dots > span:nth-child(3) {
  animation-delay: 300ms;
}

#print-header .button-strip {
  -webkit-box-orient: horizontal;
  -webkit-box-pack: end;
  display: -webkit-box;
}

#print-header .button-strip button {
  -webkit-margin-start: 9px;
  display: block;
}

#link-container {
  -webkit-box-orient: vertical;
  display: -webkit-box;
  margin: 7px 0;
}

#link-container > div {
  display: flex;
}

#link-container > div > .throbber {
  margin: 8px;
  min-height: 16px;
  min-width: 16px;
}

#main-container {
  -webkit-border-start: 1px solid #dcdcdc;
  -webkit-box-flex: 1;
  -webkit-box-orient: vertical;
  display: -webkit-box;
  height: 100%;
  position: relative;
}

html:not(.focus-outline-visible)
:enabled:focus:-webkit-any(input[type='checkbox'],
                           input[type='radio'],
                           button) {
  /* Cancel border-color for :focus specified in widgets.css. */
  border-color: rgba(0,0,0,0.25);
}

html:not(.focus-outline-visible) [is='action-link']:focus {
  outline: none;
}
