/* compress demo */

.zip-panel,
.zip-results,
.zip-tokens-wrap {
    width: 860px;
    max-width: 100%;
    margin: 1rem auto 0;
    text-align: left;
}

.zip-samples,
.zip-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.8rem;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    color: #8b949e;
}

.zip-options { margin: 0.6rem 0 0; }

.zip-panel textarea {
    width: 100%;
    padding: 0.5rem 0.7rem;
    background: #0d1117;
    color: #c9d1d9;
    border: 1px solid #30363d;
    border-radius: 6px;
    font: 0.85rem 'Cascadia Code', 'Fira Code', monospace;
    resize: vertical;
}

.zip-drop {
    position: relative;
    margin-top: 0.5rem;
    padding: 0.6rem;
    border: 2px dashed #30363d;
    border-radius: 6px;
    text-align: center;
    font-size: 0.8rem;
    color: #8b949e;
    cursor: pointer;
}

.zip-drop.drag-over { border-color: #f0883e; }
.zip-drop input { display: none; }

@media (hover: hover) {
    .zip-drop:hover { border-color: #f0883e; }
}

/* Results table */
.zip-results {
    border: 1px solid #30363d;
    border-radius: 8px;
    overflow: hidden;
}

.zip-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.3fr;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-top: 1px solid #21262d;
    font-size: 0.85rem;
}

.zip-row.zip-head {
    border-top: none;
    background: #161b22;
    font-size: 0.75rem;
    font-weight: 600;
    color: #8b949e;
}

.zip-row .ok { color: #3fb950; }
.zip-row .fail { color: #f85149; }

@media (max-width: 600px) {
    .zip-row { grid-template-columns: 1fr 1fr; }
    .zip-row.zip-head { display: none; }
    .zip-row > span:first-child { grid-column: 1 / -1; font-weight: 600; }
}

/* LZ77 token view */
.zip-sub { font-size: 0.95rem; color: #e6edf3; margin-bottom: 0.3rem; }
.zip-legend { font-size: 0.78rem; color: #8b949e; margin-bottom: 0.5rem; }
.zip-lit { padding: 0 4px; border: 1px solid #30363d; border-radius: 3px; }
.zip-match { padding: 0 4px; background: rgba(240, 136, 62, 0.25); border-radius: 3px; }

.zip-tokens {
    max-height: 260px;
    overflow: auto;
    padding: 0.7rem 0.9rem;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    font: 0.8rem/1.7 'Cascadia Code', 'Fira Code', monospace;
    white-space: pre-wrap;
    word-break: break-all;
    color: #c9d1d9;
}

.zip-tokens mark.zip-m {
    background: rgba(240, 136, 62, 0.25);
    color: #ffa657;
    border-radius: 2px;
}

.zip-note { color: #8b949e; font-family: inherit; }
