/*
 * signin.css
 *
 * Copyright (C) 2022 by Posit Software, PBC
 *
 * This program is licensed to you under the terms of version 3 of the
 * GNU Affero General Public License. This program is distributed WITHOUT
 * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
 * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
 *
 */

body, td {
   font-size: 12px;
}

@media (prefers-color-scheme: dark) {
  body {
    color: #fff;
  }
}

#border {
   margin: 0 auto;
   width: 282px;
}

.caption {
  text-align: center;
  font-size: 18px;
  margin-right: 0;
  width: 100%;
  font-weight: normal;
}

input[type=text], input[type=password] {
  width: 262px;
  border: 1px solid #cdcecf;
  font-size: 14px;
  padding: 8px;
  margin-top: 1px;
}

@media (prefers-color-scheme: dark) {
  input[type=text], input[type=password] {
    border: 1px solid #4d4e4f;
    background-color: #000;
    color: #fff;
  }
}

.buttonpanel {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

#errorpanel {
  text-align: center;
  padding: 0 25% 0 25%;
  color: #e60000;
  font-weight: bold;
}

@media (prefers-color-scheme: dark) {
  #errorpanel {
    color: #ff7070;
  }
}

button.fancy {
  background-color: var(--d-primary);
  font-size: 14px;
  padding: 10px 15px;
  cursor: pointer;
  outline: none;
  border: 1px solid var(--primary);
  color: var(--primary-fg);
  min-width: 200px;
}

button.disabled {
  background-color: #e0e2e5;
  color: grey;
}

div.signinhidden {
   display: none;
}

#staySignedIn {
  vertical-align: middle;
}

#staySignedInLabel {
  vertical-align: middle;
}

.signin-spinner-holder {
  width: 300px;
  text-align: center;
  margin: 0 auto;
  padding-top: 10px;
}

/**
* Modified from https://loading.io/css/.
* Released under the CC0 License.
*/

.signin-spinner {
  display: inline-block;
  position: relative;
  width: 20px;
  height: 20px;
  text-align: center;
} 

.signin-spinner div {
  transform-origin: 10px 10px;
  animation: signin-spinner 1.2s linear infinite;
}

.signin-spinner div:after {
  content: " ";
  display: inline;
  position: absolute;
  top: 0px;
  left: 9px;
  width: 2px;
  height: 5px;
  background-color: var(--fg-col);
}

.signin-spinner div:nth-child(1) {
  transform: rotate(0deg);
  animation-delay: -1.1s;
}
.signin-spinner div:nth-child(2) {
  transform: rotate(30deg);
  animation-delay: -1s;
}
.signin-spinner div:nth-child(3) {
  transform: rotate(60deg);
  animation-delay: -0.9s;
}
.signin-spinner div:nth-child(4) {
  transform: rotate(90deg);
  animation-delay: -0.8s;
}
.signin-spinner div:nth-child(5) {
  transform: rotate(120deg);
  animation-delay: -0.7s;
}
.signin-spinner div:nth-child(6) {
  transform: rotate(150deg);
  animation-delay: -0.6s;
}
.signin-spinner div:nth-child(7) {
  transform: rotate(180deg);
  animation-delay: -0.5s;
}
.signin-spinner div:nth-child(8) {
  transform: rotate(210deg);
  animation-delay: -0.4s;
}
.signin-spinner div:nth-child(9) {
  transform: rotate(240deg);
  animation-delay: -0.3s;
}
.signin-spinner div:nth-child(10) {
  transform: rotate(270deg);
  animation-delay: -0.2s;
}
.signin-spinner div:nth-child(11) {
  transform: rotate(300deg);
  animation-delay: -0.1s;
}
.signin-spinner div:nth-child(12) {
  transform: rotate(330deg);
  animation-delay: 0s;
}
@keyframes signin-spinner {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.signin-hidden {
  display: none;
}

:focus {
  outline: none;
  box-shadow: none;
}

:focus-visible {
  outline-offset: 0;
  outline: 2px solid var(--primary) !important;
  box-shadow: inset 0 0 0 2px var(--primary-fg);
}