/* ============================================================
   DIFFASAURUS-SPECIFIC STYLES
   ============================================================ */

/* Header dino sticker: placed by hand, slightly crooked */
.header-logo {
    --sticker-tilt: -3deg;
    transform: rotate(var(--sticker-tilt));
}

/* ============================================================
   MULTI-DOCUMENT PAIRS
   ============================================================ */
/* Each pair is set apart by room alone: no lines on the desk */
.document-pair {
    margin-top: 4rem;
}

.document-pair-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.document-pair-label {
    font-size: 1.25rem;
    color: var(--ink-text);
}

button.remove-pair-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(69, 26, 3, 0.25);
    background: var(--paper-cream);
    box-shadow: var(--shadow-sheet);
    color: var(--ink-text);
    font-size: 14px;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard);
}

button.remove-pair-btn:hover {
    background: linear-gradient(var(--ink-a10), var(--ink-a10)), var(--paper-cream);
    border-color: var(--ink-a40);
}

/* ============================================================
   DROP ZONE
   ============================================================ */
/* The drop zone's look and motion are shared in common.css */

/* File queue */
.file-queue {
    margin-top: 1rem;
}

.file-queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.file-list {
    max-height: 200px;
    overflow-y: auto;
}

.file-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 0.375rem;
    transition: background var(--dur-fast) var(--ease-standard);
    font-family: var(--font-mono);   /* file names are data, in the terminal font */
    font-size: 0.8rem;
    color: var(--ink-text);
}

.file-row:hover {
    background: var(--ink-a10);
}

.file-row .file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-row .file-status {
    font-family: var(--font-body);   /* a status word, not data */
    font-size: 0.75rem;
    flex-shrink: 0;
}

.match-ok {
    color: var(--green);
}

.match-warn {
    color: var(--status-warn);
}

/* ============================================================
   EXPLAIN SECTION
   ============================================================ */
.explain-buttons {
    display: none;
}
#explanations-section {
    display: none;
}
.toggle-arrow {
    transition: transform var(--dur-base) var(--ease-standard);
}
.toggle-arrow.collapsed {
    transform: rotate(-90deg);
}
.explain-content.collapsed {
    display: none;
}
/* ============================================================
   DIFF OUTPUT STYLING
   ============================================================ */
/* Removed and Added are divider sheets like every other box. The cream results box sits inside
   with the same inset and corners as the code editors, and only shows once there are results;
   until then the panel shows a resting hint, like the Summary sheet. The hint follows its
   results box in the markup, so it hides itself as soon as results arrive, with no script.
   Phones keep their own panel padding. */
.diff-panel-output {
    padding: 1rem;
}

#diff-left,
#diff-right,
.pair-diff-left,
.pair-diff-right {
    border-radius: 0.5rem;
}

#diff-left:empty,
#diff-right:empty,
.pair-diff-left:empty,
.pair-diff-right:empty {
    display: none;
}

#diff-left:not(:empty) + .diff-empty-hint,
#diff-right:not(:empty) + .diff-empty-hint,
.pair-diff-left:not(:empty) + .diff-empty-hint,
.pair-diff-right:not(:empty) + .diff-empty-hint {
    display: none;
}

#diff-left pre,
#diff-right pre,
.pair-diff-left pre,
.pair-diff-right pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.5;
}
.diff-line {
    display: flex;
    padding: 2px 8px;
    white-space: pre-wrap;
    word-break: break-all;
}
.line-number {
    display: inline-block;
    width: 40px;
    min-width: 40px;
    text-align: right;
    padding-right: 12px;
    margin-right: 8px;
    color: var(--ink-a70);
    border-right: 1px solid var(--ink7-a30);
    user-select: none;
}
.line-content {
    flex: 1;
}
.diff-removed {
    background-color: rgba(183, 73, 70, 0.12);
    color: var(--ink-text);
    border-left: 3px solid var(--diff-removed);
}
.diff-added {
    background-color: rgba(62, 122, 73, 0.12);
    color: var(--ink-text);
    border-left: 3px solid var(--diff-added);
}
.diff-unchanged {
    color: var(--ink-text);   /* code text uses the text ink; sticker colors never color code */
}
/* Git-style inline highlights — brighter backgrounds on the
   specific words/characters that actually changed */
.diff-highlight-removed {
    background-color: rgba(183, 73, 70, 0.22);
    border-radius: 2px;
    padding: 1px 0;
}
.diff-highlight-added {
    background-color: rgba(62, 122, 73, 0.22);
    border-radius: 2px;
    padding: 1px 0;
}
/* Scrollbar styling for diff panels */
#diff-left::-webkit-scrollbar,
#diff-right::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
#diff-left::-webkit-scrollbar-track,
#diff-right::-webkit-scrollbar-track {
    background: rgba(253, 246, 230, 0.5);
    border-radius: 4px;
}
#diff-left::-webkit-scrollbar-thumb,
#diff-right::-webkit-scrollbar-thumb {
    background: var(--ink7-a30);
    border-radius: 4px;
}
#diff-left::-webkit-scrollbar-thumb:hover,
#diff-right::-webkit-scrollbar-thumb:hover {
    background: var(--ink7-a50);
}
/* ============================================================
   DIFFASAURUS RESPONSIVE — 768px
   ============================================================ */

@media (max-width: 768px) {

    /* Diff output: smaller font, tighter line numbers */
    #diff-left pre,
    #diff-right pre {
        font-size: 12px !important;
        line-height: 1.4;
    }

    .diff-line {
        padding: 1px 4px;
    }

    .line-number {
        width: 28px;
        min-width: 28px;
        padding-right: 6px;
        margin-right: 4px;
        font-size: 11px;
    }

    /* Diff panels: reduce max height */
    #diff-left,
    #diff-right {
        max-height: 250px !important;
        padding: 0.5rem !important;
    }

    /* Summary header: stack if needed */
    .summary-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Explain panels: tighter */
    .explain-header {
        padding: 0.5rem 0.75rem !important;
    }

    .explain-content {
        padding: 0.5rem 0.75rem !important;
    }
}

/* ============================================================
   DIFFASAURUS RESPONSIVE — 480px
   ============================================================ */

@media (max-width: 480px) {

    /* Diff output: even more compact */
    #diff-left pre,
    #diff-right pre {
        font-size: 12px !important;
    }

    .line-number {
        width: 24px;
        min-width: 24px;
        padding-right: 4px;
        margin-right: 3px;
        font-size: 11px;
    }

    #diff-left,
    #diff-right {
        max-height: 200px !important;
    }

}