body {
  font-family: Arial, sans-serif;
}

h1 {
  text-align: center;
}

form {
  border-radius: 8px;
  padding: 20px;
  margin: 20px auto;
  max-width: 400px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

input,
select,
textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 16px;
  background-color: #f2f2f2;
  /* Default background color */
  color: #292929;
  /* Default text color */
  box-sizing: border-box;
}

/* Override the default styles for the select field that apple tries to apply */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url('dropdown-black.png');
  background-size: 25px;
  background-position: right 10px center;
  background-repeat: no-repeat;
}

.dark-mode select {
  background-image: url('dropdown-white.png');
}

/* make the description input bigger */
textarea {
  height: 100px;
}

button[type="submit"] {
  background-color: #4caf50;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 12px 20px;
  cursor: pointer;
}

button[type="submit"]:hover {
  background-color: #338237;
}

.button-container {
  text-align: center;
}

/* Make GitHub link text always appear blue and bold */
a {
  color: #007bff;
  font-weight: bold;
}

/* Additional styles for dark mode */
.light-mode {
  background-color: #f2f2f2;
  color: #333;
}

.dark-mode {
  background-color: #1b1b1b;
  color: #f2f2f2;
}

.dark-mode form {
  background-color: #282828;
}

.dark-mode input,
.dark-mode select,
.dark-mode textarea {
  background-color: #444;
  /* Dark mode background color */
  color: #f2f2f2;
  /* Dark mode text color */
}

.toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.toggle-label {
  position: relative;
  display: inline-block;
  width: 80px;
  height: 34px;
}

.toggle-label input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.toggle-label input:checked+.toggle-slider {
  background-color: #2196F3;
}

.toggle-label input:checked+.toggle-slider:before {
  transform: translateX(46px);
}

.toggle-text {
  margin-left: 10px;
}

/* Success popup */
#success-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 2em;
  z-index: 1000;
  border: 2px solid white;
  border-radius: 10px;
  padding: 50px;
  box-sizing: border-box;
  max-width: 80%;
  text-align: center;
}


/* Styling for phone screens */

/* Apply these styles when the screen width is 600px or less, which is basically every phone */
@media screen and (max-width: 600px) {
  body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  #cardForm {
    width: 100%;
    /* Make the form take up the full width of the screen */
    padding: 10px;
    /* Add some padding around the form */
  }

  h1 {
    padding: 10px;
    font-size: 22px;
  }

  /* make the dark mode toggle a little smaller */
  .toggle-label {
    width: 40px;
    height: 24px;
  }

  .toggle-slider {
    border-radius: 24px;
  }

  .toggle-slider:before {
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
  }

  .toggle-label input:checked+.toggle-slider:before {
    transform: translateX(16px);
  }

  .toggle-text {
    font-size: 14px;
  }

  .toggle-container {
    margin-bottom: -20px;
    margin-top: -20px;
  }

  #cardForm input[type="text"],
  #cardForm input[type="number"],
  #cardForm input[type="email"],
  #cardForm select,
  #cardForm textarea {
    margin-top: -5px;
    margin-bottom: 5px;
    width: 100%;
    /* Make form fields take up the full width of the form */
  }

  #contactName {
    margin-bottom: -10px;
  }

  #cardForm select {
    margin-bottom: 10px;
  }
}