/* EXIF viewer — extends tool-page.css shell.
   JS hooks: #exifFile, #exifDrop, #exifImage, #exifPanels, #exifFileMeta,
   #exifChips, #exifReport, #exifCount, #exifMode, #exifQuality,
   #exifQualityWrap, #exifClean, #exifStatus, #exifError */

.exif-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: clamp(28px, 5vw, 52px);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-sunken);
  text-align: center;
  cursor: pointer;
  transition:
    background-color var(--t-fast) ease-out,
    border-color var(--t-fast) ease-out;
}
.exif-drop:hover,
.exif-drop.is-over {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.exif-drop > i {
  color: var(--accent);
  font-size: 26px;
  line-height: 1;
}
.exif-drop__title {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}
.exif-drop__hint {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.6;
}

.exif-panels { align-items: start; }
.exif-drop[hidden],
.exif-panels[hidden] { display: none; }

.exif-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  max-height: 380px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(45deg, var(--surface-sunken) 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(-45deg, var(--surface-sunken) 25%, transparent 25%) 0 8px / 16px 16px,
    linear-gradient(45deg, transparent 75%, var(--surface-sunken) 75%) 8px -8px / 16px 16px,
    linear-gradient(-45deg, transparent 75%, var(--surface-sunken) 75%) -8px 0 / 16px 16px,
    var(--surface);
}
.exif-preview img {
  display: block;
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
}

.exif-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.exif-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-sunken);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.5;
  text-transform: uppercase;
}
.exif-chip i { font-size: 10px; }
.exif-chip--warn {
  border-color: var(--warning);
  background: var(--warning-soft);
  color: var(--warning);
}
.exif-chip--ok {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.exif-tools {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
}
.exif-tools .us-tool-option { justify-content: space-between; }
.exif-tools .us-tool-btn { width: 100%; }
.exif-tools input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
@media (min-width: 480px) {
  .exif-tools .us-tool-option { justify-content: flex-start; }
  .exif-tools .us-tool-option select { margin-left: auto; }
  .exif-tools .us-tool-btn { width: auto; align-self: flex-start; }
}

.exif-report {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-height: 540px;
  padding-right: 4px;
  overflow-y: auto;
}
.exif-group h3 {
  margin: 0;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.07em;
  line-height: 1.4;
  text-transform: uppercase;
}
.exif-group dl {
  display: flex;
  flex-direction: column;
  margin: 6px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
}
.exif-row {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface-sunken);
}
.exif-row + .exif-row { border-top: 1px solid var(--line); }
.exif-row dt {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
}
.exif-row dd {
  margin: 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.55;
  word-break: break-word;
}
.exif-gps-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.exif-gps-link:hover { color: var(--accent-strong); }

.exif-empty {
  margin: 0;
  padding: var(--space-5);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 899px) {
  .exif-report { max-height: none; }
}
