* {
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  font-family: "Inter", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f9f9f9;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
}

.header {
  display: flex;
  justify-content: space-between; /* Space between the elements */
  align-items: center; /* Vertically center the elements */
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  width: 100%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header .home-link {
  display: flex;
  align-items: center;
}

.header .home-icon {
  height: 100%; /* Shrink to fit the header height */
  max-height: 40px; /* Limit the maximum height */
  width: auto; /* Maintain aspect ratio */
}

.header .title {
  font-size: 1.5em;
  font-weight: bold;
  text-align: center;
  flex-grow: 1; /* Allow the title to take up remaining space */
}

.header .user {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap; /* Prevent wrapping */
}

.header .user a {
  color: white;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: lighter;
}

.header .user a:hover {
  text-decoration: underline;
}
label {
  font-weight: 600;
  display: block;
}

/* General input styles */
select,
input,
textarea,
button {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

/* Override for inputs in the Leaflet side panel */
.leaflet-panel-layers input {
  width: auto; /* Reset width to auto */
  padding: 5px; /* Adjust padding if needed */
  margin: 0; /* Reset margin */
  border-radius: 4px; /* Optional: Adjust border radius */
}

button {
  margin-top: 20px;
  background-color: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}
button:hover {
  background-color: #0056b3;
}
.page {
  width: 100%;
  height: 100%;
  flex-direction: column;
  /* display: flex; */
}
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1100; /* Increased to be above Leaflet controls */
  min-height: 40px; /* Ensure footer has minimum height */
  background-color: white; /* Ensure footer has background to cover content */
  border-top: 1px solid #dee2e6; /* Add border for better separation */
}

.content {
  width: 100%;
  display: flex;
  /* Ensure content doesn't extend behind fixed footer */
  padding-bottom: 0;
  margin-bottom: 0;
  flex-direction: row;
  flex: 8 1 auto;
  flex-wrap: nowrap;
}

.sidebar {
  width: 10%;
  min-width: 320px;
  max-width: 10%;
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-start;
  flex-direction: column;
  padding: 10px;
  overflow-y: auto;
}

.main {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  flex: 9 1 auto;
  height: 100%;
  position: relative;
}

h3 {
  margin-block-end: 0px;
  border-bottom: 1px solid black;
}

.column {
  display: flex;
  flex-direction: column;
}

.progress_bar {
  position: fixed;
  top: 0; /* Adjust this value as needed */
  left: 0;
  width: 100%;
  padding: 10px;
  z-index: 1000;
}

.scrolling-image {
  position: absolute;
  width: 100%; /* Double the width to allow scrolling */
  height: 25px;
  top: 0;
  left: 0;
  animation: scroll-image 10s linear infinite;
}
.comment-text {
  white-space: pre-wrap;
}
@keyframes scroll-image {
  from {
    left: -10%;
  }
  to {
    left: 100%;
  }
}

.popup-header {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  align-items: center;
  padding: 5px;
  background-color: #f1f1f1;
  border-bottom: 1px solid black;
}
.popup-title {
  font-size: 1em;
  font-weight: 600;
  margin-left: 10px;
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.tag-title {
  font-size: 1em;
  font-weight: bold;
  margin-left: 10px;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.survey-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.survey-entry {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: start;
  margin: 2px;
}

.survey-entry label {
  font-size: 1em;
  font-weight: normal;
}

.survey-entry .survey-missing {
  font-weight: normal;
  font-size: 1em;
  color: red;
}
.tag_popup {
  height: 100%;
}
.tag_popup > * {
  margin: 2px;
}

.edit_pane {
  height: 100%;
}

/* Version footer styling */
.version-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
  padding: 8px 20px;
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  font-size: 0.9rem;
  color: #6c757d;
}

.version-footer-item {
  flex: 1 1 0;
  font-size: 0.9rem;
}

.version-footer-item.version {
  text-align: left;
}

.version-footer-item.copyright {
  text-align: center;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 45px;
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, 420px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.toast {
  background: #0f172a;
  color: #f8fafc;
  padding: 12px 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.4);
  border-left: 4px solid #38bdf8;
  width: 100%;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-left-color: #22c55e;
}

.toast.error {
  border-left-color: #f87171;
}

.toast.warning {
  border-left-color: #facc15;
}

.toast.info {
  border-left-color: #38bdf8;
}

.toast-text {
  flex: 1;
}

.toast-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toast-ack {
  border: none;
  background: rgba(148, 163, 184, 0.15);
  color: inherit;
  width: 28px;
  height: 28px;
  margin: 0px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s ease;
}

.toast-ack:hover,
.toast-ack:focus-visible {
  background: rgba(148, 163, 184, 0.35);
  outline: none;
}

.toast-history-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0px 3px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.6);
  color: #f8fafc;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  width: auto;
  flex-shrink: 0;
  margin-top: 0;
}

.toast-history-button:hover {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(255, 255, 255, 0.4);
}

.toast-history-button:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.toast-history-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
}

.toast-history-count {
  font-size: 0.85rem;
  font-weight: 600;
}

.toast-history-panel {
  position: fixed;
  bottom: 240px;
  left: 50%;
  transform: translateX(-50%);
  width: min(360px, 92vw);
  max-height: 50vh;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 12px;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.2);
  z-index: 10000;
  display: flex;
  flex-direction: column;
}

.toast-history-panel[hidden] {
  display: none;
}

.toast-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  font-weight: 600;
  gap: 12px;
}

.toast-history-controls {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.toast-history-close,
.toast-history-clear {
  background: rgba(148, 163, 184, 0.15);
  border: none;
  color: inherit;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.toast-history-close:hover,
.toast-history-clear:hover,
.toast-history-close:focus-visible,
.toast-history-clear:focus-visible {
  background: rgba(148, 163, 184, 0.3);
  outline: none;
}

.toast-history-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.toast-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

.toast-history-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-history-item:last-child {
  border-bottom: none;
}

.toast-history-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.toast-history-info {
  display: flex;
  flex-direction: row-reverse;
  gap: 2px;
}

.toast-history-type {
  font-weight: 600;
}

.toast-history-meta-actions {
  display: inline-flex;
  justify-content: flex-end;
}

.toast-history-delete {
  background: none;
  border: none;
  color: inherit;
  font-size: 1rem;
  cursor: pointer;
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 50%;
  transition: background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toast-history-delete:hover,
.toast-history-delete:focus-visible {
  background: rgba(148, 163, 184, 0.2);
  outline: none;
}

.toast-history-message {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.toast-history-empty {
  padding: 20px;
  text-align: center;
  color: #94a3b8;
}

.toast-history-item.success {
  border-left: 3px solid #22c55e;
}

.toast-history-item.error {
  border-left: 3px solid #f87171;
}

.toast-history-item.warning {
  border-left: 3px solid #facc15;
}

.toast-history-item.info {
  border-left: 3px solid #38bdf8;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
