/**
 * Shared styles for the client-side file/image/crypto tools cluster
 * (AES cipher, perceptual hash, EXIF viewer, QR reader, image converter,
 * PDF metadata). Prefix: mt-.
 *
 * Generic field/table/breakdown/result/hero-card live in public.css; this
 * file only carries the drag&drop zone, the image/file preview, the mono
 * output block and the small note - patterns reused by every tool here.
 */

/* ===== Drag & drop zone ===== */
.mt-drop {
    border: 2px dashed var(--c-line, #e2e8f0);
    border-radius: var(--r-lg, 14px);
    padding: 1.6rem 1.2rem;
    text-align: center;
    cursor: pointer;
    background: var(--c-bg, #f8fafc);
    transition: border-color 0.15s, background 0.15s;
}

.mt-drop:hover { border-color: var(--c-blue, #0065c0); }

.mt-drop.is-over {
    border-color: var(--c-blue, #0065c0);
    background: #eff6ff;
}

.mt-drop input[type="file"] { display: none; }

.mt-drop-icon { color: var(--c-ink-mute, #64748b); margin-bottom: 0.4rem; }

.mt-drop-title {
    font-weight: 600;
    color: var(--c-ink, #0f172a);
    font-size: 0.95rem;
}

.mt-drop-hint {
    font-size: 0.82rem;
    color: var(--c-ink-mute, #64748b);
    margin-top: 0.25rem;
}

.mt-drop-file {
    margin-top: 0.6rem;
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 0.82rem;
    color: var(--c-blue, #0065c0);
    word-break: break-all;
}

/* ===== Image / file preview ===== */
.mt-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
    margin-top: 1rem;
}

.mt-thumb {
    max-width: 220px;
    max-height: 220px;
    border-radius: var(--r-md, 10px);
    border: 1px solid var(--c-line, #e2e8f0);
    background:
        linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%) 0 0 / 16px 16px,
        linear-gradient(45deg, #eee 25%, #fff 25%, #fff 75%, #eee 75%) 8px 8px / 16px 16px;
    object-fit: contain;
}

/* ===== Mono output block (hash, base64, hex dump) ===== */
.mt-mono {
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 0.85rem;
    background: var(--c-bg, #f8fafc);
    border: 1px solid var(--c-line, #e2e8f0);
    border-radius: var(--r-md, 10px);
    padding: 0.7rem 0.9rem;
    word-break: break-all;
    white-space: pre-wrap;
    color: var(--c-ink, #0f172a);
}

/* ===== Hamming/score badge ===== */
.mt-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.mt-badge.is-match  { background: #f0fdf4; color: #166534; }
.mt-badge.is-near   { background: #fefce8; color: #854d0e; }
.mt-badge.is-diff   { background: #fef2f2; color: #7f1d1d; }

/* ===== Small note ===== */
.mt-note {
    font-size: 0.82rem;
    color: var(--c-ink-mute, #64748b);
    margin: 0.5rem 0 0;
    line-height: 1.45;
}

/* ===== Two-up image compare grid ===== */
.mt-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .mt-compare { grid-template-columns: 1fr; }
}

/* ===== Tabs (multi-file EXIF) ===== */
.mt-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    border-bottom: 2px solid var(--c-line, #e2e8f0);
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.mt-tab {
    flex: 0 0 auto;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.5rem 0.9rem;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    background: transparent;
    color: var(--c-ink-mute, #64748b);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--r-sm, 6px) var(--r-sm, 6px) 0 0;
}

.mt-tab:hover { background: var(--c-bg, #f8fafc); color: var(--c-ink, #0f172a); }

.mt-tab.is-active {
    color: var(--c-blue, #0065c0);
    border-bottom-color: var(--c-blue, #0065c0);
    background: var(--c-bg, #f8fafc);
}

@media (max-width: 640px) {
    .mt-tab { max-width: 130px; padding: 0.45rem 0.6rem; font-size: 0.82rem; }
}

@media print {
    .mt-drop { display: none; }
    .mt-tabs { display: none; }
}
