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

:root {
  --logins-dialog-shadow: var(--popup-box-shadow);
  --logins-dialog-border: 1px solid var(--card-border-color);
  --logins-dialog-border-radius: var(--border-radius-medium);
}

html {
  position: fixed;
}
html,
body {
  height: 100%;
  width: 100%;
}

body {
  --sidebar-width: 320px;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: auto 1fr;
}

@media (max-width: 830px) {
  body {
    --sidebar-width: 270px;
  }
}

header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background-color: var(--background-color-canvas);
  padding-block: 9px;
  padding-inline-start: 16px;
  padding-inline-end: 23px;
}

login-filter {
  min-width: 200px;
  max-width: 400px;
  margin-inline: 40px auto;
  flex-grow: 0.5;
  align-self: center;
}

fxaccounts-button,
menu-button {
  margin-inline-start: 18px;
}

login-list {
  grid-row: 1/4;
}

:root:not(.initialized) login-intro,
:root:not(.initialized) login-item,
:root.empty-search login-intro,
:root:not(.no-logins, .empty-search, .login-selected) login-intro,
login-item[data-editing="true"] + login-intro,
.login-selected login-intro,
:root:not(.login-selected) login-item:not([data-editing="true"]),
.no-logins login-item:not([data-editing="true"]) {
  display: none;
}

/* Do not promote Mozilla Sync. */
login-intro {
  display: none !important;
}

.heading-wrapper {
  display: flex;
  justify-content: center;
  width: var(--sidebar-width);
  font-weight: var(--font-weight-heading);
}

:root:not(.primary-password-auth-required) #primary-password-required-overlay {
  display: none;
}

.primary-password-auth-required > body > header,
.primary-password-auth-required > body > login-list,
.primary-password-auth-required > body > section {
  filter: blur(2px);
}

#primary-password-required-overlay {
  z-index: 1;
  position: fixed;
  width: 100vw;
  height: 100vh;
  background-color: var(--background-color-overlay);
}

body > section {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow-y: hidden;
  overflow-x: auto;
}

login-intro {
  overflow-y: scroll;
}
