.lk-facility-label {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 3px;
  color: #111;
  font: 700 11px/1.1 Arial, sans-serif;
  padding: 1px 3px;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.lk-facility-popup {
  min-width: 300px;
  max-width: 360px;
}

.lk-facility-popup__title {
  font-weight: 700;
  margin-bottom: 6px;
}

.lk-facility-popup__meta {
  color: #666;
  font-size: 12px;
  margin: -2px 0 8px;
}

.lk-facility-popup__grid {
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr 1fr;
}

.lk-facility-popup__field {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  gap: 2px;
  margin: 0;
}

.lk-facility-popup__field--wide {
  grid-column: 1 / -1;
}

.lk-facility-popup__field span {
  color: #555;
  font-weight: 700;
}

.lk-facility-popup__field input,
.lk-facility-popup__field select,
.lk-facility-popup__field textarea {
  border: 1px solid #c9ced6;
  border-radius: 4px;
  font: inherit;
  padding: 4px 6px;
  width: 100%;
}

.lk-facility-popup [name="status_code"] {
  font-weight: 700;
}

.lk-facility-popup--regular [name="status_code"] {
  background: #fff;
  color: #111827;
}

.lk-facility-popup--disturbance [name="status_code"] {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.lk-facility-popup--major-disturbance [name="status_code"] {
  background: #fee2e2;
  border-color: #dc2626;
  color: #991b1b;
}

.lk-facility-popup__field textarea {
  resize: vertical;
}

.lk-facility-popup__fclass-row {
  display: flex;
  gap: 4px;
}

.lk-fclass-btn {
  background: #fff;
  border: 1px solid #c9ced6;
  border-radius: 4px;
  cursor: pointer;
  flex: 1 1 0;
  line-height: 0;
  padding: 2px;
}

.lk-fclass-btn img {
  display: block;
  filter: grayscale(100%);
  height: 18px;
  object-fit: contain;
  opacity: 0.35;
  transition: opacity 0.15s ease, filter 0.15s ease;
  width: 100%;
}

.lk-fclass-btn:hover img {
  opacity: 0.6;
}

.lk-fclass-btn[aria-pressed="true"] {
  background: #f3f4f6;
  border-color: #111827;
}

.lk-fclass-btn[aria-pressed="true"] img {
  filter: none;
  opacity: 1;
}

.lk-facility-popup__notes {
  margin-top: 6px;
}

.lk-facility-popup__notes-title {
  color: #555;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 3px;
}

.lk-facility-popup__notes-list {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 11px;
  max-height: 130px;
  overflow-y: auto;
  padding: 4px 6px;
}

.lk-facility-popup__notes-empty {
  color: #9ca3af;
  font-style: italic;
}

.lk-facility-popup__note-entry {
  border-bottom: 1px solid #e5e7eb;
  padding: 3px 0;
}

.lk-facility-popup__note-entry:last-child {
  border-bottom: none;
}

.lk-facility-popup__note-time {
  color: #6b7280;
  display: block;
  font-weight: 600;
}

.lk-facility-popup__note-text {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
}

.lk-facility-popup__actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
}

.lk-facility-popup__message {
  color: #166534;
  font-size: 12px;
  font-weight: 700;
}

.lk-facility-popup__message--error {
  color: #991b1b;
}

.lk-facility-popup__row {
  display: flex;
  gap: 8px;
  margin: 2px 0;
}

.lk-facility-popup__row dt {
  color: #555;
  flex: 0 0 92px;
  font-weight: 600;
  margin: 0;
}

.lk-facility-popup__row dd {
  flex: 1 1 auto;
  margin: 0;
}

.lk-facility-popup__status {
  border-radius: 999px;
  display: inline-block;
  font-weight: 700;
  padding: 2px 8px;
}

.lk-facility-popup__hazard--green,
.lk-facility-popup__status--regular,
.lk-facility-popup__status--setup_done,
.lk-facility-popup__status--checked {
  background: #dcfce7;
  color: #166534;
}

.lk-facility-popup__hazard--yellow,
.lk-facility-popup__status--disturbance,
.lk-facility-popup__status--setup_open {
  background: #fef3c7;
  color: #92400e;
}

.lk-facility-popup__hazard--red,
.lk-facility-popup__status--major_disturbance,
.lk-facility-popup__status--issue {
  background: #fee2e2;
  color: #991b1b;
}

.lk-facility-popup__status--confirmed {
  background: #dbeafe;
  color: #1e40af;
}

.lk-facility-popup__status--planned,
.lk-facility-popup__hazard--unknown {
  background: #f3f4f6;
  color: #374151;
}
