/* metaphor_review.css — Deep Metaphor Analyst Review Panel */

.mr-panel {
    max-width: 900px;
    margin: 24px auto;
    font-family: var(--font-body, 'DM Sans', sans-serif);
}

.mr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.mr-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.mr-tabs {
    display: flex;
    gap: 4px;
}

.mr-tab {
    padding: 6px 16px;
    border: 1px solid var(--border, #ddd);
    background: var(--bg-card, #fff);
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s;
}

.mr-tab.active {
    background: var(--accent, #E83524);
    color: #fff;
    border-color: var(--accent, #E83524);
}

.mr-tab:hover:not(.active) {
    background: var(--bg-hover, #f5f5f5);
}

/* Pending edits bar */
.mr-pending-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #FFF8E1;
    border: 1px solid #FFE082;
    border-radius: var(--radius-sm, 6px);
    margin-bottom: 16px;
    font-size: 0.88rem;
    font-weight: 500;
}

/* Metaphor cards */
.mr-metaphor {
    border: 1px solid var(--border, #ddd);
    border-radius: var(--radius-sm, 6px);
    margin-bottom: 12px;
    overflow: hidden;
}

.mr-metaphor.collapsed .mr-metaphor-body {
    display: none;
}

.mr-metaphor.collapsed .mr-chevron {
    transform: rotate(-90deg);
}

.mr-metaphor-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card, #fff);
    cursor: pointer;
    user-select: none;
}

.mr-metaphor-header:hover {
    background: var(--bg-hover, #f9f9f9);
}

.mr-metaphor-name {
    font-weight: 600;
    font-size: 1rem;
}

.mr-chevron {
    margin-left: auto;
    font-size: 0.8rem;
    transition: transform 0.2s;
    color: var(--text-secondary, #888);
}

.mr-metaphor-body {
    padding: 4px 16px 16px;
    background: var(--bg-body, #fafafa);
}

/* Tags */
.mr-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--bg-input, #f0f0f0);
    color: var(--text-secondary, #666);
}

.mr-tag-sm {
    font-size: 0.7rem;
    padding: 1px 6px;
}

.mr-pol-positive { background: #E8F5E9; color: #2E7D32; }
.mr-pol-negative { background: #FFEBEE; color: #C62828; }
.mr-pol-mixed { background: #FFF3E0; color: #E65100; }
.mr-pol-pos { background: #E8F5E9; color: #2E7D32; }
.mr-pol-neg { background: #FFEBEE; color: #C62828; }

/* Expressions */
.mr-expression {
    position: relative;
    border: 1px solid var(--border, #eee);
    border-radius: var(--radius-sm, 6px);
    margin: 8px 0;
    padding: 12px;
    background: var(--bg-card, #fff);
}

.mr-expression.mr-pending {
    border-color: #FFE082;
    background: #FFFDE7;
}

.mr-expr-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.mr-anchor-id {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent, #E83524);
}

.mr-expr-label {
    font-weight: 500;
    font-size: 0.9rem;
}

.mr-expr-meta {
    font-size: 0.8rem;
    color: var(--text-secondary, #888);
    margin-bottom: 8px;
}

.mr-reanchor-btn {
    margin-left: auto;
    background: none;
    border: 1px solid var(--border, #ddd);
    border-radius: 3px;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary, #888);
    transition: all 0.15s;
}

.mr-reanchor-btn:hover {
    background: var(--bg-hover, #f0f0f0);
    color: var(--accent, #E83524);
    border-color: var(--accent, #E83524);
}

/* Verbatims */
.mr-verbatims {
    margin-top: 6px;
}

.mr-verbatim {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 8px;
    margin: 3px 0;
    border-radius: 3px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.mr-verbatim:hover {
    background: var(--bg-hover, #f5f5f5);
}

.mr-verbatim.mr-excluded {
    text-decoration: line-through;
    opacity: 0.5;
    background: #FFEBEE;
}

.mr-verbatim-text {
    flex: 1;
    font-style: italic;
    color: var(--text-primary, #333);
}

.mr-verbatim-rid {
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    color: var(--text-secondary, #999);
    white-space: nowrap;
}

.mr-exclude-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary, #999);
    padding: 0 4px;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.mr-exclude-btn:hover {
    opacity: 1;
    color: #C62828;
}

.mr-excluded .mr-exclude-btn:hover {
    color: #2E7D32;
}

/* Single respondent noted */
.mr-srn-section {
    margin-top: 10px;
    font-size: 0.82rem;
}

.mr-srn-toggle {
    cursor: pointer;
    color: var(--text-secondary, #888);
    user-select: none;
}

.mr-srn-toggle:hover {
    color: var(--text-primary, #333);
}

.mr-srn-list.hidden {
    display: none;
}

.mr-srn-item {
    padding: 3px 0 3px 16px;
    color: var(--text-secondary, #888);
    font-size: 0.8rem;
}

/* Dropped section */
.mr-dropped-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border, #eee);
}

.mr-dropped-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary, #888);
    margin-bottom: 10px;
}

.mr-dropped {
    position: relative;
    padding: 12px;
    margin: 6px 0;
    border: 1px solid var(--border, #eee);
    border-radius: var(--radius-sm, 6px);
    background: var(--bg-card, #fff);
}

.mr-dropped.mr-pending {
    border-color: #FFE082;
    background: #FFFDE7;
}

.mr-dropped-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.mr-dropped-reason {
    font-size: 0.82rem;
    color: var(--text-secondary, #888);
    margin-bottom: 8px;
}

.mr-argue-btn {
    font-size: 0.8rem;
}

/* Dialogs */
.mr-dialog {
    position: absolute;
    z-index: 10;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 4px;
}

.mr-dialog-content {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #ddd);
    border-radius: var(--radius-sm, 6px);
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.mr-dialog-content h4 {
    margin: 0 0 8px;
    font-size: 0.95rem;
}

.mr-dialog-content p {
    font-size: 0.85rem;
    color: var(--text-secondary, #888);
    margin-bottom: 10px;
}

.mr-dialog-content select,
.mr-dialog-content textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border, #ddd);
    border-radius: var(--radius-sm, 6px);
    font-family: inherit;
    font-size: 0.88rem;
    margin-bottom: 10px;
}

.mr-dialog-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Diff panel */
#mr-diff-panel {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid var(--border, #ddd);
    border-radius: var(--radius-sm, 6px);
    background: var(--bg-card, #fff);
}

#mr-diff-panel h4 {
    margin: 0 0 10px;
    font-size: 0.95rem;
}

.mr-diff-added {
    padding: 6px 10px;
    margin: 4px 0;
    background: #E8F5E9;
    border-radius: 3px;
    font-size: 0.85rem;
}

.mr-diff-removed {
    padding: 6px 10px;
    margin: 4px 0;
    background: #FFEBEE;
    border-radius: 3px;
    font-size: 0.85rem;
}

.mr-diff-unchanged {
    padding: 6px 10px;
    margin: 4px 0;
    background: var(--bg-input, #f5f5f5);
    border-radius: 3px;
    font-size: 0.85rem;
    color: var(--text-secondary, #888);
}

.mr-diff-detail {
    padding: 4px 10px;
    font-size: 0.82rem;
    color: var(--text-secondary, #888);
}

/* Progress and status */
.mr-complete {
    margin-top: 12px;
    padding: 12px;
    background: var(--success-bg, #E8F5E9);
    border: 1px solid var(--accent-muted, #A5D6A7);
    border-radius: var(--radius-sm, 6px);
    text-align: center;
    font-weight: 500;
}

.mr-loading, .mr-error, .mr-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-secondary, #888);
}

.mr-error {
    color: #C62828;
}
