/*
  Password (own/someone else's) changing form. Most of this file was
  just pieced together from various places in the bits/ directory.
*/

:root {
  --tab-padding: 10px;
  --tab-radius: 3px;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  background: var(--page-background);
  color: var(--page-foreground);
  font-family: var(--font);
  padding: 0;
  margin: 0;
  height: 100%;
}

.passwordContainer {
  margin: 0 auto;
  padding: 10px;
  min-width: 600px;
  max-width: 800px;
}

.passwordTabs ul {
  display: flex;
  align-items: stretch;
  gap: 5px;
  list-style-type: none;
  margin: 0;
  padding: 0;
  border-bottom: 2px solid var(--tab-border);
}

.passwordTabs li {
  display: inline;
  width: 50%;
  text-align: center;
  border-radius: var(--tab-radius) var(--tab-radius) 0 0;
  cursor: default;
}

.passwordTabs li.current {
  background: var(--active-tab-background);
  color: var(--active-tab-foreground);
  padding: var(--tab-padding);
}

.passwordTabs a {
  display: block;
  text-decoration: none;
  cursor: default;
  padding: var(--tab-padding);
  color: var(--inactive-tab-foreground);
  border-radius: var(--tab-radius) var(--tab-radius) 0 0;
}

.passwordTabs a:hover {
  background: var(--inactive-tab-background-hover);
  color: var(--inactive-tab-foreground-hover);
}

div.content {
  padding: 10px 0;
}

.content p {
  font-size: 90%;
}

.content h1 {
  margin: 0;
  padding: 0;
  font-size: 150%;
}

.content h2 {
  margin: 20px 0;
  padding: 0;
  border-bottom: 1px solid var(--generic-border);
  font-size: 120%;
}

.content table {
  width: 100%;
  border-collapse: collapse;
}

.content table th,
.content table td {
  padding: 5px;
}

.content table th {
  text-align: right;
  width: 25%;
  font-weight: normal;
  font-size: 90%;
}

input[type="text"], .content input[type="password"] {
  font-size: 90%;
}

input[type="text"] { width: 100%; }

input[type="password"] { width: 50%; }

.buttonRow {
  text-align: center;
}

input[type="submit"] {
  width: 33%;
  padding: 5px;
  margin-top: 20px;
}

span.field_error {
  display: block;
  color: var(--field-error-foreground);
  font-size: 80%;
}

.passwordNotice {
  background: var(--password-notice-background);
  border-color: var(--password-notice-border);
  margin: 5px 0;
}

/*
.message_alert {
  background: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.message_notice {
  background: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.genericWarning {
  background: #fff3cd;
  border-color: #ffeeba;
  color: #856404;
}

.passwordNotice {
  border-color: #bee5eb;
  background: #d1ecf1;
  color: #0c5460;
  margin: 5px 0;
}
*/

/*
.message_alert {
  background: #ffecec;
  color: #000;
  padding: 10px;
  border: 1px solid #f5aca6;
}

.message_notice {
  background: #e9ffd9;
  color: #000;
  padding: 10px;
  border: 1px solid #a6ca8a;
}

.genericWarning {
  background: #fff8c4;
  color: #000;
  padding: 10px;
  border: 1px solid #f2c779;
}

.passwordNotice {
  border: 1px solid #8ed9f6;
  padding: 10px;
  background: #e3f7fc;
}
*/

footer {
  text-align: center;
  font-size: 75%;
  color: #888;
  min-width: 600px;
  max-width: 800px;
  margin: 20px auto;
  padding-top: 10px;
}

footer a {
  color: var(--link-foreground);
}

footer a:hover, footer a:active {
  color: var(--link-foreground-hover);
}

@media screen and (max-width: 800px) {
  .passwordContainer {
    width: 100%;
    padding: 10px;
    margin: 0;
    min-width: reset;
    max-width: reset;
  }

  .content table {
    padding: 0;
  }

  .content table tbody {
    display: block;
  }

  .content table tr {
    display: block;
    position: relative;
    padding: 5px 0;
  }

  .content table th {
    text-align: left;
    width: auto;
    padding: 5px 0;
  }

  .content table td {
    display: block;
    text-align: left;
    padding: 0;
  }

  .buttonRow input {
    width: 100%;
  }

  .content input[type="password"] { width: 100%; }
}
