@import url("https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Cairo:wght@600&family=Urbanist:wght@700&display=swap");

* {
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

html {
  /* background: url(pixel-perfect.png) no-repeat top center; */
  /* height: 100%;
  width: 100%; */
  background-size: cover;
}

/* Default background (no color class) */
body {
  color: var(--primary-text);
  font-family: "Inter", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: 16px;
  align-content: center;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 60%, rgba(120, 60, 180, 0.6) 100%), url("../images/bg-light-min.jpg") no-repeat center;
  background-size: cover;
  background-attachment: fixed;
}

/* Color-based backgrounds for light mode */
html.red body,
html.orange body,
html.amber body,
html.yellow body,
html.lime body,
html.green body,
html.emerald body,
html.teal body,
html.cyan body,
html.sky body,
html.blue body,
html.indigo body,
html.violet body,
html.purple body,
html.fuchsia body,
html.pink body,
html.rose body,
html.slate body,
html.gray body,
html.zinc body,
html.neutral body,
html.stone body {
  background: none;
  background-attachment: unset;
}

html.red body {
  background-color: var(--color-red-200);
}
html.orange body {
  background-color: var(--color-orange-200);
}
html.amber body {
  background-color: var(--color-amber-200);
}
html.yellow body {
  background-color: var(--color-yellow-200);
}
html.lime body {
  background-color: var(--color-lime-200);
}
html.green body {
  background-color: var(--color-green-200);
}
html.emerald body {
  background-color: var(--color-emerald-200);
}
html.teal body {
  background-color: var(--color-teal-200);
}
html.cyan body {
  background-color: var(--color-cyan-200);
}
html.sky body {
  background-color: var(--color-sky-200);
}
html.blue body {
  background-color: var(--color-blue-200);
}
html.indigo body {
  background-color: var(--color-indigo-200);
}
html.violet body {
  background-color: var(--color-violet-200);
}
html.purple body {
  background-color: var(--color-purple-200);
}
html.fuchsia body {
  background-color: var(--color-fuchsia-200);
}
html.pink body {
  background-color: var(--color-pink-200);
}
html.rose body {
  background-color: var(--color-rose-200);
}
html.slate body {
  background-color: var(--color-slate-200);
}
html.gray body {
  background-color: var(--color-gray-200);
}
html.zinc body {
  background-color: var(--color-zinc-200);
}
html.neutral body {
  background-color: var(--color-neutral-200);
}
html.stone body {
  background-color: var(--color-stone-200);
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

input,
button,
textarea,
select {
  font: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1 {
  font-family: "Cairo", serif;
  color: var(--primary-color);
  font-size: 28px;
  margin-bottom: 10px;
  text-align: center;
}

h2 {
  color: var(--secondary-text);
  text-align: center;
  margin-bottom: 10px;
}

.hero {
  background: url(header.jpg) no-repeat top center;
  background-size: contain;
  height: 407px;
  width: 100%;
  position: relative;
}

.darkmode-toggle {
  position: absolute;
  top: 27px;
  right: 36px;
  background: var(--background);
  font-size: 10px;
  border-radius: 120px;
  height: 38px;
  width: 79px;
  padding: 4px;
  color: var(--form-text);
  cursor: pointer;
  display: none;
}

.darkmode-toggle-content {
  height: 100%;
  display: flex;
  /* gap: 7px; */
  align-items: center;
}

.darkmode-toggle-content {
  visibility: visible;
}

.darkmode-toggle-content span {
  /* width: 76px; */
  text-align: center;
  flex: 1;
  user-select: none;
}

.darkmode-toggle-content span:nth-child(3) {
  display: none;
}

.darkmode-toggle-content .moon,
.darkmode-toggle-content .sun {
  background-image: url(sun.svg);
  background-color: var(--primary-color);
  background-repeat: no-repeat;
  background-position: center;
  width: 32px;
  height: 32px;
  border-radius: 100px;
}

.darkmode-toggle-content .sun {
  background-image: url(moon.svg);
  display: none;
}

.popup {
  display: flex;
  min-height: 100%;
  flex-flow: column;
  align-items: center;
  place-content: center;
  padding: 120px 0 60px;
}

.popup-container {
  /* justify-items: center; */
  background: var(--background);
  padding: 60px 52px 40px;
  margin-bottom: 62px;
  border-radius: 20px;
}

.popup-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 32px);
}

.footer-logo {
  min-width: 0;
  max-width: 100%;
  height: auto;
}

.footer-logo-dark {
  display: none;
}

[data-colors-mode="dark"] .footer-logo-light {
  display: none;
}

[data-colors-mode="dark"] .footer-logo-dark {
  display: block;
}

.content-holder {
  width: 408px;
}

.logo {
  background-image: var(--lightLogoPath);
  width: 170px;
  height: 50px;
  background-size: contain;
  background-position: top center;
  margin-bottom: 26px;
  justify-self: center;
  background-repeat: no-repeat;
}

.has-server-messages .content-holder {
  padding-top: 30px;
}

.button-container {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.button {
  background: var(--primary-color);
  border: none;
  border-radius: 8px;
  color: white;
  display: flex;
  padding: 14px 24px;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  justify-content: center;
}

.button.will-load {
  height: 48px;
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.button.google {
  background: var(--background);
  color: var(--primary-text);
  border: 1px solid var(--borders);
  font-family: Urbanist;
}

.or-split {
  position: relative;
  text-align: center;
}

.or-split span {
  padding: 0 16px;
  background: var(--background);
}

.or-split:after {
  content: " ";
  position: absolute;
  height: 1px;
  top: 7px;
  left: 0;
  width: 100%;
  background: var(--borders);
  z-index: -1;
}

.create-account {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

/* INPUT TEXT */
.input-holder {
  display: flex;
  flex-direction: column;
  gap: 13px;
  position: relative;
  width: 100%;
}

input:invalid,
input[aria-invalid="true"] {
  border-color: var(--warnings);
}

.error-message {
  color: var(--warnings);
  font-size: 12px;
  width: 100%;
}

.server-message {
  position: static;
  color: var(--warnings);
  background-color: #fee2e2;
  padding: 20px;
  font-size: 14px;
  border-radius: 10px;
  margin: 30px auto 0;
  width: fit-content;
  max-width: 408px;
}

.server-message.success {
  color: #046c4e;
  background-color: #dbfbe6;
  display: flex;
  align-items: center;
  gap: 12px;
}

input:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: -1px;
}

input:focus:invalid {
  border-color: var(--warnings);
}

input[type="text"],
input[type="otp"],
input[type="email"],
input[type="password"] {
  border-radius: 8px;
  border: 1px solid var(--borders);
  background: var(--form-surface);
  display: flex;
  height: 44px;
  padding: 12px 16px;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  color: var(--form-text);
}

/* Apply styles to autofilled input fields */
input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px var(--form-surface) inset !important;
  -webkit-text-fill-color: var(--form-text) !important;
}

input[type="checkbox"] {
  border-radius: 4px;
  border: 1px solid var(--borders);
  background: var(--form-surface);
  padding: 0 0 0 5px;
}

/* PASSWORD */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-wrapper input {
  flex: 1;
  width: 100%;
}

.toggle-password {
  position: absolute;
  right: 10px;
  cursor: pointer;
  width: 20px;
  height: 20px;
  z-index: 1;
}

/* SELECT */
.input-holder select {
  border-radius: 8px;
  border: 1px solid var(--borders);
  background: var(--form-surface);
  display: flex;
  height: 44px;
  padding: 12px 16px;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  color: var(--form-text);
  cursor: pointer;
  width: 100%;

  /* Custom dropdown arrow */
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Select focus state */
.input-holder select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: -1px;
}

/* Select option styling */
.input-holder select option {
  background: var(--form-surface);
  color: var(--form-text);
  padding: 12px;
}

/* Disabled select state */
.input-holder select:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* CHECKBOX */
/* Hide the default checkbox but keeps a bit visible so the native error can appear */
.checkbox {
  height: 1px;
  width: 1px;
  position: absolute;
  opacity: 0.001;
  transform: translate(20px, 22px);
}

/* Create toggle switch container */
.checkbox + label {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

/* The switch background */
.checkbox + label::before {
  content: "";
  width: 40px;
  height: 20px;
  background-color: #e5e7eb;
  border-radius: 25px;
  display: inline-block;
  flex-shrink: 0;
  margin-right: 12px;
}

/* The toggle circle */
.checkbox + label::after {
  content: "";
  position: absolute;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Checked state colors */
.checkbox:checked + label::before {
  background-color: var(--primary-color);
}

/* Move the toggle circle when checked */
.checkbox:checked + label::after {
  left: 22px;
}

/* Disabled state */
.checkbox:disabled + label {
  opacity: 0.7;
  cursor: not-allowed;
}

/* CHECKBOX basic */
.checkbox-basic {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border: 1px solid var(--borders);
  border-radius: 4px;
  background-color: var(--form-surface);
  cursor: pointer;
}

.checkbox-basic:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: -1px;
}

.checkbox-basic:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
  background-size: 75%;
  background-position: center;
  background-repeat: no-repeat;
}

.checkbox-basic:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.social-login-container {
  margin-top: 21px;
  width: 100%;
}

.social-login-divider {
  position: relative;
  text-align: center;
  margin-bottom: 14px;
  color: var(--text-secondary);
}

.social-login-divider::before,
.social-login-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 45px;
  height: 1px;
  background-color: var(--borders);
}

.social-login-divider::before {
  left: calc(50% - 62px);
}

.social-login-divider::after {
  right: calc(50% - 62px);
}

.social-login-divider span {
  padding: 0 10px;
  background-color: var(--background-color);
  position: relative;
}

.social-login-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.social-login-buttons .button {
  flex: 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border: 1px solid var(--borders);
  background-color: var(--background-color);
  color: var(--text-primary);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.social-login-buttons .button:hover {
  background-color: var(--hover-color);
}

.social-login-buttons .button img {
  margin-right: 8px;
  width: 20px;
  height: 20px;
}

.social-login-buttons .button.github img {
  filter: brightness(0);
}

/* Dark mode */
[data-colors-mode="dark"] body {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 70%, #1a0b32 100%), url("../images/bg-dark-min.jpg") no-repeat center;
  background-size: cover;
  background-attachment: fixed;
}

/* Color-based backgrounds for dark mode */
[data-colors-mode="dark"].red body,
[data-colors-mode="dark"].orange body,
[data-colors-mode="dark"].amber body,
[data-colors-mode="dark"].yellow body,
[data-colors-mode="dark"].lime body,
[data-colors-mode="dark"].green body,
[data-colors-mode="dark"].emerald body,
[data-colors-mode="dark"].teal body,
[data-colors-mode="dark"].cyan body,
[data-colors-mode="dark"].sky body,
[data-colors-mode="dark"].blue body,
[data-colors-mode="dark"].indigo body,
[data-colors-mode="dark"].violet body,
[data-colors-mode="dark"].purple body,
[data-colors-mode="dark"].fuchsia body,
[data-colors-mode="dark"].pink body,
[data-colors-mode="dark"].rose body,
[data-colors-mode="dark"].slate body,
[data-colors-mode="dark"].gray body,
[data-colors-mode="dark"].zinc body,
[data-colors-mode="dark"].neutral body,
[data-colors-mode="dark"].stone body {
  background: none;
  background-attachment: unset;
}

[data-colors-mode="dark"].red body {
  background-color: var(--color-red-950);
}
[data-colors-mode="dark"].orange body {
  background-color: var(--color-orange-950);
}
[data-colors-mode="dark"].amber body {
  background-color: var(--color-amber-950);
}
[data-colors-mode="dark"].yellow body {
  background-color: var(--color-yellow-950);
}
[data-colors-mode="dark"].lime body {
  background-color: var(--color-lime-950);
}
[data-colors-mode="dark"].green body {
  background-color: var(--color-green-950);
}
[data-colors-mode="dark"].emerald body {
  background-color: var(--color-emerald-950);
}
[data-colors-mode="dark"].teal body {
  background-color: var(--color-teal-950);
}
[data-colors-mode="dark"].cyan body {
  background-color: var(--color-cyan-950);
}
[data-colors-mode="dark"].sky body {
  background-color: var(--color-sky-950);
}
[data-colors-mode="dark"].blue body {
  background-color: var(--color-blue-950);
}
[data-colors-mode="dark"].indigo body {
  background-color: var(--color-indigo-950);
}
[data-colors-mode="dark"].violet body {
  background-color: var(--color-violet-950);
}
[data-colors-mode="dark"].purple body {
  background-color: var(--color-purple-950);
}
[data-colors-mode="dark"].fuchsia body {
  background-color: var(--color-fuchsia-950);
}
[data-colors-mode="dark"].pink body {
  background-color: var(--color-pink-950);
}
[data-colors-mode="dark"].rose body {
  background-color: var(--color-rose-950);
}
[data-colors-mode="dark"].slate body {
  background-color: var(--color-slate-950);
}
[data-colors-mode="dark"].gray body {
  background-color: var(--color-gray-950);
}
[data-colors-mode="dark"].zinc body {
  background-color: var(--color-zinc-950);
}
[data-colors-mode="dark"].neutral body {
  background-color: var(--color-neutral-950);
}
[data-colors-mode="dark"].stone body {
  background-color: var(--color-stone-950);
}

[data-colors-mode="dark"] .logo {
  /* background-image: url(hyperstack-logo-dark.svg); */
  background-image: var(--darkLogoPath);
}

[data-colors-mode="dark"] .checkbox-basic {
  background-color: var(--form-surface);
  border-color: var(--borders);
}

[data-colors-mode="dark"] .checkbox-basic:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

[data-colors-mode="dark"] .darkmode-toggle-content span,
[data-colors-mode="dark"] .darkmode-toggle-content .moon {
  display: none;
}

[data-colors-mode="dark"] .darkmode-toggle-content span:nth-child(3),
[data-colors-mode="dark"] .darkmode-toggle-content .sun {
  display: block;
}

[data-colors-mode="dark"] .checkbox + label::before {
  /* background-color: #374151; */
}

[data-colors-mode="dark"] .checkbox:not(:checked) + label::after {
  background-color: #6b7280;
}

[data-colors-mode="dark"] .input-holder select {
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

[data-colors-mode="dark"] .social-login-buttons .button.github img {
  filter: none;
}

/* smaller than 1440 */
@media (max-width: 1439px) {
  .hero {
    height: calc(100vw * (407 / 1440));
  }

  .darkmode-toggle {
    left: auto;
    right: 28px;
  }
}

/* smaller than 1060 */
@media (max-width: 1059px) {
  .popup {
    padding: 10px;
  }

  .hero {
    height: calc(100vw * (407 / 1440));
  }
}

/* smaller than 660 */
@media (max-width: 659px) {
  .content-holder {
    width: 100%;
  }

  .popup-container {
    padding: 60px 20px 40px;
  }

  .darkmode-toggle {
    width: auto;
  }

  .darkmode-toggle-content span {
    display: none;
  }

  [data-colors-mode="dark"] .darkmode-toggle-content span {
    display: none !important;
  }

  .input-holder select {
    width: 100%;
  }

  .server-message {
    margin: 30px 20px 0;
  }

  .server-message.success img {
    display: none;
  }

  .button-container {
    width: 100% !important;
  }
}

/* smaller than 360 */
@media (max-width: 359px) {
  .hero {
    height: 155px;
    background-image: url(header-mobile.jpg);
  }
}
