:root {
  /* Define global colors */
  --primary-background: #ffffff;
  --secondary-background: #000000;
  --primary-text: #000000;
  --secondary-text: #FFFF00;
  --orange-color: #FF5733;
  --link-blue: #0000EE;
  --success-color: #28A745;
  --error-color: #ff4d4d;
  --gray-1: #D6D6D6;
  --gray-2: #9CA3AF;
  --gray-3: #6B7280;
  --gray-4: #4B5563;
  --gray-5: #374151;

  /* Define global font sizes, spacing, etc. */
  --font-size-base: 12px;
  --font-size-h1: 2.5rem;
  --font-size-h2: 2rem;
  --font-size-h3: 1.75rem;
  --font-size-h4: 1rem;
  --font-size-p: 1rem;
  --font-size-caption: 0.875rem;
  --font-size-blockquote: 1.125rem;
  --spacing: 1rem;
}

body {
  font-size: var(--font-size-base);
  font-family: 'Questrial', sans-serif;

}

h1 {
  font-size: var(--font-size-h1);
  color: var(--primary-text);
}

h2 {
  font-size: var(--font-size-h2);
  color: var(--primary-text);
}

h3 {
  font-size: var(--font-size-h3);
  color: var(--primary-text);
}

h4 {
  font-size: var(--font-size-h4);
  color: var(--primary-text);
}

p {
  font-size: var(--font-size-p);
  color: var(--primary-text);
}

p.bold {
  /* Add a new rule for p with class "bold" */
  font-weight: bold;
}

blockquote {
  font-size: var(--font-size-blockquote);
  color: var(--gray-3);
  border-left: 4px solid var(--gray-2);
  padding-left: var(--spacing);
  margin: var(--spacing) 0;
  font-style: italic;
}

caption {
  font-size: var(--font-size-caption);
  color: var(--gray-4);
  text-align: center;
  display: block;
  margin-top: 0.5rem;
}

/* For form labels */
label {
  font-size: 0.875rem;
  /* Match input font size */
  font-weight: 500;
  /* Make the label text slightly bold */
  color: var(--primary-text);
  /* Use a color variable for consistency */
  margin-top: 0.5rem;
  /* Add space above the label */
  margin-bottom: 0.25rem;
  /* Add space between the label and input field */
  text-align: left;
  /* Ensure the label is left-aligned */
  display: block;
  /* Ensure the label spans the full width above the input */
}


/* For text input boxes */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"] {
  padding: 0.5rem;
  font-size: 0.875rem;
  border: 1px solid var(--secondary-background);
  border-radius: 3px;
  width: 100%;
}

/* For dropdowns */
select {
  padding: 0.5rem;
  font-size: 0.875rem;
  border: 1px solid var(--secondary-background);
  border-radius: 3px;
  width: 100%;
  appearance: none;
  /* This removes default styling in some browsers */
  /* Add cross-browser styling for the dropdown arrow if needed */
}

/* For checkboxes */
input[type="checkbox"] {
  cursor: pointer
}

/* For radio buttons */
input[type="radio"] {
  cursor: pointer
}


.error-container {
  background-color: #ffe6e6;
  color: #b00020;
  padding: 1rem;
  border: 1px solid #b00020;
  border-radius: 4px;
  margin: 1rem 0;
  text-align: center;
  font-family: Arial, sans-serif;
}

.error-message {
  font-size: 1rem;
  font-weight: bold;
}

.container {
  max-width: 400px;
  margin: auto;
  padding: 2rem;
  text-align: center;
}

.logo {
  max-width: 150px;
  height: auto;
  display: block;
  margin-left: auto;
  /* Automatic margin on the left to center logo*/
  margin-right: auto;
  /* Automatic margin on the right to center logo*/
}

form {
  display: flex;
  flex-direction: column;
  padding: 2rem;
}

.spinner {
  border: 8px solid var(--gray-2);
  border-top: 8px solid var(--orange-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 10px auto;
}

/* Animation for the spinning effect */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Modal overlay */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  /* Semi-transparent background */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Modal content box */
.modal-content {
  background-color: var(--primary-background);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 400px;
  text-align: center;
  animation: slide-down 0.3s ease-out;
}

/* Paragraph styling inside modal */
.modal-content p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: #333;
}

button,
form button,
.modal-content button {
  cursor: pointer;
  padding: 0.5rem 1rem;
  color: var(--secondary-text);
  background-color: var(--secondary-background);
  border: 2px solid transparent;
  border-radius: 3px;
  font-size: 0.875rem;
  text-transform: none;
  transition: background-color 0.3s, transform 0.1s, border-color 0.3s;
  margin: 1rem 0;
  /* Adjust spacing for buttons */
}

form button:hover,
button:hover,
.modal-content button:hover {
  background-color: var(--gray-5);
  color: var(--primary-background);
}

form button:active,
button:active,
.modal-content button:active {
  transform: scale(0.95);
  color: var(--orange-color);
  background-color: var(--secondary-background);
  border-color: transparent;
}

form button:disabled,
button:disabled,
.modal-content button:disabled {
  cursor: not-allowed;
  color: var(--disabled-text, #999);
  background-color: var(--disabled-background, #e0e0e0);
  opacity: 0.6;
}

/* Modal-specific styling */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background-color: var(--primary-background);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 400px;
  text-align: center;
  animation: slide-down 0.3s ease-out;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  /* Space between modal elements */
}

.modal-content p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: #333;
}

.modal-content button {
  width: 100%;
  /* Ensure buttons match the width of input and form elements */
  max-width: 400px;
  /* Limit maximum width */
  align-self: center;
}

/* Animation for modal entrance */
@keyframes slide-down {
  from {
    transform: translateY(-20%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}