/* ==========================================================================
   TOOL BLOCK START - exif-remover
   exifremover.css - EXIF Remover
   UnitConverterTool.com | Silo: Image Tools. Accent #4a90ff, hover #3a7fee.
   Built from tool-build.md sections 1, 3, 3c, 3d, 3e, 3f, 3g, 3h, 3h-cloud
   and 3i, ported from the exam-form-photo donor.

   DROPPED FROM THE DONOR, because this tool has none of them:
     - the whole crop stage, guide overlay, filmstrip and Cropper override block
     - the aspect lock, preset cards and the ink slider
     - the progress/size-compare pair is kept, because a 100 MB TIFF genuinely
       takes long enough to need a bar

   ADDED: the key/value metadata table. Two columns, sectioned by full-width
   colspan header rows that pick up the existing .uct-table th styling. No new
   class was invented for the group titles.

   THE TWO-COLUMN TABLE RULE (3g, amended 9 Aug 2026). Not a deviation:

     3 or more columns -> keep min-width: 480px and let .uct-table-wrap scroll.
                          The wrapper scrolling is the deliberate safety valve.
                          Assert the wrapper SCROLLS and the table is fully
                          reachable, not that it fits.
     exactly 2 columns -> drop the min-width, use table-layout: fixed, let it
                          FIT. Assert wrapper.scrollWidth <= clientWidth.

   This table is label-and-value, so it is the two-column case. Values are read
   top to bottom, and a page holding fifteen of these would otherwise demand a
   separate horizontal scroll gesture per table, losing content each time.
   The wrapper keeps overflow-x: auto as a backstop; it should never scroll.

   NOTE FOR THE NEXT BUILD: do NOT carry this table CSS to dpi-checker. Both of
   its tables are 3-plus columns, so they keep min-width: 480px and scroll.
   ========================================================================== */

/* --------------------------------------------------------------------------
   3a. ROOT AND HEADING
   -------------------------------------------------------------------------- */

.uct-tool {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  font-family: 'DM Sans', sans-serif;
  color: #e5e7eb;
  /* NEVER set a background here. The page is already #0A0F1C. */
}
.uct-tool_heading { text-align: center; margin-bottom: 20px; }
.uct-tool_heading h1 {
  font-size: 32px; font-weight: 700; color: #fff; margin: 0 0 10px;
}
.uct-tool_description {
  font-size: 15px; color: #9ca3af; margin: 0; line-height: 1.6;
}

/* --------------------------------------------------------------------------
   3b. LAYOUT
   -------------------------------------------------------------------------- */

.uct-tool-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}
/* min-width: 0 lets a grid column shrink below its content's min size. This
 * tool has no Cropper, but the metadata table is exactly the kind of wide
 * content that would otherwise prop the column open on a phone rotation. */
.uct-tool-main, .uct-tool-sidebar { min-width: 0; }
@media (max-width: 1024px) {
  .uct-tool-layout { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   3c. UPLOAD AREA
   -------------------------------------------------------------------------- */

.uct-upload-area {
  background: #1a1f2e;
  border: 2px dashed #3a4258;
  border-radius: 12px;
  padding: 40px 24px;
  text-align: center;
  transition: border-color .2s ease, background .2s ease;
}
.uct-upload-area.drag-over {
  border-color: #4a90ff;
  background: #1e2538;
}
.uct-upload-area h3 {
  font-size: 18px; font-weight: 600; color: #e5e7eb; margin: 16px 0 6px;
}
.uct-upload-area p { font-size: 14px; color: #9ca3af; margin: 0 0 14px; }
.upload-icon svg { stroke: #4a90ff; }
.uct-hidden-input { display: none; }
.uct-tool_drop-text { font-size: 13px; color: #6b7280; margin-top: 14px; }

.uct-trust-strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid #2a3348;
}
.uct-trust-strip span { font-size: 12px; color: #9ca3af; }

/* WCAG AA. #6b7280 is only 3.96:1 on #0A0F1C and fails. */
.uct-helper-text { font-size: 13px; color: #9ca3af; margin: 10px 0 0; line-height: 1.6; }

/* The expectation-setter above the layout grid is page-width helper text
 * rather than sidebar helper text. */
#expect-note-exif-remover {
  max-width: 780px; margin: 0 auto 22px; text-align: center;
}

/* --------------------------------------------------------------------------
   3d. CLOUD SPLIT BUTTON
   -------------------------------------------------------------------------- */

.uct-dropdown-container { position: relative; display: inline-block; }
.uct-split-btn-group { display: flex; }

.uct-btn-main {
  background: #4a90ff; color: #fff; border: none;
  padding: 12px 22px; border-radius: 8px 0 0 8px;
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; min-height: 44px; transition: background .15s ease;
}
.uct-btn-main:hover { background: #3a7fee; }

.uct-btn-arrow {
  background: #4a90ff; color: #fff;
  border: none; border-left: 1px solid rgba(255,255,255,.2);
  padding: 12px 14px; border-radius: 0 8px 8px 0;
  cursor: pointer; min-height: 44px; display: flex; align-items: center;
}
.uct-btn-arrow:hover { background: #3a7fee; }

.uct-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 220px; background: #252d3f; border: 1px solid #3a4258;
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
  z-index: 30; overflow: hidden;
}
.uct-dropdown-menu.show { display: block; }

.uct-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; min-height: 44px;     /* Apple HIG minimum */
  font-size: 14px; color: #e5e7eb; cursor: pointer;
  transition: background .12s ease;
}
.uct-dropdown-item:hover { background: #1e2538; }
.uct-dropdown-item svg { flex-shrink: 0; }

/* --------------------------------------------------------------------------
   3e. OPTIONS PANEL AND THE TWO TAB ROWS
   -------------------------------------------------------------------------- */

.uct-options-panel {
  background: #1a1f2e; border: 1px solid #3a4258; border-radius: 12px;
  overflow: hidden;
}
.uct-options-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; min-height: 44px; cursor: pointer; user-select: none;
}
.uct-options-toggle-left {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; color: #e5e7eb;
  flex-wrap: wrap;
}
.uct-options-toggle-arrow { color: #9ca3af; transition: transform .2s ease; }
.uct-options-panel.collapsed .uct-options-toggle-arrow { transform: rotate(-90deg); }

/* Live state badge. Shows "Common tags - Decimal" while collapsed. */
.uct-options-summary { font-size: 12px; font-weight: 400; color: #9ca3af; }

.uct-options-body {
  max-height: 2000px; overflow: hidden;
  transition: max-height .25s ease, padding .25s ease;
  padding: 0 18px 18px;
}
.uct-options-panel.collapsed .uct-options-body {
  max-height: 0; padding-top: 0; padding-bottom: 0;
}

.uct-options-section { padding-top: 16px; }
.uct-options-section + .uct-options-section {
  margin-top: 16px; border-top: 1px solid #2a3348;
}
.uct-options-section-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: #9ca3af;
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px;
}

/* THE TAB ROWS. Two groups, two tabs each, so the per-tab-count cap is
 * 2 x 210 = 420px on both. Inside a 360px sidebar the cap never binds; it
 * binds when the sidebar stacks full width under 1024px. */
.uct-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin: 0 0 4px;
  max-width: 420px;
}
.uct-tab {
  flex: 1; min-width: 70px; min-height: 44px;   /* 44px is not optional */
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: #252d3f; border: 1px solid #3a4258; border-radius: 8px;
  padding: 10px 12px; font-family: inherit; font-size: 13px; font-weight: 600;
  color: #9ca3af; cursor: pointer; transition: all .15s ease;
}
.uct-tab:hover  { border-color: #4a90ff; color: #e5e7eb; }
.uct-tab.active { background: #4a90ff; border-color: #4a90ff; color: #fff; }
.uct-tab:focus-visible { outline: 2px solid #4a90ff; outline-offset: 2px; }
.uct-tab svg { flex-shrink: 0; }

/* --------------------------------------------------------------------------
   3f. ACTIONS
   -------------------------------------------------------------------------- */

.uct-action-btn-primary {
  width: 100%; margin-top: 14px; min-height: 52px;
  background: #1a2542; color: #fff;
  border: 1px solid #4a90ff; border-radius: 10px;
  font-family: inherit; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: background .15s ease;
}
.uct-action-btn-primary:hover:not(:disabled) { background: #222f52; }
.uct-action-btn-primary:disabled { opacity: .5; cursor: not-allowed; }

/* Busy state. The JS adds this class while a file is being read. */
.uct-action-btn-primary.is-busy { pointer-events: none; opacity: .7; }
.uct-action-btn-primary.is-busy::after {
  content: ''; display: inline-block; margin-left: 10px;
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
  animation: uct-spin .7s linear infinite; vertical-align: middle;
}
@keyframes uct-spin { to { transform: rotate(360deg); } }

.uct-controls-area {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 22px 0;
}
.uct-action-btn {
  background: #4a90ff; color: #fff; border: none; border-radius: 8px;
  padding: 12px 22px; min-height: 44px;
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.uct-action-btn:hover:not(:disabled) { background: #3a7fee; }
.uct-action-btn:disabled { opacity: .5; cursor: not-allowed; }

/* The rerun button is the secondary button in every respect. It appears only
 * after an option changes, because a finished row is then stale and must be
 * rebuilt FROM THE ORIGINAL BYTES rather than from a previous output. */
.uct-secondary-btn, .uct-rerun-btn {
  background: transparent; color: #9ca3af;
  border: 1px solid #3a4258; border-radius: 8px;
  padding: 12px 22px; min-height: 44px;
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.uct-secondary-btn:hover, .uct-rerun-btn:hover { border-color: #4a90ff; color: #e5e7eb; }

/* STICKY PRIMARY ACTION ON MOBILE. position: fixed, not sticky: a sticky
 * element only sticks within its own scroll container, and the sidebar ends
 * long before the viewport does. Only once there is something to export. */
@media (max-width: 768px) {
  .uct-tool.uct-has-input .uct-action-btn-primary {
    position: fixed; left: 16px; right: 16px; bottom: 16px;
    width: auto; z-index: 40; box-shadow: 0 6px 20px rgba(0,0,0,.5);
  }
  .uct-tool.uct-has-input .uct-results,
  .uct-tool.uct-has-input .uct-privacy-note { padding-bottom: 80px; }
}

/* --------------------------------------------------------------------------
   3g. RESULTS
   -------------------------------------------------------------------------- */

.uct-file-item {
  background: #1a1f2e; border: 1px solid #3a4258; border-radius: 10px;
  padding: 14px; margin-bottom: 10px;
  /* The row, the tile grid and the table all live in here, and every one of
   * them has to stay inside the card at 320px. */
  overflow: hidden;
}
.uct-file-item-row { display: flex; align-items: center; gap: 14px; }
.uct-file-thumb {
  width: 56px; height: 56px; flex-shrink: 0;
  background: #252d3f; border-radius: 6px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  /* The fallback when there is no embedded thumbnail and the browser cannot
   * decode the format: the format string itself, in the thumb slot. */
  font-size: 10px; font-weight: 700; letter-spacing: .04em; color: #9ca3af;
  text-align: center; line-height: 1.2; padding: 2px;
  box-sizing: border-box;
}
.uct-file-thumb canvas, .uct-file-thumb img { max-width: 100%; max-height: 100%; }
/* This tool never decodes a picture, so the thumb slot names the format
 * instead of showing one. Styled through the element, not a new class. */
.uct-file-thumb span {
  font-size: 10px; font-weight: 700; color: #9ca3af; letter-spacing: .04em;
  text-align: center; padding: 2px; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.uct-file-info { flex: 1; min-width: 0; }
.uct-file-name {
  font-size: 14px; font-weight: 600; color: #e5e7eb;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.uct-file-meta   { font-size: 12px; color: #9ca3af; margin-top: 3px; }
.uct-file-status { font-size: 12px; color: #9ca3af; margin-top: 3px; }

.uct-progress-bar {
  height: 4px; background: #2a3348; border-radius: 2px;
  overflow: hidden; margin-top: 7px;
}
.uct-progress-fill {
  height: 100%; width: 0; background: #4a90ff; transition: width .2s ease;
}

/* Used here for the GPS privacy warning (amber) and for neutral notes. */
.uct-size-compare { font-size: 12px; margin-top: 8px; line-height: 1.6; }
.uct-size-decreased { color: #4ade80; }
.uct-size-increased { color: #fbbf24; }
.uct-size-same      { color: #9ca3af; }

.uct-action-area { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }

/* THE NOT-AN-ERROR RESULT CARD. "No EXIF found" is the most common outcome on
 * this tool, so it gets a designed card, never .uct-error-msg. */
.uct-result-card {
  background: rgba(74,144,255,.10);
  border-left: 3px solid #4a90ff; border-radius: 10px;
  padding: 16px 18px; margin: 14px 0 0;
}
.uct-result-label { font-size: 13px; color: #9ca3af; margin: 0 0 6px; }
.uct-result-value { font-size: 20px; font-weight: 700; color: #fff; line-height: 1.3; }
.uct-result-sub   { font-size: 13px; color: #9ca3af; margin: 8px 0 0; line-height: 1.7; }

/* THE SIX SUMMARY TILES */
.uct-result-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px;
  margin-top: 14px;
}
.uct-result-tile {
  background: #252d3f; border: 1px solid #3a4258; border-radius: 10px;
  padding: 12px 14px; min-width: 0;
}
.uct-result-tile-label {
  font-size: 11px; color: #9ca3af; line-height: 1.5;
  text-transform: uppercase; letter-spacing: .04em;
}
.uct-result-tile-value {
  font-size: 14px; font-weight: 700; color: #e5e7eb; margin-top: 4px;
  line-height: 1.45; overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   THE METADATA TABLE
   Two columns. Group titles are full-width colspan header rows that reuse the
   existing th styling, so no group-title class was invented.
   -------------------------------------------------------------------------- */

.uct-table-wrap {
  overflow-x: auto;          /* backstop only. This table is built to fit. */
  margin-top: 14px;
  border: 1px solid #2a3348; border-radius: 10px;
}
.uct-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  /* fixed + explicit column widths is what keeps a 40-character lens name from
   * pushing the table wider than its wrapper at 320px. */
  table-layout: fixed;
}
.uct-table th {
  text-align: left; padding: 10px 12px;
  background: #252d3f; color: #9ca3af;
  font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: .04em;
}
.uct-table td {
  padding: 9px 12px; border-top: 1px solid #2a3348; color: #e5e7eb;
  vertical-align: top; line-height: 1.55;
  /* overflow-wrap: anywhere, and NOTHING else. It breaks at spaces normally
   * and only splits a token that cannot fit on its own, which is exactly what
   * a raw hex dump or a 6 KB base64 XMP value needs. word-break: break-all
   * would chop "Apple iPhone 15 Pro back triple camera" mid-word for no
   * reason. The legacy word-break: break-word alias is redundant next to this
   * and is deliberately absent. */
  overflow-wrap: anywhere;
}
.uct-table td:first-child { color: #9ca3af; width: 42%; }
.uct-table tr:hover td { background: #1e2538; }

/* --------------------------------------------------------------------------
   3h. MESSAGES, NOTES, UTILITY
   -------------------------------------------------------------------------- */

/* The ONLY error surface, and on this tool it means a genuine failure to read
 * the file. "No EXIF found" is NOT one: that is a result card above. */
.uct-error-msg {
  background: rgba(192,57,43,.12); border: 1px solid #c0392b; border-radius: 8px;
  padding: 12px 16px; margin-bottom: 10px; font-size: 13px; color: #e5e7eb;
  line-height: 1.6;
}
.uct-error-msg .uct-action-area { margin-top: 10px; }
.uct-error-text { color: #c0392b; font-size: 12px; }

/* THE CLIPBOARD FALLBACK SURFACE. When a browser refuses the clipboard, the
 * report is written here and selected, so Ctrl+C works immediately instead of
 * the user being left with a red message and nowhere to go. Capped in height
 * because a 100-file report is long. */
.uct-output-block {
  position: relative;
  background: #1e2538; border: 1px solid #3a4258; border-radius: 10px;
  padding: 16px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12px; line-height: 1.65; color: #e5e7eb;
  white-space: pre-wrap; overflow-wrap: anywhere;
  max-height: 320px; overflow-y: auto;
  margin-bottom: 10px;
}
.uct-output-block:focus-visible { outline: 2px solid #4a90ff; outline-offset: 2px; }

.uct-output-note, .uct-privacy-note {
  font-size: 12px; color: #9ca3af; text-align: center;
  line-height: 1.6; margin: 14px auto 0; max-width: 820px;
}
.uct-hidden { display: none !important; }

/* Inline links inside the tool */
.uct-tool a:not(.uct-download-link):not(.uct-action-btn) { color: #4a90ff; }

/* --------------------------------------------------------------------------
   3h-cloud. THE CLOUD URL-IMPORT MODAL - injected by cloud-handlers.js.
   Class names are hardcoded by cloud-handlers.js. Do not rename.
   -------------------------------------------------------------------------- */

.uct-modal-overlay {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(0,0,0,.66);
}
.uct-modal-content {
  width: 100%; max-width: 460px;
  background: #111B2E; border: 1px solid #26324a; border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5); overflow: hidden;
}
.uct-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid #26324a;
}
.uct-modal-header h3 { margin: 0; font-size: 16px; color: #e5e7eb; }
.uct-modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: #9ca3af; padding: 4px 8px;
}
.uct-modal-close:hover { color: #e5e7eb; }
.uct-modal-body { padding: 18px; }
.uct-modal-info { margin: 0 0 12px; font-size: 13px; color: #9ca3af; line-height: 1.6; }

/* The URL box inside that modal. cloud-handlers.js hardcodes .uct-input-field
 * on it, so without this rule (section 3e) it renders as the browser default:
 * a 21px white box with a grey border, sitting in a dark modal and well under
 * the 44px tap target. This tool has no other typed input, which is exactly
 * the case that shipped broken on passport-photo. */
.uct-input-field {
  width: 100%; box-sizing: border-box;
  background: #1e2538; border: 1px solid #3a4258; border-radius: 6px;
  padding: 10px 12px; min-height: 44px;
  font-family: inherit; font-size: 14px; color: #e5e7eb;
}
.uct-input-field:focus { outline: none; border-color: #4a90ff; }
.uct-modal-note { margin: 10px 0 0; font-size: 12px; color: #9ca3af; line-height: 1.6; }
.uct-modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 14px 18px; border-top: 1px solid #26324a;
}

@media (max-width: 480px) {
  .uct-modal-footer { flex-direction: column-reverse; }
  .uct-modal-footer .uct-action-btn,
  .uct-modal-footer .uct-secondary-btn { width: 100%; }
}

/* --------------------------------------------------------------------------
   3i. MOBILE
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .uct-tool { padding: 0 16px; overflow-x: hidden; }
  .uct-tool_heading h1 { font-size: 24px; }
  .uct-upload-area { padding: 28px 16px; }
  .uct-file-item-row { flex-wrap: wrap; }
  .uct-action-area { width: 100%; }
  .uct-action-area .uct-secondary-btn { flex: 1; }
  .uct-result-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
}
@media (max-width: 480px) {
  .uct-tool_heading h1 { font-size: 21px; }
  .uct-trust-strip { flex-direction: column; gap: 7px; }
  .uct-file-item { padding: 12px; }
  .uct-result-grid { grid-template-columns: 1fr 1fr; }
  .uct-table th { padding: 9px 10px; }
  .uct-table td { padding: 8px 10px; }
  /* The spec's `.uct-tabs { flex-direction: column }` is deliberately OMITTED.
   * It applies at 3+ tabs; both rows here have 2, and at 320px each tab is
   * still 141px wide at the full 44px height. Stacking would push the results
   * a whole extra screen down for nothing. See tool-build.md section 3i and
   * the exif-remover brief, section 3a. */
}
@media (max-width: 380px) {
  /* Two tiles per row stops working when a value like "4032 x 3024" cannot fit
   * a 130px tile with its padding. One column is honest at this width. */
  .uct-result-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   TOOL BLOCK END - exif-remover
   ========================================================================== */
