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

#change-home-page-section {
  -webkit-margin-start: 30px;
}

#home-page-url {
  display: inline-block;
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

#default-browser-state,
#profiles-supervised-dashboard-tip {
  margin-top: 6px;
}

#sync-overview p {
  display: inline;
}

#account-picture-wrapper {
  float: left;
  margin: 0 2px 10px 0;
}

html[dir=rtl] #account-picture-wrapper {
  float: right;
}

#account-picture-control {
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  display: inline-block;
  padding: 3px;
  position: relative;
}

#account-picture {
  height: 56px;
  object-fit: cover;
  vertical-align: middle;
  width: 56px;
}

#account-picture:disabled {
  cursor: default;
}

#change-picture-caption {
  background: rgba(0, 0, 0, 0.5);
  bottom: 0;
  color: white;
  cursor: pointer;
  font-size: small;
  margin: 3px 0;
  position: absolute;
  text-align: center;
  visibility: hidden;
  /* Width of #account-picture. */
  width: 56px;
}

#account-picture:not(:disabled):hover + #change-picture-caption,
#account-picture:not(:disabled) + #change-picture-caption:hover {
  visibility: visible;
}

#account-picture-indicator {
  -webkit-margin-end: 3px;
}

#sync-general {
  -webkit-margin-start: 76px;
  margin-bottom: 10px;
}

#sync-buttons {
  clear: both;
}

#profiles-list {
  margin-bottom: 10px;
  min-height: 0;
}

#profiles-list .profile-container {
  -webkit-box-align: center;
  display: -webkit-box;
  max-width: 100%;
}

#profiles-list .profile-name {
  -webkit-box-flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#profiles-list .profile-supervised {
  color: #999;
  margin-left: 5px;
}

#profiles-list > * {
  height: 40px;
}

#profiles-list:focus {
  border-color: rgb(77, 144, 254);
}

.profile-img {
  height: 31px;
  padding: 3px;
  vertical-align: middle;
  width: 38px;
}

.profile-item-current {
  font-weight: bold;
}

#profiles-buttons {
  white-space: nowrap;
}

.sync-error {
  background: rgb(255, 219, 219);
  border: 1px solid rgb(206, 76, 76);
  border-radius: 2px;
  padding: 10px;
}

.sync-error [is='action-link'] {
  margin: 0 1ex;
  padding: 0;
}

#mac-passwords-warning {
  margin-top: 10px;
}

input[type='range'] {
  vertical-align: middle;
}

.extension-controlled-warning-box {
  background-color: #fbfbfb;
  border: 1px solid #cecece;
  border-radius: 3px;
  padding: 19px;
}

.extension-controlled-warning {
  -webkit-padding-start: 35px;
  background-repeat: no-repeat;
  padding-bottom: 20px;
  padding-top: 3px;
}

.setting-extra-description {
  -webkit-margin-start: 1.8em;
  color: #999;
}

.hotword-settings {
  -webkit-margin-start: 22px;
}

.hotword-audio-history {
  -webkit-margin-start: 1.8em;
}

#audio-history {
  margin-top: 1.5em;
}

#hotword-retrain-link {
  text-decoration: none;
}

/* Internet settings */

#network-settings {
  position: relative;
}

#network-list {
  min-height: 0;
  width: 320px;
}

#download-location-label.disabled {
  color: #999;
}

.network-group {
  -webkit-box-orient: horizontal;
  height: 42px;
  overflow: visible;
}

list:not([disabled]) > .network-group:hover,
list:not([disabled]) > .network-group[selected] {
  background-color: #f8f8f8 !important;
  background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.8),
                                            rgba(255, 255, 255, 0)) !important;
  box-shadow: inset 0 0 1px 1px #f0f0f0;
}

.network-group-labels {
  -webkit-box-flex: 1;
  -webkit-box-orient: vertical;
  display: -webkit-box;
  padding-top: 3px;
}

.network-icon {
  -webkit-margin-end: 8px;
  background-position: left top;
  background-size: 25px;
  height: 25px;
  line-height: normal;
  white-space: normal;
  width: 25px;
}

.network-icon cr-network-icon {
  height: 100%;
  width: 100%;
}

@-webkit-keyframes connecting-animation {
  0% {
    background-position: 0 25%;
  }
  12.5% {
    background-position: 0 50%;
  }
  25%  {
    background-position: 0 75%;
  }
  37.5%  {
    background-position: 0 100%;
  }
  50%  {
    background-position: 0 100%;
  }
  62.5%  {
    background-position: 0 75%;
  }
  75%  {
    background-position: 0 50%;
  }
  87.5%  {
    background-position: 0 25%;
  }
}

.network-add-connection {
  background-image: url(chrome://theme/IDR_NETWORK_ADD_CONNECTION);
  background-position: center center !important;
  background-repeat: no-repeat;
  background-size: 16px;
}

.network-options-button {
  -webkit-box-flex: 0;
  -webkit-transform: scale(0.6);
  background-image: none;
  background-position: center center;
  display: block;
  opacity: 0.5;
  vertical-align: middle;
  width: 19px;
}

.network-group > .controlled-setting-indicator,
.network-menu-item > .controlled-setting-indicator {
  -webkit-margin-end: 5px;
}

.network-options-button:hover {
  opacity: 1;
}

@-webkit-keyframes vpn-connecting-animation {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.2;
  }
}

.network-connecting {
  -webkit-animation: connecting-animation 1s step-end infinite;
}

.network-vpn.network-connecting {
  -webkit-animation: vpn-connecting-animation 500ms alternate infinite;
}

.network-title {
  font-weight: 600;
  line-height: 120%;
}

.network-subtitle {
  color: #333;
  display: inline-block;
  line-height: 100%;
  max-width: 260px;
  opacity: 0.4;
  overflow: hidden;
  padding-bottom: 3px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.network-selector {
  background: right center no-repeat;
  background-image: url(../../../../ui/webui/resources/images/select.png);
  padding-right: 20px;
}

.network-menu {
  background: #fff;
  box-shadow:
      0 0 0 1px rgba(0,0,0,0.1),
      0 5px 1px 1px rgba(0,0,0,0.1),
      0 5px 2px 1px rgba(0,0,0,0.1),
      0 5px 12px 1px rgba(0,0,0,0.5);
  display: block;
  position: absolute;
  width: 320px;
  z-index: 1;
}

.network-menu-item {
  -webkit-box-align: center;
  -webkit-box-orient: horizontal;
  display: -webkit-box;
  height: 32px;
  margin-left: 4px;
  margin-right: 4px;
}

.network-menu-item-label {
  -webkit-box-flex: 1;
  color: #555;
  display: block;
  overflow-x: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-network {
   color: black;
   font-weight: bold;
}

.network-disabled-control {
  color: #999;
}

/* Restrict the size of the networks menu, by limiting the number of
   visible networks. */
.network-menu-group {
    max-height: 192px;
    overflow-x: hidden;
    overflow-y: auto;
    text-overflow: ellipsis;
}

.network-menu-item:hover,
.network-menu-item[selected] {
  background-color: #eee;
}

.network-menu > hr {
  opacity: 0.4;
}

#shared-proxies {
  margin-top: 12px;
}

#web-content-section select,
.web-content-select-label {
  min-width: 145px;
}

.web-content-select-label > span:only-of-type {
  display: inline-block;
  min-width: 100px;
}

#timezone-value {
  display: inline-block;
  vertical-align: baseline;
}

.loading #timezone-value select {
  color: transparent;
  text-shadow: none;
}

#privacy-explanation {
  line-height: 1.8em;
}

#advanced-settings {
  height: 0;
  margin-top: 8px;
  overflow: hidden;
}

.sliding {
  -webkit-transition: height 200ms;
  overflow-y: hidden;
}

#keyboard-overlay .option-value > select {
  width: 100%;
}

#keyboard-overlay table,
#power-overlay table {
  /* Same as .settings-row {margin}. */
  -webkit-border-horizontal-spacing: 0;
  -webkit-border-vertical-spacing: 0.65em;
}

#stylus-settings-link,
#power-settings-link {
  /* Match the spacing of the touchpad/mouse slider. */
  line-height: 25px;
}

#accessibility-autoclick .controlled-setting-with-label {
  -webkit-box-align: baseline;
}

#accessibility-autoclick-dropdown,
#accessibility-autoclick-label {
  /* Same as .controlled-setting-with-label > input + span. */
  -webkit-margin-start: 0.6em;
}

#accessibility-screen-magnifier-center-focus-check {
  -webkit-margin-start: 0.4em;
}

div[guestmode=true] :-webkit-any(
<if expr="not chromeos">
    #searchBox,
</if>
    #appearance-section,
    #startup-section,
    #reset-profile-settings-section) {
  display: none;
}

div[supervisedMode=true] :-webkit-any(
    #profiles-enable-guest,
    #profiles-enable-add-person) {
  display: none;
}

footer {
  display: flex;
}

#about-button {
  -webkit-margin-end: 30px;
}

/* An input that has no function except to take up the same amount of space as
 * a checkbox. */
.spacer-checkbox {
  visibility: hidden;
}

#android-apps-settings {
  -webkit-margin-start: 30px;
}
