/* Geotag photos. Map chrome is in map-shell.css / map-page.css.
   3-step panel: add photos → set location → download. */

.geotag-body .dock-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.geotag-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
}

.geotag-chrome {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.geotag-dock .chip {
  background: var(--surface);
  min-height: 44px;
}

.geotag-dock .chip:hover,
.geotag-dock .chip.is-active,
.geotag-dock .chip[aria-pressed="true"] {
  background: var(--tint-strong);
}

.geotag-dock .chip:disabled,
.geotag-dock .chip:disabled:hover {
  background: var(--surface);
}

.geotag-dock .chip-quiet {
  min-height: 36px;
  font-size: 0.88rem;
}

.geotag-step {
  margin-top: 1.1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.geotag-step:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.geotag-step-label {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.geotag-step-hint {
  margin: 0.4rem 0 0;
  font-size: 0.92rem;
  line-height: 1.4;
  color: color-mix(in srgb, var(--text) 72%, transparent);
}

.geotag-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
  align-items: center;
}

.geotag-list-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.geotag-list-tools[hidden] {
  display: none;
}

.geotag-coords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.75rem;
  align-items: flex-end;
}

.geotag-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1 1 8rem;
}

.geotag-field--offset {
  flex: 1 1 8rem;
  margin-top: 0.65rem;
}

.geotag-field span {
  font-size: 0.85rem;
  font-weight: 650;
  color: color-mix(in srgb, var(--text) 72%, transparent);
}

.geotag-field input {
  min-height: 44px;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-family: var(--font-mono);
  width: 100%;
  box-sizing: border-box;
}

.geotag-track-details {
  margin-top: 0.85rem;
  padding: 0.55rem 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--tint);
}

.geotag-track-details > summary {
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 650;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.geotag-track-details[open] > summary {
  margin-bottom: 0.35rem;
}

.geotag-save-primary {
  font-weight: 700;
}

.geotag-link {
  margin: 1rem 0 0;
  font-size: 0.92rem;
}

.geotag-copy-placeholder {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--tint);
  color: color-mix(in srgb, var(--text) 78%, transparent);
}

.empty-hint {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: color-mix(in srgb, var(--text) 72%, transparent);
  text-align: center;
}

.photo-privacy {
  margin: 0.55rem 0 0;
  font-size: 0.92rem;
  line-height: 1.4;
  color: color-mix(in srgb, var(--text) 68%, transparent);
}

.photo-status {
  margin: 0.55rem 0 0;
  font-size: 0.92rem;
  line-height: 1.4;
}

.photo-status:empty {
  display: none;
}

.photo-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.photo-list-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border-top: 1px solid var(--line);
}

.photo-list li:first-child .photo-list-row {
  border-top: 0;
}

.photo-list-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0.45rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.photo-list-item:hover,
.photo-list-item:focus-visible {
  background: var(--tint);
  outline: none;
}

.photo-list-item:disabled {
  cursor: default;
}

.photo-list-check {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
}

.photo-thumb {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--tint);
  border: 1px solid var(--line);
}

.photo-thumb--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: color-mix(in srgb, var(--text) 45%, transparent);
  font-size: 0.7rem;
  font-weight: 650;
}

.photo-meta {
  flex: 1 1 auto;
  min-width: 0;
}

.photo-name {
  display: block;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.3;
  word-break: break-word;
}

.photo-date {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: color-mix(in srgb, var(--text) 68%, transparent);
}

.photo-remove {
  flex: 0 0 auto;
  margin-left: auto;
}

.photo-marker-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--surface);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--text) 28%, transparent);
  background: var(--tint);
}

.photo-marker-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-marker-icon--pending {
  border-color: var(--brand);
}

.geotag-pending-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--surface);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--text) 28%, transparent);
}

.photo-popup {
  min-width: 12rem;
  max-width: 16rem;
}

.photo-popup-thumb {
  display: block;
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  background: var(--tint);
}

.photo-popup-name {
  margin: 0 0 0.35rem;
  font-weight: 700;
  word-break: break-word;
}

.photo-popup-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.35;
}

.photo-popup-k {
  display: block;
  font-size: 0.8rem;
  font-weight: 650;
  color: color-mix(in srgb, var(--text) 68%, transparent);
}

.photo-popup-v {
  font-family: var(--font-mono);
  word-break: break-word;
}

.marker-cluster {
  background: color-mix(in srgb, var(--brand) 22%, transparent);
}

.marker-cluster div {
  background: color-mix(in srgb, var(--brand) 72%, transparent);
  color: #fff;
  font-weight: 700;
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: color-mix(in srgb, var(--brand) 22%, transparent);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: color-mix(in srgb, var(--brand) 72%, transparent);
}

@media (max-width: 720px) {
  body.is-map .map-app:has(.geotag-dock) .leaflet-bottom.leaflet-right {
    top: auto;
    bottom: 0;
  }

  .geotag-coords {
    flex-direction: column;
  }

  .geotag-field,
  .geotag-field--offset {
    flex: 1 1 auto;
    width: 100%;
  }
}
