/* Image Metadata Viewer — imv- */
.imv-upload-zone {
    border: 2px dashed rgba(139, 92, 246, 0.35);
    border-radius: 16px;
    background: rgba(139, 92, 246, 0.04);
    padding: 56px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
}

.imv-upload-zone:hover,
.imv-upload-zone:focus,
.imv-upload-zone.imv-drag-over {
    border-color: #8B5CF6;
    background: rgba(139, 92, 246, 0.08);
}

.imv-upload-icon {
    font-size: 3rem;
    color: #8B5CF6;
    opacity: 0.7;
    margin-bottom: 14px;
    display: block;
}

.imv-upload-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.imv-upload-sub {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

.imv-section {
    padding: 40px 0 60px;

}

.imv-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem
}

.imv-badge {
    width: 44px;
    height: 44px;
    background: rgba(139, 92, 246, .15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #8B5CF6;
    flex-shrink: 0
}

.imv-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 .2rem
}

.imv-subtitle {
    font-size: 0.9375rem;
    color: #64748B;
    margin: 0
}

.imv-grid {
    display: block;
}

.imv-card {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: .75rem
}

.imv-card-label {
    font-size: 0.9375rem;
    color: #5A5A78;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .25rem
}

.imv-card-value {
    font-size: 0.9375rem;
    color: #0F172A;
    font-weight: 600;
    word-break: break-all
}

.imv-section-title {
    grid-column: 1/-1;
    font-size: 0.9375rem;
    color: #8B5CF6;
    font-weight: 700;
    margin-top: .5rem;
    padding-bottom: .25rem;
    border-bottom: 1px solid #E2E8F0
}

@media(max-width:860px) {
    .imv-layout {
        grid-template-columns: 1fr;
    }

    .imv-col-preview {
        position: static;
        order: -1;
    }

    .imv-thumb {
        max-height: 280px;
    }
}

/* ── 2-col layout ────────────────────────────────────────────────────────── */
.imv-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
}

.imv-col-preview {
    position: sticky;
    top: 90px;
}

.imv-thumb {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    background: #f1f5f9;
    display: block;
}

/* ── Meta bar (filename + actions) ──────────────────────────────────────── */
.imv-meta-bar {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.imv-fname {
    flex: 1;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748B;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.imv-meta-actions {
    display: flex;
    gap: .5rem;
    flex-shrink: 0;
}

.imv-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .85rem;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    background: #F8FAFC;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}

.imv-btn-ghost:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.4);
    color: #8B5CF6;
}

.imv-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .85rem;
    border: 1.5px solid rgba(139, 92, 246, 0.5);
    border-radius: 8px;
    background: transparent;
    color: #8B5CF6;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}

.imv-btn-outline:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: #8B5CF6;
}

.imv-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .85rem;
    border: 1.5px solid #8B5CF6;
    border-radius: 8px;
    background: #8B5CF6;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}

.imv-btn-primary:hover {
    background: #7C3AED;
    border-color: #7C3AED;
}

/* ── Section headers ─────────────────────────────────────────────────────── */
.imv-section-hdr {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 1.25rem 0 .6rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid #E2E8F0;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0F172A;
}

.imv-section-hdr:first-child {
    margin-top: 0;
}

.imv-sec-icon {
    font-size: 1.1rem;
    color: #8B5CF6;
}

/* ── Card rows ───────────────────────────────────────────────────────────── */
.imv-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .65rem;
}

/* ── GPS privacy note ────────────────────────────────────────────────────── */
.imv-gps-note {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: .6rem .85rem;
    font-size: 0.85rem;
    color: #92400E;
    margin-bottom: .5rem;
}

.imv-gps-note i {
    font-size: 1rem;
    color: #D97706;
    flex-shrink: 0;
}

/* ── Maps link ───────────────────────────────────────────────────────────── */
.imv-link {
    color: #8B5CF6;
    font-weight: 600;
    text-decoration: none;
}

.imv-link:hover {
    text-decoration: underline;
}

/* ── Card label size fix ─────────────────────────────────────────────────── */
.imv-card-label {
    font-size: 0.75rem;
}

@media(max-width:500px) {
    .imv-row {
        grid-template-columns: 1fr;
    }

    .imv-meta-actions {
        width: 100%;
    }

    .imv-btn-ghost,
    .imv-btn-outline,
    .imv-btn-primary {
        flex: 1;
        justify-content: center;
    }
}