html, body{
  width: 100%;
  height: 100%;
  margin: 0;
}

#header {
  width: 100%;
  height: 6%;
  background-color: #4e6476;
  display: flex;
  align-items: center;
}

#header img {
  height: 90%;
  object-fit: contain;
  margin-left: 0.5%;
}

#body {
  width: 100%;
  height: 94%;
  display: flex;
  margin: auto;
  justify-content: space-between;
  align-content: center;
  background-color:  #e6e6e6;
  font-family: "Arial", sans-serif;
}

#input-container {
  font-size: medium;
  margin-top: 1%;
  margin-left: 17%;
  font-weight: bold;
  font-family: "Arial", sans-serif;
}

.input-text {
  font-family: "Arial", sans-serif;
  font-size: medium;
  border: 2px solid darkgray;
} 

.input-text:focus {
  outline: none;
  box-shadow: 0 0 0 3px lightgray;
}

#search-and-URI-container {
  font-size: smaller;
  margin-top: 5%;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0px;
}

.search-input {
  font-family: "Arial", sans-serif;
  font-size: small;
  border: 2px solid darkgray;
  border-radius: 5px;
  resize: none;
}

.search-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px lightgray;
}

.retrieve-passage-btn {
  margin: 2px 0;
  padding: 2px 12px;
  font-size: 12px;
  border: 2px solid #ccc;
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  border-radius: 8px;
  outline: none;
  height: 32px;
  box-sizing: border-box;
  background: #008CBA;
  color: white;
}
.retrieve-passage-btn:hover {
  background-color: #82878b;
  opacity: 1;
  transform: translateY(0);
  transition-duration: .35s;
}

a {
  color: #4183C4;
  text-decoration: none;
  font-weight: none;
}

.available-works {
  font-size: small;
  clear: both;
  margin-top: 2px;
  margin-left: 5px;
  margin-bottom: 5%;
}

.URI-box {
  display: flex;
  align-items: center;
  gap: 0px;
}

.URI-input {
  font-family: "Arial", sans-serif;
  font-size: small;
  border: 2px solid darkgray;
  border-radius: 5px;
  resize: none;
}

.URI-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px lightgray;
}

.enter-URI-btn {
  margin: 2px 0;
  padding: 2px 16px;
  font-size: 12px;
  border: 2px solid #ccc;
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  border-radius: 8px;
  outline: none;
  height: 32px;
  box-sizing: border-box;
  background: #008CBA;
  color: white;
}
.enter-URI-btn:hover {
  background-color: #82878b;
  opacity: 1;
  transform: translateY(0);
  transition-duration: .35s;
}

#upload-XML {
  font-size: smaller;
  font-weight: none;
  margin-top: 5%;
}

#upload-XML fieldset {
  width: 70%;
  border: 2px solid darkgray;
}

.URL-box {
  display: flex;
  align-items: center;
  gap: 0px;
}

.URL-input {
  font-family: "Arial", sans-serif;
  font-size: small;
  border: 2px solid darkgray;
  border-radius: 5px;
  resize: none;
}

.URL-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px lightgray;
}

.enter-url-btn {
  margin: 2px 0;
  padding: 2px 25px;
  font-size: 12px;
  border: 2px solid #ccc;
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  border-radius: 8px;
  outline: none;
  height: 32px;
  box-sizing: border-box;
  background: #008CBA;
  color: white;
}
.enter-url-btn:hover {
  background-color: #82878b;
  opacity: 1;
  transform: translateY(0);
  transition-duration: .35s;
}

#input-manipulation legend {
  font-size: medium;
  font-weight: bold;
  font-family: "Arial", sans-serif;
  margin-bottom: 1%;
}

#input-manipulation fieldset {
  font-size: smaller;
  font-weight: bold;
  border: none;
  margin-top: 5%;
  margin-right: 180px;
  position: relative;
}

#input-manipulation label {
  margin: 3px;
}

.edit-button {
  font-size: medium;
  margin-top: 2%;
  margin-left: 2%;
  padding-top: 0.875rem;
  padding-right: 1.75rem;
  padding-bottom: 0.9375rem;
  padding-left: 1.75rem;
  font-size: 0.8125rem;
  background-color: #008CBA;
  color: white;
  border-radius: 8px;
  font-size: 12px;
  border: 2px solid #ccc;
  outline: none;
  box-sizing: border-box;
  background: #008CBA;
  color: white;
}

.edit-button:hover {
  background-color: #82878b;
  opacity: 1;
  transform: translateY(0);
  transition-duration: .35s;
}

#toast {
  position: fixed;
  bottom: 20px;        
  right: 20px;       
  background-color: #e85146;
  color: white;
  padding: 12px 16px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1000;
}

.ts-wrapper {
  margin-bottom: 10px;
}

.ts-label {
  display: block;
  font-weight: bold;
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.ts-row {
  display: flex;
  gap: 0;
}

.ts-select {
  width: 100%;
  padding: 5px 8px;
  font-size: 0.88rem;
  font-family: Arial, sans-serif;
  border: 2px solid darkgray;
  border-radius: 5px;
  background: #fff;
  color: #222;
  cursor: pointer;
}

.ts-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px lightgray;
}

.ts-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: center;
  font-size: 0.75rem;
  color: #555;
  margin-top: 4px;
}

.ts-sep {
  color: #bbb;
}

.ts-beta {
  background: #e08c00;
  color: #fff;
  font-size: 0.65rem;
  font-weight: bold;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ts-status {
  min-height: 1.2em;
  font-size: 0.78rem;
  margin-top: 3px;
}

.ts-status--loading { color: #555; font-style: italic; }
.ts-status--success { color: #2a7a3b; font-weight: 600; }
.ts-status--error   { color: #c0392b; font-weight: 600; }

#advanced-container {
  margin-top: 2%;
  margin-left: 13px;
  font-size: medium;
}

#toggleAdvanced {
  color: #008CBA;
  font-style: italic;
  cursor: pointer;
  display: inline-block;
  font-size: smaller;
  font-size: 0.85rem;
}

#toggleAdvanced:hover {
  text-decoration: underline;
  color: #82878b;
}

.advanced-options {
  font-size: smaller;
  font-weight: bold;
  font-family: "Arial", sans-serif;
  padding: 5px;
  max-height: 0;
  overflow: hidden;
  transition: opacity 1.5s ease;
  opacity: 0;
}

.advanced-options.open {
  max-height: 500px;
  opacity: 1;
}

.save-default-btn {
  margin: 2px 0;
  padding: 2px 12px;
  font-size: 12px;
  border: 2px solid #ccc;
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  border-radius: 8px;
  outline: none;
  height: 32px;
  box-sizing: border-box;
  background: #008CBA;
  color: white;
}

.save-default-btn:hover {
  background-color: #82878b;
  opacity: 1;
  transform: translateY(0);
  transition-duration: .35s;
}

.params-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 220px;
  font-weight: lighter;
  font-family: "Arial", sans-serif;
}
/* ── Compare section ────────────────────────────────────────────────────────── */

#compare-section {
  margin-top: 10px;
}

.compare-divider {
  border: none;
  border-top: 1px solid #ddd;
  margin: 12px 0 10px;
}

.compare-upload {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 6px;
  background: #fafafa;
}

.compare-label {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  min-width: 42px;
}

.compare-btn {
  margin-top: 8px;
  padding: 6px 20px;
  font-size: 13px;
  border: 2px solid #5a78c6;
  border-radius: 8px;
  background: #5a78c6;
  color: white;
  cursor: pointer;
  outline: none;
  height: 34px;
  box-sizing: border-box;
}

.compare-btn:hover {
  background-color: #3f5aaa;
  border-color: #3f5aaa;
  transition-duration: .25s;
}

.compare-btn:disabled {
  background-color: #aaa;
  border-color: #aaa;
  cursor: default;
}
