/* =========================================================================
   PROJECT ZOMBOID APP STYLESHEET
   Location: /static/style/zomboid.css
   Used for: Project Zomboid Checklist App, Skill Tracking & Sync
   ========================================================================= */

[hidden] {
    display: none !important;
}

#app {
    padding-bottom: 80px;
}

/* ---------- Intro + server ---------- */
.zb-intro {
    padding: 44px 0 26px;
}

.zb-intro h1 {
    font-size: 2.4rem;
    margin-bottom: 8px;
}

.zb-sync {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 26px 0 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* ---------- Checklists ---------- */
.zb-list {
    margin-bottom: 26px;
    padding: 24px;
    background: var(--p-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    min-width: 0;
    overflow: hidden;
}

.zb-list-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.zb-list-head h2 {
    font-size: 1.4rem;
    margin-bottom: 2px;
}

.zb-list-head p {
    font-size: 0.88rem;
}

.zb-list-tools {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.zb-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--cyan);
    white-space: nowrap;
}

.zb-search {
    min-width: 170px;
    max-width: 100%;
    padding: 8px 12px;
    background: rgba(3, 11, 24, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
}

.zb-search:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 1px;
}

.zb-bar {
    height: 6px;
    margin-bottom: 18px;
    background: var(--hair);
    border-radius: 999px;
    overflow: hidden;
}

.zb-bar-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg,
            var(--s) 0%,
            var(--t) 50%,
            var(--cyan) 100%);
    transition: width 0.3s ease;
}

/* ---------- Lists: items run top to bottom, then continue in the next column ---------- */
.zb-grid,
.zb-skills {
    column-gap: 8px;
    min-width: 0;
}

.zb-grid   { columns: 2; }
.zb-skills { columns: 370px; }

.zb-item,
.zb-skill {
    break-inside: avoid;
    margin-bottom: 8px;
}

.zb-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 9px 12px;
    background: var(--glass);
    border: 1px solid var(--hair);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    color: var(--text-dim);
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.zb-item:hover {
    border-color: var(--glass-hover-border);
    background: var(--p-card-hover);
}

.zb-item span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.zb-item input {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--cyan);
    cursor: pointer;
}

.zb-item.done {
    color: var(--text-faint);
    text-decoration: line-through;
}

/* ---------- Skill rows ---------- */
.zb-skill {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 8px 12px;
    background: var(--glass);
    border: 1px solid var(--hair);
    border-radius: var(--radius-sm);
}

.zb-skill h3 {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zb-vols {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.zb-vol {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 4px 6px;
    border: 1px solid var(--hair);
    border-radius: var(--radius-xs);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--text-dim);
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.zb-vol:hover {
    border-color: var(--glass-hover-border);
}

.zb-vol input {
    width: 13px;
    height: 13px;
    accent-color: var(--cyan);
    cursor: pointer;
}

.zb-vol.done {
    background: rgba(56, 189, 248, 0.14);
    border-color: rgba(56, 189, 248, 0.45);
    color: #ffffff;
}

/* ---------- Empty state ---------- */
.zb-empty {
    padding: 14px 0;
    color: var(--text-faint);
    font-size: 0.92rem;
}

.zb-empty code {
    color: var(--cyan);
    font-family: 'JetBrains Mono', monospace;
}

/* ---------- Responsive layout ---------- */
@media (max-width: 680px) {
    .zb-intro h1 {
        font-size: 1.9rem;
    }

    .zb-list {
        padding: 16px;
    }

    .zb-list-tools {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }

    .zb-search {
        width: 100%;
        min-width: 0;
    }

    .zb-skills {
        columns: 1;
    }
}

@media (max-width: 480px) {
    .zb-list {
        padding: 14px 12px;
    }

    .zb-grid {
        columns: 1;
    }

    .zb-skills {
        columns: 1;
    }

    .zb-skill {
        flex-wrap: wrap;
    }

    .zb-skill h3 {
        flex-basis: 100%;
    }

    .zb-vols {
        flex-wrap: wrap;
    }
}
