/* EXIF & GPS Metadata Remover (/tools/exif-metadata-remover/), 2026-11-29.
   Uses tokens from ft-shell-20261106.css and components from ft-tool-20261106.css.
   Reserves preview, map pin card, check-card, and table heights from first paint so CLS stays 0.000. */

.ft-tool .ft-fields {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), minmax(0, 1fr)));
}

.ft-tool .ft-field,
.ft-tool fieldset,
.ft-tool .ft-panel,
.ft-tool .ft-stack,
.ft-tool .ft-inputgroup {
  min-width: 0;
  max-width: 100%;
}

.ft-tool .ft-select {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ft-tool input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
.ft-tool select,
.ft-tool textarea,
.ft-tool .ft-input,
.ft-tool .ft-select {
  font-size: max(16px, 1rem);
  min-height: 44px;
}

.ft-tool .ft-btn {
  min-width: 44px;
  min-height: 44px;
  height: auto;
  padding-block: 0.48rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.emr-filebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ft-space-2) var(--ft-space-3);
  margin-top: calc(-1 * var(--ft-space-2));
}

.emr-fileinfo {
  flex: 1 1 13rem;
  min-width: 0;
  margin: 0;
  color: var(--ft-ink-2);
  font-size: var(--ft-text-sm);
  overflow-wrap: anywhere;
}

.emr-fileinfo strong {
  color: var(--ft-ink);
  font-weight: 650;
}

.emr-presets {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ft-space-2);
}

.emr-presets__label {
  margin: 0;
  color: var(--ft-ink);
  font-size: var(--ft-text-sm);
  font-weight: 600;
}

.emr-presets__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ft-space-2);
}

.emr-preset {
  justify-content: flex-start;
  text-align: left;
}

.emr-preset[aria-pressed="true"] {
  border-color: var(--ft-accent);
  background: var(--ft-accent-soft);
  color: var(--ft-ink);
}

.emr-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ft-space-3);
  min-width: 0;
  margin: 0;
  padding: var(--ft-space-4) 0 0;
  border: 0;
  border-top: 1px solid var(--ft-line);
}

.emr-group__legend {
  float: left;
  width: 100%;
  margin: 0 0 var(--ft-space-1);
  padding: 0;
  color: var(--ft-ink);
  font-size: var(--ft-text-md);
  font-weight: 650;
}

.emr-group__legend + * {
  clear: both;
}

.emr-check {
  display: flex;
  align-items: center;
  gap: var(--ft-space-2);
  min-width: 44px;
  min-height: 44px;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius);
  background: var(--ft-surface);
  color: var(--ft-ink);
  line-height: 1.35;
  box-sizing: border-box;
  cursor: pointer;
}

.emr-check input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
}

.emr-check span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.emr-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
}

.emr-pill {
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius);
  background: var(--ft-surface);
  color: var(--ft-ink-2);
  font: inherit;
  font-size: var(--ft-text-sm);
  overflow-wrap: anywhere;
  cursor: pointer;
}

.emr-pill[aria-pressed="true"] {
  border-color: var(--ft-accent);
  background: var(--ft-accent-soft);
  color: var(--ft-ink);
  font-weight: 650;
}

/* Visual Location & Privacy Pin Card */
.emr-pincard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ft-space-3);
  padding: var(--ft-space-3);
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius);
  background: var(--ft-surface);
  min-width: 0;
}

.emr-pincard__visuals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), minmax(0, 1fr)));
  gap: var(--ft-space-3);
  min-width: 0;
}

.emr-thumb-box,
.emr-map-box {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--ft-radius);
  border: 1px solid var(--ft-line);
  overflow: hidden;
  min-width: 0;
}

.emr-thumb-box {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #2b5894 0%, #c98a5f 52%, #1d4d7c 78%, #a68c6d 100%);
}

.emr-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.emr-thumb-badge {
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
  max-width: calc(100% - 0.9rem);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(15, 23, 32, 0.78);
  color: #f8fafc;
  font-size: var(--ft-text-xs);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emr-map-box {
  background: color-mix(in srgb, var(--ft-surface) 82%, var(--ft-accent-soft));
}

.emr-map-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.emr-map-grid {
  stroke: var(--ft-line);
  stroke-width: 0.75;
  fill: none;
}

.emr-map-equator {
  stroke: var(--ft-ink-2);
  stroke-opacity: 0.35;
  stroke-width: 0.85;
  stroke-dasharray: 3 3;
  fill: none;
}

.emr-map-land {
  fill: color-mix(in srgb, var(--ft-ink) 14%, transparent);
  stroke: color-mix(in srgb, var(--ft-ink) 26%, transparent);
  stroke-width: 0.65;
}

.emr-map-crosshair {
  stroke: #dc2626;
  stroke-width: 1;
  stroke-dasharray: 2.5 2.5;
  opacity: 0.75;
}

.emr-map-halo {
  fill: rgba(220, 38, 38, 0.22);
}

.emr-map-dot {
  fill: #dc2626;
  stroke: #ffffff;
  stroke-width: 1.5;
}

.emr-map-box[data-gps="none"] .emr-map-crosshair,
.emr-map-box[data-gps="none"] .emr-map-halo,
.emr-map-box[data-gps="none"] .emr-map-dot {
  display: none;
}

.emr-pincard__meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.35rem;
  min-width: 0;
}

.emr-pinline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.6rem;
  margin: 0;
  font-size: var(--ft-text-sm);
  color: var(--ft-ink);
  overflow-wrap: anywhere;
}

.emr-pinpill {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  font-size: var(--ft-text-xs);
  font-weight: 650;
  border: 1px solid var(--ft-line);
}

.emr-pinpill--warn {
  background: rgba(220, 38, 38, 0.11);
  border-color: rgba(220, 38, 38, 0.35);
  color: var(--ft-ink);
}

.emr-pinpill--ok {
  background: var(--ft-accent-soft);
  border-color: var(--ft-accent);
  color: var(--ft-ink);
}

.emr-pinsub {
  margin: 0;
  font-size: var(--ft-text-xs);
  color: var(--ft-ink-2);
  overflow-wrap: anywhere;
}

/* Before vs After Live Re-Open Check Card */
.emr-checkcard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ft-space-3);
  padding: var(--ft-space-3);
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius);
  background: var(--ft-surface);
  min-width: 0;
}

.emr-checkcard__head {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.emr-checkcard__title {
  margin: 0;
  color: var(--ft-ink);
  font-size: var(--ft-text-md);
  font-weight: 650;
}

.emr-transition {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0;
  padding: 0.45rem 0.65rem;
  border-radius: var(--ft-radius);
  background: var(--ft-accent-soft);
  border: 1px solid color-mix(in srgb, var(--ft-accent) 38%, var(--ft-line));
  color: var(--ft-ink);
  font-size: var(--ft-text-sm);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.emr-transition__arrow {
  color: var(--ft-ink-2);
  font-weight: 700;
}

.emr-stats {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), minmax(0, 1fr)));
}

/* Metadata Inspection Table */
.emr-tags-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ft-space-2);
  min-width: 0;
}

.emr-tags-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem var(--ft-space-2);
}

.emr-tags-title {
  margin: 0;
  font-size: var(--ft-text-sm);
  font-weight: 650;
  color: var(--ft-ink);
}

.emr-tags-count {
  margin: 0;
  font-size: var(--ft-text-xs);
  color: var(--ft-ink-2);
}

.emr-table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius);
  background: var(--ft-surface);
}

.emr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--ft-text-xs);
}

.emr-table th,
.emr-table td {
  padding: 0.45rem 0.6rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--ft-line);
  overflow-wrap: anywhere;
}

.emr-table th {
  font-weight: 650;
  color: var(--ft-ink);
  background: color-mix(in srgb, var(--ft-surface) 88%, var(--ft-ink) 4%);
  white-space: nowrap;
}

.emr-table tbody tr:last-child td {
  border-bottom: 0;
}

.emr-tag-group {
  font-weight: 600;
  color: var(--ft-ink-2);
  white-space: nowrap;
}

.emr-tag-state {
  font-weight: 650;
  white-space: nowrap;
  color: var(--ft-accent);
}

.emr-after-example {
  margin-top: var(--ft-space-3);
}

@media (max-width: 520px) {
  .emr-pincard,
  .emr-checkcard {
    padding: var(--ft-space-2);
  }
  .emr-table th,
  .emr-table td {
    padding: 0.38rem 0.45rem;
  }
}
