/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;700&display=swap');

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

/* Global font usage */
body,
input,
button,
label {
  font-family: 'Open Sans', sans-serif, Arial;
}

body {
  background-color: #ffffff; /* bg-gray-200 */
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh; /* h-screen */
  margin: 0 16px;
}

.container {
  width: 100%; /* w-full */
  max-width: 28rem; /* max-w-md */
  background-color: #f5f5f5; /* bg-white */
  border-radius: 0.5rem; /* rounded-lg */
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); /* shadow-lg */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 500px;
}

.inner-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 2rem; /* p-8 */
  height: 100%;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
}

.image-container {
  width: 7rem; /* w-28 */
  height: 2.5rem;
  margin-bottom: 1.5rem; /* mb-6 */
  background-image: url('/authserver/ui/static/logo.webp');
  background-repeat: no-repeat;
  background-size: contain;
}

.title {
  font-size: 1.875rem; /* text-3xl */
  font-weight: 600; /* font-semibold */
  color: #1f2937; /* text-gray-800 */
}

.subtitle {
  color: #4b5563; /* text-gray-600 */
  margin-bottom: 1.5rem; /* mb-6 */
}

.input {
  width: 100%; /* w-full */
  border: 1px solid #d1d5db; /* border-gray-300 */
  border-radius: 0.375rem; /* rounded-md */
  padding: 0.5rem 1rem; /* px-4 py-2 */
  outline: none;
  background-color: #ffffff; /* bg-white */
  font-size: 16px;
  line-height: 24px;
}

.input:focus,
.on-focus {
  border-color: #6b21a8; /* focus:border-purple-800 */
  box-shadow: none; /* focus:ring-0 */
}

.error {
  margin-top: 0.5rem; /* mt-2 */
  color: #dc2626; /* text-red-600 */
}

.border-error {
  border-color: #dc2626; /* border-red-600 */
}

.checkbox-container {
  display: flex;
  align-items: center;
  margin-top: auto;
}

.checkbox {
  margin-right: 0.5rem; /* mr-2 */
}

.checkbox-label {
  color: #374151; /* text-gray-700 */
}

.button {
  background-color: #5147ba; /* bg-purple-800 */
  color: #ffffff; /* text-white */
  border-radius: 0.375rem; /* rounded-md */
  margin-top: 0.5rem; /* mt-2 */
  padding: 0.5rem 0; /* py-2 */
  width: 100%; /* w-full */
  border: none;
  font-size: 16px;
  line-height: 24px;
}

.button:hover {
  background-color: #201871;
  cursor: pointer;
}

.font-medium {
  font-weight: 500; /* font-medium */
}

.option {
  padding-left: 1rem; /* px-4 */
  padding-right: 1rem; /* px-4 */
  padding-top: 0.5rem; /* py-2 */
  padding-bottom: 0.5rem; /* py-2 */
  font-size: 0.875rem; /* text-sm */
  color: #374151; /* text-gray-700 */
  cursor: pointer; /* cursor-pointer */
}

.option:hover {
  background-color: #f3e8ff; /* hover:bg-purple-50 */
  color: #6b21a8; /* hover:text-purple-800 */
}

.absolute {
  position: absolute;
}

.dropdown-arrow {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
}

#selectContainer {
  width: 100%; /* w-full */
  border: 1px solid #d1d5db; /* border-gray-300 */
  border-radius: 0.375rem; /* rounded-md */
  outline: none;
  background-color: #ffffff; /* bg-white */
  font-size: 16px;
  line-height: 24px;
  position: relative;
}

.custom-select {
  border-radius: 0.375rem; /* rounded-md */
}

#selectedOption {
  width: calc(100% - 1.5rem); /* Adjust for arrow width */
  padding: 0.5rem 0.75rem;
  border-style: none;
  display: inline-block;
}

#optionsContainer {
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  overflow-y: auto;
  top: 100%;
  left: 0;
  z-index: 10;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  margin-top: 0.25rem;
  border-radius: 0.375rem;
}

#optionsContainer::-webkit-scrollbar {
  width: 8px; /* Width of scrollbar */
}

#optionsContainer::-webkit-scrollbar-track {
  background-color: transparent; /* Background color of scrollbar track */
}

#optionsContainer::-webkit-scrollbar-thumb {
  background-color: rgba(156, 163, 175, 0.5); /* Color of scrollbar thumb */
  border-radius: 4px; /* Border radius of scrollbar thumb */
}

#optionsContainer::-webkit-scrollbar-thumb:hover {
  background-color: rgba(
    156,
    163,
    175,
    0.7
  ); /* Color of scrollbar thumb on hover */
}

.invisible {
  visibility: hidden;
}

.hidden {
  display: none;
}

.relative {
  position: relative;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.text-sm {
  font-size: 0.875rem;
}

.text-gray-700 {
  color: #374151;
}

.hover\:bg-purple-50:hover {
  background-color: #f3e8ff;
}

.hover\:text-purple-800:hover {
  color: #6b21a8;
}

.cursor-pointer {
  cursor: pointer;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1f1f1f; /* bg-gray-800 */
  }

  .container {
    background-color: #3d3d3d; /* bg-gray-800 */
    color: #ffffff; /* text-white */
  }

  .image-container {
    width: 7rem; /* w-28 */
    height: 2.5rem;
    margin-bottom: 1.5rem; /* mb-6 */
    background-image: url('/authserver/ui/static/logo-dark.webp');
    background-repeat: no-repeat;
    background-size: contain;
  }

  .title,
  .subtitle,
  .checkbox-label {
    color: #ffffff; /* text-white */
  }

  .input {
    background-color: #242424; /* bg-gray-700 */
    color: #ffffff; /* text-white */
  }

  .input:focus,
  .on-focus {
    border-color: #ffffff; /* focus:border-purple-800 */
  }

  .custom-select {
    background-color: #242424; /* bg-gray-700 */
    color: #ffffff; /* text-white */
  }

  #optionsContainer {
    background-color: #242424; /* bg-gray-700 */
    color: #ffffff;
    border: 1px solid #ffffff; /* border-gray-300 */
  }

  .option {
    color: #ffffff; /* text-white */
  }

  .error {
    color: #d13438; /* text-red-600 */
  }

  .border-error {
    border-color: #d13438; /* border-red-600 */
  }

  .button {
    background-color: #8b83ea; /* bg-purple-700 */
  }

  .button:hover {
    background-color: #5f54d7;
  }
}
