:root {
  --card-bg: #ffffff;
  /* Light tint of the purple accent for hover surfaces. Flipped by the
     dark-theme block at the bottom of this file. */
  --region-hover-bg: #faf5ff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family:
    'Barlow',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    system-ui,
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  color: #18181b;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.main {
  display: flex;
  min-height: 100vh;
  width: 100%;
  align-items: flex-start;
  justify-content: center;
  background-image: url('./voxo-background.jpg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.lanyardContainer {
  position: relative;
  display: flex;
  transform: translateY(-15rem);
  flex-direction: column;
  align-items: center;
  justify-content: center;

  @media (max-width: 424px) {
    transform: translateY(-24rem);
  }
}

.lanyardStraps {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 500px;
}

.leftLanyard {
  position: relative;
  height: 100%;
  width: 4rem;
  transform-origin: bottom;
  transform: translateX(2rem) rotate(1deg);
  overflow: hidden;
  border-radius: 0.5rem;
  background: #8422e5;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.rightLanyard {
  position: relative;
  z-index: 20;
  height: 100%;
  width: 4rem;
  transform-origin: bottom;
  transform: translateX(-2rem) rotate(-1deg);
  overflow: hidden;
  border-radius: 0.5rem 0.5rem 0 0;
  background: #6b1fa3;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.logoPattern {
  position: absolute;
  top: 4rem;
  left: 50%;
  transform: translateX(-50%) rotate(-90deg);
  opacity: 0.2;
  z-index: 1;
  pointer-events: none;
  width: 107px;
  height: 26px;
}

.logoPattern2 {
  top: 12rem;
}

.logoPattern3 {
  top: 20rem;
}

.logoPattern4 {
  top: 28rem;
}

.logoPattern5 {
  top: 36rem;
}

.logoPattern6 {
  top: 44rem;
}

.logoImage {
  object-fit: contain;
  width: 100%;
  height: 100%;
  display: block;
}

.card {
  position: relative;
  z-index: 10;
  width: 100%;
  transform: translateY(-1.25rem);
  max-width: 30rem;
  background: #ffffff;
  background: var(--card-bg);
  border-radius: 1rem;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.15),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.cardHeader {
  position: relative;
  display: flex;
  height: 3rem;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #9e37ef 0%, #7726e3 100%);
}

.holePunches {
  display: flex;
  gap: 1.5rem;
}

.holePunch {
  height: 0.75rem;
  width: 5rem;
  border-radius: 9999px;
  background: var(--card-bg);
}

.cardBody {
  padding: 1.5rem 2rem;
}

.logoContainer {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.portalLogo {
  width: 220px;
  height: auto;
  object-fit: contain;
  display: block;
}

.logo-dark {
  display: none;
}

.cardBody > h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-align: center;
  color: #18181b;
}

.cardBody > .subtitle {
  font-size: 0.875rem;
  color: #71717a;
  margin-bottom: 1.5rem;
  text-align: center;
}

.field {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #52525b;
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field input[type='email'],
.field input[type='text'] {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  border: 1px solid #d4d4d8;
  border-radius: 0.75rem;
  background: #ffffff;
  color: #18181b;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.field input[type='email']::placeholder,
.field input[type='text']::placeholder {
  color: #a1a1aa;
}

.field input:focus {
  outline: none;
  border-color: #8422e5;
  box-shadow: 0 0 0 3px rgba(132, 34, 229, 0.15);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.15s ease,
    transform 0.1s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: #8422e5;
  color: #ffffff;
}

.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(119, 38, 227, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-oauth {
  background: #ffffff;
  color: #18181b;
  border-color: #d4d4d8;
}

.btn-oauth:hover {
  background: #f9fafb;
  border-color: #a1a1aa;
}

.btn-icon {
  width: 1.125rem;
  height: 1.125rem;
}

.divider {
  position: relative;
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid #e4e4e7;
}

.divider span {
  padding: 0 0.75rem;
}

.button-stack {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.region-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid #d4d4d8;
  border-radius: 0.75rem;
  background: var(--card-bg);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
  margin-bottom: 0.625rem;
}

.region-option:hover:not([aria-disabled='true']) {
  border-color: #8422e5;
  background: var(--region-hover-bg);
}

.region-option input[type='radio'] {
  width: 1rem;
  height: 1rem;
  accent-color: #8422e5;
}

.region-option-label {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.region-option-name {
  font-weight: 600;
  font-size: 0.9375rem;
}

.region-option-detail {
  font-size: 0.75rem;
  color: #71717a;
  margin-top: 0.125rem;
}

.region-option[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
}

.status-message {
  display: none;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  margin-bottom: 1rem;
}

.status-message.show {
  display: block;
}

.status-message.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.status-message.info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.cardBody.error-state {
  text-align: center;
}

.errorIconWrapper {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fef2f2;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: #ef4444;
}

.errorTitle {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.errorDescription {
  font-size: 0.875rem;
  color: #71717a;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.cardFooter {
  text-align: center;
  font-size: 0.9rem;
  color: #ffffff;
  background: linear-gradient(90deg, #9e37ef 0%, #7726e3 100%);
  padding: 10px;
}

.cardFooter a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
}

.cardFooter a:hover {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  color: #ffffff;
}

.btn-oauth.loading::after {
  color: #18181b;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-color-scheme: dark) {
  html,
  body {
    color: #f4f4f5;
  }

  :root {
    --card-bg: #18181b;
    /* Subtle purple-tinted dark — keeps the accent feel without going
       near-white like the light-mode tint would. */
    --region-hover-bg: #241e2e;
  }

  .card {
    border: 1px solid #3f3f46;
  }

  .cardBody > h2 {
    color: #fafafa;
  }

  .cardBody > .subtitle {
    color: #a1a1aa;
  }

  .field label {
    color: #d4d4d8;
  }

  .field input[type='email'],
  .field input[type='text'] {
    background: #27272a;
    color: #fafafa;
    border: 1px solid #52525b;
  }

  .field input[type='email']::placeholder,
  .field input[type='text']::placeholder {
    color: #a1a1aa;
  }

  .btn-oauth {
    background: #27272a;
    color: #fafafa;
    border-color: #52525b;
  }

  .btn-oauth:hover {
    background: #3f3f46;
    border-color: #71717a;
  }

  .divider {
    color: #71717a;
  }

  .divider::before,
  .divider::after {
    border-top: 1px solid #3f3f46;
  }

  .cardFooter {
    color: #a1a1aa;
  }


  .logo-light {
    display: none;
  }

  .logo-dark {
    display: block;
  }
}
