/* Image color eyedropper page styles. Theme tokens only; the only literal colors are the
   picked pixel colors, applied inline by the controller (user-chosen, fine to render). */

.eyedropper .tool-title {
    margin-bottom: 0.25rem;
}

.eyedropper .tool-intro {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.ed-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 22rem);
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 760px) {
    .ed-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Stage: drop zone + canvas ------------------------------------------ */

.ed-stage {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.ed-drop {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 9rem;
    padding: 1.5rem;
    border: 2px dashed var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--muted);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.ed-drop:hover,
.ed-drop:focus-within,
.ed-drop.is-dragging {
    border-color: var(--accent);
    background: var(--accent-weak);
}

.ed-file {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.ed-drop-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    pointer-events: none;
}

.ed-drop-text strong {
    color: var(--text);
    font-size: 1.05rem;
}

/* --- Canvas + loupe ----------------------------------------------------- */

.ed-canvas-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.ed-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    cursor: crosshair;
    /* Keep the displayed pixels crisp when the loupe magnifies. */
    image-rendering: auto;
}

.ed-loupe {
    position: absolute;
    pointer-events: none;
    border: 2px solid var(--surface);
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--border), var(--shadow);
    background-repeat: no-repeat;
    image-rendering: pixelated;
    z-index: 2;
}

/* Crosshair in the center of the loupe. */
.ed-loupe::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    transform: translate(-50%, -50%);
    border: 1px solid var(--text);
    box-shadow: 0 0 0 1px var(--surface);
    border-radius: 2px;
}

.ed-reset {
    align-self: flex-start;
}

/* --- Readout: hovered + selected --------------------------------------- */

.ed-readout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ed-color {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
}

.ed-color--selected {
    border-color: var(--accent);
}

.ed-swatch {
    display: flex;
    align-items: flex-end;
    min-height: 4.5rem;
    padding: 0.75rem;
    /* Background + text color are set inline by the controller (literal picked color). */
    background: var(--bg);
    color: var(--text);
}

.ed-swatch-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
}

.ed-values {
    margin: 0;
    padding: 0.5rem 0.75rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ed-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ed-value dt {
    flex: 0 0 2.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.ed-value dd {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-width: 0;
}

.ed-value code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9rem;
    color: var(--text);
    overflow-wrap: anywhere;
}

.ed-copy {
    margin-left: auto;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    white-space: nowrap;
}

.ed-copy .icon {
    width: 0.9em;
    height: 0.9em;
}
