/*
 * image-to-base64.css — per-tool styles for the drag-and-drop zone and the
 * checkered image preview. Tokens only; no inline styles (CSP: style-src 'self').
 */

/* Drop zone — a label wrapping the (visually hidden) native file input. */
.i2b-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--neutral-50);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.i2b-dropzone:hover { border-color: var(--blue-600); background: var(--blue-50); }
.i2b-dropzone.is-dragover { border-color: var(--blue-600); background: var(--blue-100); }
.i2b-dropzone:focus-within {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}
.i2b-dropzone-icon { color: var(--text-muted); }
.i2b-dropzone-title { font: 600 15px/1.4 var(--font-sans); color: var(--text-primary); }
.i2b-dropzone-hint { font: 400 13px/1.4 var(--font-sans); color: var(--text-secondary); }

/* Native file input, kept accessible but visually collapsed inside the label. */
.i2b-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Image preview surface — checkered so transparent images read clearly. */
.i2b-preview {
  margin: 0 0 var(--space-4);
  padding: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--neutral-50);
  background-image:
    linear-gradient(45deg, var(--neutral-100) 25%, transparent 25%),
    linear-gradient(-45deg, var(--neutral-100) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--neutral-100) 75%),
    linear-gradient(-45deg, transparent 75%, var(--neutral-100) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.i2b-preview img {
  display: block;
  max-width: 100%;
  max-height: 320px;
  height: auto;
  border-radius: var(--radius-sm);
}
