:root {
  --primary-font-color: #1d1d1d;
  --secondary-font-color: #727272;
  --primary-color: #0071e3;
  --secondary-color: #005ab5;
  --error-color: #c60000;
  --success-color: #4caf50;
  --lighter-gray: #ebebeb;
  --light-gray: #bebebe;
  --medium-gray: #808080;
  --dark-gray: #1d1d1d;
  --bg-color: #fafafa;
  --font-family: "Roboto", sans-serif;
  --base-font-size: 1em;
  --line-height: 1.4;
  --hero-font-size: 2.8em;
  --hero-line-height: 1.4;
  --hero-letter-spacing: 0.05em;
  --button-padding: 18px 24px;
  --button-border-radius: 4px;
  --link-font-color: #005ab5;
  --link-hover-color: #1d1d1d;
}

*,
::after,
::before {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  margin: 0;
  padding: 15px;
  color: var(--primary-font-color);
  background-color: var(--bg-color);
  font-size: var(--base-font-size);
  line-height: var(--line-height);
  min-height: 500px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

footer {
  margin-top: auto;
  padding: 15px;
  text-align: center;
  color: var(--secondary-font-color);
}

footer p {
  font-size: var(--font-size-small);
  margin: 10px;
  line-height: var(--line-height-normal);
}

.hero {
  padding: 20px 20px;
  text-align: center;
}

.hero .branding {
  font-size: var(--hero-font-size);
  margin-bottom: 15px;
  margin-top: 5px;
  letter-spacing: -0.03em;
}

.hero p {
  font-size: 1.25em;
  max-width: 800px;
  margin: 0 auto;
  letter-spacing: var(--hero-letter-spacing);
  line-height: var(--hero-line-height);
}

.wrapper {
  margin: 0 auto;
  max-width: 960px;
}

h1 {
  font-size: 2em;
  line-height: 1.2em;
}

p {
  margin: 10px 5px;
}

a,
a:link,
a:active,
a:visited {
  color: var(--link-font-color);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover-color);
}

.bold {
  font-weight: 600;
}

.light-gray {
  color: var(--medium-gray);
}

.blue {
  color: var(--primary-color);
}

.hidden {
  display: none;
}

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

#file-input {
  display: none;
}

.button,
button,
button[type="submit"] {
  margin: 8px 4px 8px 0;
  font-weight: 600;
  text-align: center;
  display: inline-block;
  background-color: var(--primary-color);
  color: #ffffff;
  padding: var(--button-padding);
  border: none;
  border-radius: var(--button-border-radius);
  cursor: pointer;
  font-size: 1em;
}

/* Media query for small screens */
@media (max-width: 768px) { /* Adjust the max-width as needed for your design */
  .button,
  button,
  button[type="submit"] {
    display: block; /* Change to block to take the full width */
    width: 100%; /* Set width to 100% to fill the container */
    margin: 4px 0; /* Adjust margin as needed */
  }
}

.button:hover,
button:hover,
#file-upload-label:hover {
  background-color: var(--secondary-color);
}

.button:active,
button:active {
  background-color: var(--primary-color);
  box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.125);
}

.button[disabled],
button[disabled],
button[disabled]:hover {
  background-color: var(--lighter-gray);
  color: #fafafa;
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-outline,
.btn-outline:hover,
.btn-outline:hover {
  background: none;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 12px 20px;
}

#progress-container {
  display: none;
  margin-top: 20px;
}

#progress-bar {
  width: 0;
  height: 20px;
  background-color: var(--primary-color);
  transition: width 0.3s;
}

#drop-area {
  margin: 8px 4px 8px 0;
  border: 1px dashed var(--medium-gray);
  padding: 30px;
  text-align: center;
  margin-bottom: 20px;
  color: var(--medium-gray);
}

#drop-area.drag {
  border-color: var(--light-gray);
  color: var(--light-gray);
}

#file-list {
  margin: 8px 4px 8px 0;
  color: var(--medium-gray);
  display: flex;
  justify-content: center;
}

#selected-files-list {
  margin: 0;
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

#selected-files-list li {
  background-color: var(--lighter-gray);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px;
  word-break: break-word;
}

#selected-files-list li span {
  font-weight: bold;
  margin-right: auto;
  padding-right: 5px;
}

#file-upload-label {
  margin: 8px 4px 8px 0;
  font-weight: 600;
  text-align: center;
  display: block;
  background-color: var(--primary-color);
  color: #fafafa;
  padding: var(--button-padding);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#error-message {
  margin: 8px 4px 8px 0;
  font-weight: 600;
  text-align: center;
  background-color: var(--error-color);
  color: #fafafa;
  padding: var(--button-padding);
  display: none;
  border-radius: 4px;
}

#download-link {
  margin: 8px 4px 8px 0;
  font-weight: 600;
  text-align: center;
  display: block;
  background-color: none;
  color: var(--primary-color);
  padding: var(--button-padding);
  cursor: pointer;
  border: 1px solid var(--primary-color);
  border-radius: 4px;
}

#success-message {
  margin: 8px 4px 8px 0;
  font-weight: 600;
  text-align: center;
  background-color: var(--success-color);
  color: #fafafa;
  padding: var(--button-padding);
  display: none;
  border-radius: 4px;
}

.small {
  font-size: 0.8em;
  line-height: 1.3em;
}

/* Checkbox toggles */

.toggle-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0;
}

.toggle-item {
  display: flex;
  align-items: center;
  margin: 15px;
}

.toggle-item label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 180px;
  margin-right: 10px; /* Add right margin to label */
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
  margin-left: 10px; /* Or add left margin to switch */
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--medium-gray);
  transition: 0.4s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: #fafafa;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--secondary-color);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.slider.round {
  border-radius: 20px;
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
  display: none;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

li[draggable="true"] {
  cursor: move;
}

.drag-over {
  border: none;
}

@keyframes flash-success {
  0%, 100% {
    background-color: var(--lighter-gray);
  }
  50% {
    background-color: var(--success-color);
    color: #ffffff;
  }
}

.flash-success {
  animation: flash-success 1s ease;
}
