:root {
  --default-font-size: 0.95rem;
  --icon-font-size: 14px;
  --form-btn-bg-color: #2da879;
  --form-btn-hover: #24795e;
}

/* MAP */
.map-container {
  position: relative;
  width: 100%;
  max-width: 2200px; /* or 100vw for full width */
  margin: 0 auto;
}

.map-container svg {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
}

#map-container.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: #fff;
  overflow: auto; /* Enables scrolling */
  display: flex;
  justify-content: center;
  align-items: center;
}
#map-container.fullscreen img {
  /* No max-width/max-height, image will be at its natural size */
  display: block;
}

.fullscreen-btn,
.exit-fullscreen-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.2s;
}

.fullscreen-btn:hover,
.exit-fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

/* MAP LABELS AND ICONS */
.trail-area {
  fill: transparent;
  stroke: none;
  /* transition: fill 0.1s ease; */
  cursor: pointer;
}

.trail-area:hover {
  fill: rgba(255, 246, 79, 0.594);
}

.tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 10px 14px;
  font-size: var(--default-font-size);
  border-radius: 8px;
  display: none;
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
  transform: translate(-50%, -100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.tooltip::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  font-size: var(--icon-font-size); /* Ensures the icon scales properly */
  line-height: 1;
}

.status-open {
  background-color: #00cc66;
}

.status-closed {
  background: none; /* Remove background for closed */
}

.status-closed::before {
  content: "✖";
  font-size: var(--icon-font-size);
  color: #ff4d4d;
  display: block;
  width: 100%;
  text-align: center;
  line-height: 1;
}

/* TABLE */
#trail-status-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Barlow", sans-serif;
  font-size: 1rem;
  /* margin-top: 1.5rem; */
  background-color: #fff;
  border: 1px solid #cddbe3;
}

#trail-status-table th,
#trail-status-table td {
  /* padding: 12px 14px; */
  padding: 8px 16px;
  text-align: left;
  border-bottom: 1px solid #e3eff4;
}

#trail-status-table thead {
  background-color: #e5f4f8;
  color: #00465c;
  text-transform: uppercase;
  font-size: 1.1rem;
  font-weight: 600;
}

/* #trail-status-table tbody tr:hover {
  background-color: #f0fafd;
} */

#trail-status-table input.edit,
#trail-status-table select.edit {
  width: 100%;
  padding: 6px;
  font-size: var(--default-font-size);
  border: 1px solid #ccd8dd;
  border-radius: 4px;
}

#trail-status-table input.trail-name {
  width: 95% !important;
}

#trail-status-table .name-col {
  width: 70%;
}

#trail-status-table .status-col {
  width: 25%;
}

#trail-status-table .delete-col {
  width: 5%;
}

#trail-status-table .delete-trigger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

#trail-status-table .edit-only img {
  width: 25px;
  height: 25px;
  transition: filter 0.2s ease;
}

#trail-status-table .edit-only .delete-trigger:hover {
  filter: invert(15%) sepia(47%) saturate(6143%) hue-rotate(354deg)
    brightness(87%) contrast(86%);
}

/* FORM */
#edit-btn,
#save-btn,
#cancel-btn {
  background-color: var(--form-btn-bg-color);
  color: #fff;
  border: none;
  padding: 8px 16px;
  margin-right: 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: var(--default-font-size);
  cursor: pointer;
}

#save-btn:hover,
#cancel-btn:hover,
#edit-btn:hover {
  background-color: var(--form-btn-hover);
}

.trail-form {
  /* font-family: sans-serif; */
  margin-top: 1rem;
}

.trail-form .trail-input,
.trail-form .trail-select {
  /* width: 30%; */
  max-width: 550px;
  padding: 6px 8px;
  margin-bottom: 8px;
  font-size: var(--default-font-size);
  border: 1px solid #ccc;
  border-radius: 4px;
}

.trail-form .trail-select {
  width: 6rem !important;
  margin-left: 3px;
  margin-right: 3px;
}

.trail-form .trail-btn {
  padding: 6px 12px;
  font-size: var(--default-font-size);
  background-color: var(--form-btn-bg-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.trail-form .trail-btn:hover {
  background-color: var(--form-btn-hover);
}

/* TOAST MESSAGE */
.trail-toast {
  position: fixed;
  top: 40px;
  right: 5px;
  z-index: 9999;
  min-width: 220px;
  max-width: 90vw;
  padding: 16px 28px;
  border-radius: 6px;
  color: #fff;
  font-weight: bold;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  background: #222;
  opacity: 0.96;
  animation: fadein 0.5s;
  pointer-events: none; /* so it doesn't block clicks below */
}

.trail-toast-success {
  background: #28a745;
}

.trail-toast-error {
  background: #dc3545;
}

@keyframes fadein {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 0.96;
    transform: translateY(0);
  }
}
