/* Reset & base */
html, body {
  margin: 0;
  padding: 0;
  color: #000;
  height: 100%;
  background-color: #1C75BC;
  /* font-family: 'Segoe UI', sans-serif; */
  font-family: 'Courier New', sans-serif;
}

form {
  align-items: center;
}

/* Main Title */
h1 {
  margin-top: 8%;
  font-size: 2.4rem;
  color: white;
}

#page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  /* padding-left: 2.5%; */
  /* padding: 2rem; */
}


#container {
  background: white;
  display: flex;
  padding: 2rem;
  border-radius: 20px;
  width: 60%;
  flex-direction: column;
  align-items: center;
  justify-content: center;text-align: center;
  /* box-shadow: inset 0 0 14px rgba(28, 28, 28, 1), 0 2px 8px rgba(0, 0, 0, 0.4); */
  box-shadow: inset 0 0 14px rgba(20, 20, 20, 1), 0 2px 12px rgba(0, 0, 0, 0.5);
}


h3 {
  margin-top: 0;
  font-size: 1.4rem;
  color: #1C75BC;
}

/* File input */
input[type="file"] {
  width: 100px !important;
  padding: 10px !important;
  margin-top: 10px !important;
}

/* Checkbox */
input[type="checkbox"] {
  margin-left: 10px;
}

/* Buttons */
button {
  font-size: 1rem;
  padding: 10px 20px;
  margin: 10px 8px 0;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.button-row {
  /* display: flex; */
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

#transcribe-button:not(:disabled) {
  border: 2px solid #1C75BC;
  padding: 8px 16px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  background-color: white;
  color: #1C75BC;
}
#transcribe-button:not(:disabled):hover {
  background-color: #1C75BC;
  color: white;
}

#transcribeBtn:disabled {
  border: 2px solid #ccc;
  padding: 8px 16px;
  font-weight: bold;
  border-radius: 6px;
  cursor: not-allowed;
  background-color: white;
  color: #666;
}

#reset-token-button {
  background-color: white;
  color: #F44747;
  border: 2px solid #F44747;
  padding: 8px 16px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#reset-token-button:hover {
  background-color: #F44747;
  color: white;
}

/* Drag & Drop */
#drop-area {
  border: 2px dashed #aaa;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  color: #555;
  cursor: pointer;
  background-color: #f9f9f9;
  transition: background-color 0.3s ease;
}

#drop-area:hover {
  background-color: #f0f0f0;
}

#file-name-display {
  margin-top: 10px;
  font-style: italic;
  color: #333;
}

.remove-file-btn {
  margin-left: 10px;
  background: none;
  color: #a94442;
  border: none;
  border-radius: 4px;
  padding: 3px 8px;
  cursor: pointer;
}

.file-link {
  color: #1C75BC;
  text-decoration: underline;
  cursor: pointer;
}

/* Spinner (optional) */
.spinner {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #1C75BC;
  border-radius: 50%;
  margin: 2px auto;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 2px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#stop-btn {
  color: #dc3545;
  background-color: white;
  border: 2px solid #dc3545;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 5px rgba(220, 53, 69, 0.5);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-stop:hover {
  background-color: #dc3545;
  color: white;
  /* box-shadow: 0 0 10px rgba(220, 53, 69, 0.7); */
}


.glow-text {
  margin-top: 2px auto;
  color: #1C75BC;
  /* text-shadow: 0 0 5px #1C75BC, 0 0 10px #1C75BC, 0 0 20px #1C75BC; */
  animation: glowPulse 0.6s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  0% {
    text-shadow: 0 0 5px #19C5FB, 0 0 10px #19C5FB, 0 0 20px #19C5FB;
  }
  100% {
    text-shadow: 0 0 10px #19C5FB, 0 0 20px #19C5FB, 0 0 40px #19C5FB;
  }
}

/* Trascriptions */
#transcription-out {
  white-space: pre-wrap;
  font-family: monospace;
  background-color: #165f97;
  color: #d4d4d4;
  padding: 1rem;
  border-radius: 8px !important;
  margin: 4px;
  text-align: left;
  max-height: 50%;
  overflow-y: auto;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
}


.dropdown-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  justify-content: center;
}

.dropdown-icon {
  width: 20px;
  height: 20px;
}

.dropdown-label {
  font-size: 1rem;
  /* font-weight: 500; */
}

/* Custom Select Wrapper */
.custom-select-wrapper {
  position: relative;
  width: 140px;
}

/* Custom Select Box */
.custom-select {
  border: 1px solid #ccc;
  border-radius: 10px;
  background-color: #fff;
  cursor: pointer;
  user-select: none;
  padding: 2px 4px;
  position: relative;
}

.custom-select .selected-option {
  align-items: center;
}

/* Options list */
.custom-select .options {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #ccc;
  border-top: none;
  position: absolute;
  width: 100%;
  background-color: white;
  z-index: 100;
  display: none;
  max-height: 180px;
  overflow-y: auto;
}

.custom-select.open .options {
  display: block;
}

.custom-select .options li {
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.custom-select .options li:hover {
  background-color: #f0f0f0;
}

/* Speakers */
.stepper-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px;
  font-family: sans-serif;
}

.stepper-container input[type="number"] {
  width: 60px;
  padding: 5px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

/* Stopwatch */
.stopwatch {
  color: #bbb;
  font-family: monospace;
  font-size: 16px;
  margin-top: 10px;
}

/* Footer */
footer {
  display: flex;
  color: white;
  padding: 1rem;
  /* text-align: center; */
  justify-content: center;
  margin: auto;
  /* margin-bottom: 2%; */
  font-size: 0.9rem;
}

/* Progress Bar */
progress {
  width: 100%;
  max-width: 75%;
  margin: 5px;
  height: 14px;
  appearance: none;
  -webkit-appearance: none;
  display: none;
  align-self: center;
}

#progress-container {
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  margin-top: 10px;
  width: 100%;
}

/* Visible progress bar */
#transcription-progress
{
  width: 80%;
  max-width: 400px;
  height: 16px;
  margin: 5px 0;
  appearance: none;
  -webkit-appearance: none;
  display: block;
}

progress::-webkit-progress-bar {
  background-color: #eee;
  border-radius: 12px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

progress::-webkit-progress-value {
  background-color: #4caf50;
  border-radius: 12px;
  transition: width 0.5s ease;
}

progress::-moz-progress-bar {
  background-color: #4caf50;
  border-radius: 12px;
}

/* Tooltip for info */
.tooltip-container {
  position: relative;
  cursor: help;
  font-size: 0.9em;
  margin-left: 4px;
  font-weight: bold;
  color: grey;
}

.tooltip-text {
  visibility: hidden;
  width: max-content;
  max-width: 200px;
  background-color: #333;
  color: #fff;
  text-align: left;
  border-radius: 5px;
  padding: 6px 8px;
  position: absolute;
  z-index: 10;
  bottom: 125%; /* above the icon */
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  font-size: 0.75em;
  transition: opacity 0.1s ease-in;
  white-space: normal;
  font-weight: initial;
}

.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}