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

.webauthn-pane {
  overflow: auto;
  min-width: 500px;
}

.webauthn-toolbar-container {
  display: flex;
  background-color: var(--sys-color-cdt-base-container);
  border-bottom: 1px solid var(--sys-color-divider);
  flex: 0 0 auto;
}

.webauthn-toolbar {
  display: inline-block;
}

.authenticators-view {
  margin: 0 10px;
  min-height: auto;
  display: none;
}

.webauthn-pane.enabled .authenticators-view {
  display: block;
}
/* New Authenticator Section */
.new-authenticator-title {
  line-height: 24px;
  font-weight: bold;
  display: block;
}

.new-authenticator-container {
  display: none;
  margin: 10px;
}

.webauthn-pane.enabled .new-authenticator-container {
  display: block;
}

.new-authenticator-form {
  border: none;
  padding: 10px 0;
  flex: 0 0 auto;
  margin: 0;
}

.webauthn-pane select {
  width: 120px;
}
/* Active Authenticator Section */
.authenticator-section {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--sys-color-divider);
}

.authenticator-fields {
  border: none;
  padding: 10px 0;
  flex: 0 0 auto;
  margin: 0;
}

.authenticator-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.authenticator-section-title {
  line-height: 24px;
  display: inline-block;
}

.authenticator-section-title .authenticator-name-field {
  display: inline-block;
  font-weight: bold;
  border: none;
  animation: save-flash 0.2s;
  text-overflow: ellipsis;
}

.authenticator-section-title.editing-name .authenticator-name-field {
  border-bottom: 1px solid var(--sys-color-neutral-outline);
  font-weight: normal;
  animation: none;
}

.authenticator-field-value {
  font-family: monospace;
}

.authenticator-option-checkbox {
  position: relative;
  top: 2px;
}

.authenticator-field,
.authenticator-option {
  display: flex;
  padding-bottom: 10px;
  align-items: center;
  margin: auto;

  &:has(dt-checkbox) {
    padding-bottom: 4px;
  }
}

.authenticator-option-label {
  text-align: right;
  width: 200px;
  padding-right: 10px;
}

td .text-button {
  min-width: 20px;
  margin: auto;
}

.active-button-container {
  display: inline-block;
  min-width: 28px;
}

.edit-name-toolbar {
  display: inline-block;
  vertical-align: middle;
}

@keyframes save-flash {
  from { opacity: 0%; }
  to { opacity: 100%; }
}
/* Credentials Table */

.data-grid-data-grid-node.centered {
  text-align: center;
}

.data-grid td {
  vertical-align: middle;
}

.credentials-title {
  display: block;
  font-weight: bold;
  margin: 8px 0;
}

.code {
  font-family: monospace;
}

.learn-more {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  text-align: center;
  overflow: hidden;
}

.webauthn-pane.enabled .learn-more {
  display: none;
}
