/* The /gateway company picker. A port of the Blazor Gateway's look (Styles/app.css and the Tailwind classes on
   Pages/Index.razor + Shared/MainLayout.razor), without Tailwind. Used only by gateway.njk. */

:root {
  --gw-primary: #005eae;
  --gw-slate-200: #e2e8f0;
  --gw-gray-200: #e5e7eb;
  --gw-gray-500: #6b7280;
  --gw-overlay: #0f172a5d;
  --gw-menu-text: #000000;
  --gw-menu-bg: #ffffff;
  --gw-menu-hover: #ececec;
  --gw-menu-separator: #ececec;
}

*,
::before,
::after {
  box-sizing: border-box;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  font-family: "Open Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

body.gw-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--gw-primary);
  background-image: url("/gateway/assets/topography.svg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  color: #000000;
}

button,
input {
  font: inherit;
  color: inherit;
  margin: 0;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

sup {
  font-size: 50%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
  top: -0.5em;
}

/* Page */

.gw-main {
  flex-grow: 1;
  display: grid;
  place-content: center;
  padding: 1.5rem 1rem 2rem;
  text-align: center;
}

.gw-form {
  display: grid;
  gap: 1rem;
  width: 100%;
}

.gw-brand {
  margin-bottom: 1rem;
}

.gw-logo {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  padding: 1rem 0 0.5rem;
}

@media (min-width: 640px) {
  .gw-logo { max-width: 350px; }
}

@media (min-width: 1280px) {
  .gw-logo { max-width: 450px; }
}

.gw-heading {
  margin: 0 0 0.5rem;
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 2rem;
  color: var(--gw-slate-200);
}

@media (min-width: 1024px) {
  .gw-heading {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
}

.gw-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  border-radius: 0.375rem;
  background-color: var(--gw-slate-200);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.gw-card__row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .gw-card__row { flex-direction: row; }
}

.gw-input {
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5rem;
  border: 1px solid var(--gw-gray-500);
  border-radius: 0.375rem;
  background-color: #ffffff;
}

.gw-input:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
}

@media (min-width: 768px) {
  .gw-input { min-width: 250px; }
}

@media (min-width: 1024px) {
  .gw-input { min-width: 300px; }
}

.gw-launch {
  width: auto;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  color: #ffffff;
  background-color: var(--gw-primary);
  transition: all 300ms ease-in-out;
}

.gw-launch:hover {
  color: #000000;
  background-color: var(--gw-gray-200);
}

.gw-launch:focus-visible,
.gw-lang__toggle:focus-visible,
.gw-lang__item:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

.gw-note {
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #ffffff;
}

.gw-note a,
.gw-note a:visited {
  color: #ffffff;
  text-decoration: underline;
  font-weight: 600;
}

.gw-note a:hover {
  color: #000000;
}

.gw-validation {
  display: flex;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  background-color: red;
  color: #ffffff;
  font-size: 14px;
}

/* Loading overlay */

.gw-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  background-color: var(--gw-overlay);
}

.gw-loader {
  direction: ltr;
  display: block;
  position: relative;
  left: 50%;
  top: 50%;
  width: 150px;
  height: 150px;
  margin: -75px 0 0 -75px;
  border: 4px solid transparent;
  border-top-color: var(--gw-primary);
  border-radius: 9999px;
  animation: gw-spin 2s linear infinite;
}

.gw-loader::before,
.gw-loader::after {
  content: "";
  position: absolute;
  border: 4px solid transparent;
  border-radius: 9999px;
}

.gw-loader::before {
  inset: 5px;
  border-top-color: #9ca3af;
  animation: gw-spin 3s linear infinite;
}

.gw-loader::after {
  inset: 15px;
  border-top-color: #ffffff;
  animation: gw-spin 1.5s linear infinite;
}

.gw-loader__text {
  display: block;
  position: relative;
  top: 50%;
  width: 100%;
  margin: 0;
  padding-top: 1rem;
  text-align: center;
  color: #ffffff;
}

@keyframes gw-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .gw-loader,
  .gw-loader::before,
  .gw-loader::after {
    animation-duration: 6s;
  }
}

/* Language switcher */

.gw-lang {
  position: relative;
  align-self: center;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

.gw-lang__toggle {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.25rem 1rem;
  border-radius: 0.375rem;
  background-color: transparent;
  color: var(--gw-menu-text);
  transition: all 300ms ease-in-out;
}

.gw-lang__toggle:hover,
.gw-lang__toggle--active {
  background-color: var(--gw-menu-bg);
}

.gw-lang__toggle img {
  margin-inline-start: 0.5rem;
}

.gw-lang__toggle span {
  padding-inline: 0.5rem;
}

.gw-lang__overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  width: 100%;
  height: 100vh;
  cursor: default;
  background-color: var(--gw-overlay);
  opacity: 0.3;
}

.gw-lang__menu {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  z-index: 50;
  min-width: 108px;
  border: 1px solid var(--gw-menu-bg);
  border-radius: 0.375rem;
  background-color: var(--gw-menu-bg);
  color: var(--gw-menu-text);
  box-shadow: 0 2px 5px -1px #4646464d, 0 0 1px 0 #4646464d;
  text-align: center;
}

.gw-lang__menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 400px;
  overflow-y: auto;
  border-radius: 0.375rem;
}

.gw-lang__menu li {
  border-bottom: 1px solid var(--gw-menu-separator);
}

.gw-lang__menu li:last-of-type {
  border-bottom: none;
}

.gw-lang__item {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 1rem;
  background-color: transparent;
  text-align: start;
  transition: all 300ms ease-in-out;
}

.gw-lang__item:hover {
  background-color: var(--gw-menu-hover);
}

.gw-lang__item--selected,
.gw-lang__item--selected:hover {
  color: #ffffff;
  background-color: var(--gw-primary);
}

.gw-lang__flag {
  width: 16px;
  min-width: 16px;
  height: 24px;
  align-self: center;
  user-select: none;
}

.gw-lang__label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.gw-lang__name {
  font-size: 16px;
  line-height: normal;
}

.gw-lang__description {
  white-space: nowrap;
  font-size: 0.75rem;
  line-height: normal;
}

/* Footer: the web app's sign-in footer (AccountLayoutFooter) */

.gw-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0 1rem 1rem;
  padding: 2rem;
  border-radius: 1rem;
  background-color: rgba(15, 39, 68, 0.4);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  text-align: center;
}

@media (min-width: 1280px) {
  .gw-footer {
    flex-direction: row;
    text-align: start;
  }
}

.gw-footer p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5rem;
}

@media (min-width: 768px) {
  .gw-footer p {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }
}

.gw-footer__facts {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.gw-footer__facts > *:not(:first-child) {
  white-space: nowrap;
}

@media (min-width: 1024px) {
  .gw-footer__facts { flex-direction: row; }
}

.gw-footer__sep {
  display: none;
}

@media (min-width: 1024px) {
  .gw-footer__sep { display: inline; }
}

.gw-footer__link,
.gw-footer__link:visited {
  color: #ffffff;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gw-footer__link:hover {
  text-decoration-thickness: 2px;
}

.gw-footer__badges {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .gw-footer__badges { flex-direction: row; }
}

.gw-footer__divider {
  display: none;
  align-self: stretch;
  width: 1px;
  background-color: rgba(255, 255, 255, 0.4);
}

@media (min-width: 1280px) {
  .gw-footer__divider { display: block; }
}

.gw-gbt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gw-gbt__lion {
  width: 40px;
}

.gw-gbt__lion svg {
  display: block;
  fill: #ffffff;
}

.gw-gbt__text {
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.25rem;
  color: #ffffff;
  text-align: start;
}

.gw-cert {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 15px;
  background-color: #ffffff;
}
