/* Нижняя карточка объекта (Flightradar-стиль) */
.object-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 700;
  display: flex;
  flex-direction: column;
  max-height: min(62vh, 540px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border-radius: 22px 22px 0 0;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-bottom: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 42px),
    rgba(10, 14, 22, 0.94);
  box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  transform: translateY(110%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.28s ease, visibility 0.28s ease;
}

.object-sheet.is-open {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.object-sheet__chrome {
  position: relative;
  flex-shrink: 0;
  padding: 10px 16px 4px;
  touch-action: none;
}

.object-sheet__handle {
  width: 40px;
  height: 4px;
  margin: 0 auto 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.object-sheet__body {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 16px;
}

#app.sheet-open .leaflet-bottom {
  bottom: calc(var(--object-sheet-h, 240px) + 8px);
  transition: bottom 0.28s ease;
}

.uav-popup {
  min-width: 0;
  max-width: none;
}

.uav-popup__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 12px;
}

.uav-popup__titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.uav-popup__id {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: #f8fafc;
}

.uav-popup__type {
  font-size: 12px;
  font-weight: 600;
  color: var(--hint, #8b96a8);
}

.uav-popup__type--title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: #f8fafc;
}

.uav-popup__badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  margin-top: 4px;
}

.uav-popup__badge--foe {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
}

.uav-popup__badge--friend {
  color: #86efac;
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.4);
}

.uav-popup__badge--unknown {
  color: #fde68a;
  background: rgba(245, 193, 74, 0.14);
  border-color: rgba(245, 193, 74, 0.3);
}

.uav-popup__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.uav-popup__stat {
  min-width: 0;
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  text-align: center;
}

.uav-popup__stat-value {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uav-popup__stat-value--modem {
  color: #5eead4;
  font-size: 14px;
}

.uav-popup__stat-label {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hint, #8b96a8);
}

.uav-popup__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.uav-popup__grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 12px;
  font-size: 12px;
}

.uav-popup__label {
  color: var(--hint, #8b96a8);
  white-space: nowrap;
}

.uav-popup__value {
  color: var(--text, #f3f6fb);
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.uav-popup__value--muted {
  color: var(--hint, #8b96a8);
  font-weight: 500;
}

.uav-popup__mute-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 10px;
}

.uav-popup__mute-label {
  font-size: 13px;
  font-weight: 600;
  color: #d5dce8;
}

.uav-popup__mute-switch {
  appearance: none;
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.32);
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.uav-popup__mute-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f8fafc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease;
}

.uav-popup__mute-switch[aria-checked="true"] {
  background: var(--accent, #2dd4bf);
  box-shadow: 0 0 0 3px var(--accent-soft, rgba(45, 212, 191, 0.16));
}

.uav-popup__mute-switch[aria-checked="true"]::after {
  transform: translateX(18px);
}

.uav-popup__mute-switch:disabled {
  opacity: 0.55;
  cursor: default;
}

.uav-popup__comments {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.uav-popup__comments-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hint, #8b96a8);
}

.uav-popup__comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 160px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.uav-popup__comments-empty {
  font-size: 12px;
  color: var(--muted, #6f7b8e);
}

.uav-popup__comments-stub {
  font-size: 12px;
  line-height: 1.4;
  color: var(--hint, #8b96a8);
  padding: 8px;
  border-radius: 10px;
  background: rgba(8, 12, 18, 0.55);
  border: 1px dashed var(--border-strong, rgba(255, 255, 255, 0.16));
}

.uav-popup__comment {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(8, 12, 18, 0.55);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}

.uav-popup__comment-time {
  font-size: 10px;
  color: var(--muted, #6f7b8e);
  margin-bottom: 5px;
}

.uav-popup__comment-text {
  font-size: 12px;
  color: var(--text, #f3f6fb);
  word-break: break-word;
}

.uav-popup__comment-form {
  display: flex;
  gap: 10px;
}

.uav-popup__comment-input {
  flex: 1;
  min-width: 0;
  appearance: none;
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.16));
  background: rgba(8, 12, 18, 0.8);
  color: #f8fafc;
  border-radius: 10px;
  padding: 9px 10px;
  font: 400 13px/1.3 var(--font, ui-sans-serif, system-ui, sans-serif);
}

.uav-popup__comment-input::placeholder {
  color: var(--muted, #6f7b8e);
}

.uav-popup__comment-input:focus {
  outline: none;
  border-color: rgba(45, 212, 191, 0.7);
  box-shadow: 0 0 0 3px var(--accent-soft, rgba(45, 212, 191, 0.16));
}

.uav-popup__comment-send {
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 9px 12px;
  background: var(--accent, #2dd4bf);
  color: #042f2e;
  font: 700 11px/1 var(--font, ui-sans-serif, system-ui, sans-serif);
  white-space: nowrap;
  cursor: pointer;
}

.uav-popup__comment-send:disabled {
  opacity: 0.55;
  cursor: default;
}

.uav-popup__comment-status {
  font-size: 11px;
  color: var(--hint, #8b96a8);
  min-height: 1em;
}

.uav-popup__comment-status--ok {
  color: var(--ok, #34d399);
}

.uav-popup__comment-status--err {
  color: var(--danger, #fb7185);
}

.uav-popup__timer {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", "Courier New", monospace;
}
