/* ==========================================================================
   ARDO — icon.css  (ArdoIcon)
   Tool-specific styles. Tokens and shell come from base.css; the content
   sections below the tool are styled by tool.css, as on the other tools.
   ========================================================================== */

.icon-app {
  max-width: 46rem;
  margin: 0 auto var(--s-8);
  padding: var(--s-6);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-card);
}

/* --- Drop zone --------------------------------------------------------- */

.drop-zone {
  display: grid;
  place-items: center;
  gap: var(--s-3);
  padding: var(--s-12) var(--s-6);
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper-sunk);
  text-align: center;
  transition: border-color 120ms linear, background-color 120ms linear;
}

.drop-zone.is-over {
  border-color: var(--amber);
  background: var(--paper-card);
}

/* The input stays in the accessibility tree and keyboard order; the label
   is what gets drawn. Hiding it with display:none would take it out of
   both. */
.drop-zone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.drop-zone__label {
  display: inline-block;
  padding: var(--s-3) var(--s-6);
  background: var(--amber);
  color: #ffffff;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
}

.drop-zone__label:hover { background: var(--amber-deep); }

/* The focus ring lives on the input, which is visually hidden, so move it
   onto the label the user can actually see. */
.drop-zone input[type="file"]:focus-visible + .drop-zone__hint,
.drop-zone:focus-within .drop-zone__label {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

.drop-zone__hint {
  margin: 0;
  max-width: none;
  font-size: var(--t-sm);
  color: var(--ink-mute);
}

.privacy-note {
  margin: var(--s-4) 0 0;
  font-size: var(--t-sm);
  color: var(--ink-mute);
}

/* --- Options ----------------------------------------------------------- */

.icon-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-6);
  margin: var(--s-6) 0 0;
  padding: var(--s-4);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.icon-options legend {
  padding-inline: var(--s-2);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink);
}

.icon-options .check {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin: 0;
  font-size: var(--t-sm);
}

.icon-options input[type="checkbox"] { accent-color: var(--amber); }

.icon-options input[type="color"] {
  width: 44px;
  height: 44px;
  padding: 2px;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background: var(--paper-card);
  cursor: pointer;
}

.icon-options input[type="color"]:disabled { opacity: 0.45; cursor: not-allowed; }

.icon-status {
  margin: var(--s-4) 0 0;
  font-family: var(--mono);
  font-size: var(--t-sm);
  color: var(--ink-mute);
  min-height: 1.5em;
}

.icon-status:empty { min-height: 0; }

/* --- Result ------------------------------------------------------------ */

.icon-result__head {
  font-size: var(--t-base);
  margin: var(--s-8) 0 var(--s-4);
}

/* A checkerboard behind the previews, so a transparent icon reads as
   transparent rather than as white. */
.icon-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--s-6);
  padding: var(--s-4);
  border-radius: var(--radius);
  background-color: var(--paper-sunk);
  background-image:
    linear-gradient(45deg, var(--rule) 25%, transparent 25%),
    linear-gradient(-45deg, var(--rule) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--rule) 75%),
    linear-gradient(-45deg, transparent 75%, var(--rule) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.icon-preview__item {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: var(--s-2);
}

.icon-preview__item img {
  image-rendering: pixelated;   /* show the real pixels, not a smoothed lie */
}

.icon-preview__item figcaption {
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--ink-mute);
}

.snippet {
  margin: 0 0 var(--s-3);
  padding: var(--s-4);
  overflow-x: auto;
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: var(--t-xs);
  line-height: 1.7;
  color: var(--ink-soft);
}

.copy-button {
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: var(--s-3) var(--s-6);
  min-height: 44px;
  cursor: pointer;
}

.copy-button:hover { border-color: var(--ink); }

@media (max-width: 44rem) {
  .icon-app { padding: var(--s-4); }
  .drop-zone { padding: var(--s-8) var(--s-4); }
}
