/* ═══════════════════════════════════════════════════════════════
   REVIEW COMPARE PANEL (rc-)
   Two stacked cards with per-field merge controls, used by the
   Data Quality duplicate review. Visual parity with the import
   review page is deliberate: the two pages are the same job.
   Kept as a separate global sheet (not a copy of the ir- rules in
   AdministratorImportReview.razor.css) so the page in daily use is
   not touched; the two will be unified once both are proven.
   ═══════════════════════════════════════════════════════════════ */

/* ═══ NAVIGATION / QUEUE COUNTER ═══ */
.rc-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(100, 116, 139, 0.15);
    background: rgba(15, 23, 42, 0.3);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rc-nav-buttons {
    display: flex;
    gap: 0.5rem;
}

.rc-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    height: 32px;
    padding: 0 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(100, 116, 139, 0.3);
    background: rgba(71, 85, 105, 0.3);
    color: rgba(203, 213, 225, 0.8);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rc-nav-btn:hover:not(:disabled) {
    background: rgba(71, 85, 105, 0.5);
    color: #f8fafc;
}

.rc-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.rc-queue-position {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.8);
}

.rc-queue-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(148, 163, 184, 0.5);
}

.rc-queue-current {
    font-family: 'Montserrat', -apple-system, sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: #60a5fa;
}

.rc-queue-total {
    font-family: 'Montserrat', -apple-system, sans-serif;
    font-weight: 600;
    color: rgba(148, 163, 184, 0.6);
}

/* ═══ CARDS ═══ */
.rc-content {
    padding: 1rem;
}

.rc-split {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rc-card {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.875rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6), rgba(30, 41, 59, 0.5));
    border: 1px solid rgba(100, 116, 139, 0.2);
    border-radius: 12px;
}

/* The dropped row reads red, the survivor green — the outcome must be visible
   before reading a single field. */
.rc-card-loser {
    border-color: rgba(248, 113, 113, 0.28);
}

.rc-card-keeper {
    border-color: rgba(74, 222, 128, 0.28);
}

.rc-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(100, 116, 139, 0.15);
    flex-wrap: wrap;
}

.rc-card-icon {
    font-size: 0.7rem;
    color: rgba(148, 163, 184, 0.4);
}

.rc-card-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(148, 163, 184, 0.6);
}

.rc-card-id {
    font-family: 'JetBrains Mono', 'Roboto Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(226, 232, 240, 0.9);
    text-decoration: none;
}

.rc-card-id:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.rc-role-tag {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.45rem;
    border-radius: 5px;
}

.rc-role-loser {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.rc-role-keeper {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.rc-header-spacer {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

/* ═══ FIELD ROWS ═══ */
.rc-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.4rem 0;
}

.rc-detail-row + .rc-detail-row {
    border-top: 1px solid rgba(100, 116, 139, 0.08);
}

.rc-field-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(148, 163, 184, 0.5);
    width: 90px;
    flex-shrink: 0;
    padding-top: 0.1rem;
}

.rc-field-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(226, 232, 240, 0.9);
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

/* Amber = the rows disagree and nobody has decided yet; cyan = a choice was made. */
.rc-diff-highlight {
    border-left: 3px solid rgba(245, 158, 11, 0.5);
    padding-left: 0.5rem;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 0 4px 4px 0;
}

.rc-diff-resolved {
    border-left: 3px solid rgba(34, 211, 238, 0.5);
    padding-left: 0.5rem;
    background: rgba(34, 211, 238, 0.05);
    border-radius: 0 4px 4px 0;
}

.rc-merge-preview {
    color: #22d3ee;
    font-weight: 600;
}

/* ═══ MERGE TOGGLE PILL ═══ */
.rc-merge-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
    flex-shrink: 0;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(100, 116, 139, 0.25);
    background: rgba(100, 116, 139, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
}

.rc-merge-toggle input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.rc-merge-toggle .oi {
    font-size: 0.55rem;
    color: rgba(148, 163, 184, 0.5);
    transition: color 0.2s ease, transform 0.2s ease;
}

.rc-merge-text {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(148, 163, 184, 0.6);
    white-space: nowrap;
    transition: color 0.2s ease;
}

.rc-merge-toggle:hover {
    border-color: rgba(34, 211, 238, 0.3);
    background: rgba(34, 211, 238, 0.06);
}

.rc-merge-toggle:hover .oi,
.rc-merge-toggle:hover .rc-merge-text {
    color: rgba(34, 211, 238, 0.7);
}

.rc-merge-toggle.rc-merge-active {
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(34, 211, 238, 0.12);
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.1);
}

.rc-merge-toggle.rc-merge-active .oi {
    color: #22d3ee;
    transform: translateX(-1px);
}

.rc-merge-toggle.rc-merge-active .rc-merge-text {
    color: rgba(34, 211, 238, 0.9);
}

/* ═══ COMMENT MERGE: two pills stacked + editable textarea + counter ═══ */
.rc-comment-toggles {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-left: auto;
    flex-shrink: 0;
}

.rc-comment-editor {
    width: 100%;
    min-height: 3rem;
    padding: 0.4rem 0.5rem;
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.6);
    color: #22d3ee;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.4;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.rc-comment-editor:focus {
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.rc-comment-editor.rc-comment-over {
    border-color: rgba(248, 113, 113, 0.55);
}

.rc-comment-counter {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: rgba(148, 163, 184, 0.6);
    text-align: right;
}

.rc-comment-counter.rc-comment-over {
    color: #fca5a5;
}

/* ═══ SWAP CONTROL ═══ */
.rc-swap-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.rc-swap-btn:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
}

.rc-swap-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Pager over the losers of a group with more than two members */
.rc-loser-pager {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(148, 163, 184, 0.7);
}

.rc-loser-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    border: 1px solid rgba(100, 116, 139, 0.3);
    background: rgba(71, 85, 105, 0.3);
    color: rgba(203, 213, 225, 0.8);
    font-size: 0.55rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rc-loser-pager-btn:hover:not(:disabled) {
    background: rgba(71, 85, 105, 0.5);
    color: #f8fafc;
}

.rc-loser-pager-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ═══ ACTION BAR ═══ */
.rc-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(100, 116, 139, 0.15);
    background: rgba(15, 23, 42, 0.3);
    flex-wrap: wrap;
}

.rc-action-left,
.rc-action-right {
    display: flex;
    gap: 0.5rem;
}

.rc-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: 36px;
    padding: 0 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.rc-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.rc-btn-shortcut {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 4px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.55rem;
    font-weight: 700;
    opacity: 0.5;
    font-family: monospace;
}

.rc-btn-skip {
    background: rgba(71, 85, 105, 0.4);
    border-color: rgba(100, 116, 139, 0.3);
    color: rgba(203, 213, 225, 0.8);
}

.rc-btn-skip:hover:not(:disabled) {
    background: rgba(71, 85, 105, 0.6);
    color: #f8fafc;
}

.rc-btn-merge {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.3);
    color: #22d3ee;
}

.rc-btn-merge:hover:not(:disabled) {
    background: rgba(6, 182, 212, 0.25);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}

.rc-spin {
    animation: rc-spin 1s linear infinite;
}

@keyframes rc-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 991.98px) {
    .rc-action-bar {
        flex-direction: column;
        gap: 0.75rem;
    }

    .rc-action-left,
    .rc-action-right {
        width: 100%;
        justify-content: center;
    }

    .rc-action-btn {
        flex: 1;
        height: 38px;
    }

    .rc-btn-shortcut {
        display: none;
    }

    .rc-field-label {
        width: 70px;
    }
}
