/* =========================================
   IMAGE METADATA VIEWER TOOL SPECIFIC CSS
   ========================================= */

:root { --tool-accent-tint: #fffbeb; }
[data-theme="dark"] { --tool-accent-tint: #451a03; }

.tool-hero {
    padding: 4rem 0 3rem;
    background: radial-gradient(circle at center, var(--bg-light) 0%, var(--bg-main) 100%);
    border-bottom: 1px solid var(--border-color);
}
.category-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.35rem 1rem; border-radius: 50px; font-size: 0.85rem; font-weight: 700;
    color: #fff; margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: 0.5px;
}

.tool-interface-wrapper { padding: 2rem 0 4rem; background-color: var(--bg-main); }
.tool-container { max-width: 1100px; margin: 0 auto; }

.drop-zone {
    border: 2px dashed var(--border-color); border-radius: 16px; padding: 4rem 2rem;
    text-align: center; background: var(--bg-main); transition: all var(--transition-speed);
    cursor: pointer; max-width: 800px; margin: 0 auto;
}
.drop-zone.dragover { background: var(--tool-accent-tint); border-color: var(--cat-image); }
.drop-icon {
    width: 80px; height: 80px; margin: 0 auto 1.5rem; background: var(--tool-accent-tint);
    border-radius: 50%; display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.drop-zone h3, .drop-zone p, .supported-formats { pointer-events: none; }
.drop-zone h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.drop-zone p { color: var(--text-muted); margin-bottom: 2rem; }
.upload-actions { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1rem; }
.supported-formats { font-size: 0.85rem !important; margin-bottom: 0 !important; }

.btn-primary-tool {
    background: var(--cat-image); color: #fff; border: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.75rem 1.5rem; border-radius: 8px; font-weight: 600; transition: all var(--transition-speed);
}
.btn-primary-tool:hover { background: #92400e; }
.btn-outline {
    background: transparent; border: 1px solid var(--border-color); color: var(--text-main);
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    gap: 0.5rem; padding: 0.75rem 1.5rem; border-radius: 8px; font-weight: 600;
    transition: all var(--transition-speed);
}
.btn-outline:hover { background: var(--bg-light); border-color: var(--cat-image); color: var(--cat-image); }

.workspace-state { background: var(--bg-main); border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 6px -1px var(--card-shadow); }
.workspace-row { margin: 0; }

.settings-panel { background: var(--bg-light); border-right: 1px solid var(--border-color); padding: 1.5rem; display: flex; flex-direction: column; }
.settings-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.settings-header h4 { margin: 0; font-size: 1.1rem; }
.file-count-badge { background: var(--cat-image); color: #fff; font-size: 0.75rem; padding: 0.25rem 0.6rem; border-radius: 20px; font-weight: 600; }

/* Image file list */
.image-file-list { display: flex; flex-direction: column; gap: 0.6rem; max-height: 420px; overflow-y: auto; }
.image-file-item {
    display: flex; align-items: center; gap: 0.75rem; background: var(--bg-main);
    border: 2px solid var(--border-color); border-radius: 10px; padding: 0.5rem; cursor: pointer;
    transition: all 0.15s ease;
}
.image-file-item:hover { border-color: var(--cat-image); }
.image-file-item.active { border-color: var(--cat-image); background: var(--tool-accent-tint); }
.image-file-thumb {
    width: 42px; height: 42px; border-radius: 6px; object-fit: cover; flex-shrink: 0;
    background: var(--bg-light);
}
.image-file-info { flex: 1; min-width: 0; }
.image-file-name { font-size: 0.85rem; font-weight: 600; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.image-file-meta { font-size: 0.72rem; color: var(--text-muted); }
.image-file-remove {
    width: 24px; height: 24px; border-radius: 50%; background: var(--bg-light); border: 1px solid var(--border-color);
    color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; flex-shrink: 0; transition: all 0.15s ease;
}
.image-file-remove:hover { background: var(--cat-image); color: #fff; border-color: var(--cat-image); }

/* Metadata Panel */
.preview-panel { padding: 1.5rem; display: flex; flex-direction: column; }
.metadata-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.metadata-header h5 { margin: 0; word-break: break-all; }
.metadata-export-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

.btn-chip {
    background: var(--bg-light); border: 1px solid var(--border-color); color: var(--text-main);
    font-size: 0.78rem; font-weight: 600; padding: 0.4rem 0.85rem; border-radius: 50px;
    cursor: pointer; transition: all 0.15s ease;
}
.btn-chip:hover { border-color: var(--cat-image); color: var(--cat-image); }
.btn-chip:disabled { opacity: 0.5; cursor: not-allowed; }

.metadata-scroll { flex: 1; min-height: 400px; max-height: 560px; overflow-y: auto; }
.metadata-empty { color: var(--text-muted); text-align: center; padding: 3rem 1rem; }

.metadata-group { margin-bottom: 1.5rem; }
.metadata-group-title {
    font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--cat-image); margin-bottom: 0.6rem;
}
.metadata-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.metadata-table tr { border-bottom: 1px solid var(--border-color); }
.metadata-table tr:last-child { border-bottom: none; }
.metadata-table td { padding: 0.55rem 0.5rem; vertical-align: top; }
.metadata-table td.meta-key { color: var(--text-muted); font-weight: 600; width: 40%; white-space: nowrap; }
.metadata-table td.meta-value { color: var(--text-main); word-break: break-word; }

/* Processing */
.processing-state { padding: 4rem 2rem; background: var(--bg-main); border: 1px solid var(--border-color); border-radius: 16px; box-shadow: 0 4px 6px -1px var(--card-shadow); }
.spinner { width: 50px; height: 50px; border: 4px solid var(--bg-light); border-top: 4px solid var(--cat-image); border-radius: 50%; margin: 0 auto 1.5rem; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.progress-bar-container { width: 100%; max-width: 400px; height: 8px; background: var(--bg-light); border-radius: 4px; margin: 1.5rem auto; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: var(--cat-image); transition: width 0.1s linear; }

.step-card { padding: 2rem 1rem; }
.step-icon { width: 64px; height: 64px; margin: 0 auto 1.5rem; background: var(--tool-accent-tint); color: var(--cat-image); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.feature-card { background: var(--bg-main); border: 1px solid var(--border-color); border-radius: 12px; padding: 1.5rem; height: 100%; }

.faq-accordion { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.accordion-item { background: var(--bg-main); border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }
.accordion-header {
    width: 100%; text-align: left; padding: 1.25rem; background: none; border: none;
    font-size: 1.05rem; font-weight: 600; color: var(--text-main); cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; font-family: var(--font-family);
}
.accordion-header svg { transition: transform 0.3s ease; }
.accordion-header[aria-expanded="true"] svg { transform: rotate(180deg); }
.accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.accordion-content.open {
    max-height: 600px;
    padding: 0 1.25rem 1.25rem;
}
@media (max-width: 991px) {
    .settings-panel { border-right: none; border-bottom: 1px solid var(--border-color); }
    .image-file-list { max-height: 260px; }
}
