﻿/* checklist.css — Mobile-first; Blue / Silver / Black system */
/* VS-friendly: no `text-wrap` */

:root {
    /* Brand */
    --blue-500: #1a73e8;
    --blue-600: #155cc7;
    --blue-800: #0f3a7a;
    /* Surfaces */
    --bg-900: #0b0d10;
    --bg-800: #101418;
    --bg-700: #141a20;
    /* Text */
    --silver-50: #f3f6fa;
    --silver-100: #e7edf5;
    --silver-300: #c9d3e2;
    --silver-500: #98a6bd;
    /* Misc */
    --border: rgba(255,255,255,0.08);
    --focus: #8ab4ff;
    --radius-8: 8px;
    --radius-12: 12px;
    --radius-16: 16px;
    --tap: 44px;
    /* Shadows */
    --shadow-1: 0 2px 10px rgba(0,0,0,.35);
    --shadow-2: 0 8px 22px rgba(0,0,0,.45);
    /* For Back-to-Directory pill (inline bg) */
    --color-button-bg: var(--blue-600);
}

* {
    box-sizing: border-box
}

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--bg-900);
    color: var(--silver-100);
    font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Keep long text safe without `text-wrap` */
h1, h2, h3, p, a, label {
    overflow-wrap: break-word;
    word-wrap: break-word
}

/* ===== App Bar (brand + actions) ===== */
.appbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 56px;
    display: grid;
    grid-template-columns: 1fr auto; /* actions area */
    align-items: center;
    padding: 0 12px;
    background: linear-gradient(180deg, rgba(16,20,24,0.95) 0%, rgba(16,20,24,0.9) 100%);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand__logo {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    background: radial-gradient(120% 120% at 30% 30%, var(--blue-500), var(--blue-800));
    box-shadow: var(--shadow-1);
}

.brand__text {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: .2px;
}

.brand__beta {
    font-size: 11px;
    color: var(--silver-300);
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-12);
}

.appbar__actions {
    display: flex;
    gap: 8px;
}

/* Shared button styles used by app bar + page */
.btn {
    appearance: none;
    border: 1px solid rgba(138,180,255,.35);
    border-radius: var(--radius-12);
    min-height: calc(var(--tap) + 4px);
    padding: 12px 16px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(180deg, rgba(26,115,232,.18), rgba(26,115,232,.12)), var(--blue-600);
    box-shadow: 0 8px 18px rgba(26,115,232,.18);
    transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}

    .btn:hover {
        filter: brightness(1.05);
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(26,115,232,.22);
    }

    .btn:active {
        transform: translateY(0);
    }

    .btn:disabled {
        opacity: .65;
        cursor: not-allowed;
    }

.btn--ghost {
    color: var(--silver-100);
    background: rgba(255,255,255,.08);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-1);
}

/* ===== Page Section ===== */
#checklist-section {
    max-width: 680px; /* snug mobile/desktop feel */
    margin: 10px auto 0; /* breathing room under sticky header */
    padding: clamp(14px,4vw,22px);
}

    #checklist-section > h2 {
        margin: 4px 2px 12px;
        font-size: clamp(20px,5vw,24px);
        font-weight: 800;
        color: var(--silver-50);
    }

/* ===== Form Blocks ===== */
.form-block {
    margin-bottom: 10px;
    display: grid;
    gap: 6px;
}

    .form-block label {
        font-size: .95rem;
        color: var(--silver-100);
    }

    .form-block select {
        width: 100%;
        min-height: var(--tap);
        background: var(--bg-700);
        color: var(--silver-100);
        border: 1px solid var(--border);
        border-radius: var(--radius-12);
        padding: 10px 12px;
        font-size: 16px; /* prevent iOS zoom */
        outline: none;
        transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
    }

        .form-block select:focus {
            border-color: rgba(138,180,255,.35);
            box-shadow: 0 0 0 2px rgba(138,180,255,.25);
        }

/* ===== Load Button ===== */
#load-checklist-btn {
    appearance: none;
    border: 1px solid rgba(138,180,255,.35);
    border-radius: var(--radius-12);
    min-height: calc(var(--tap) + 4px);
    padding: 12px 16px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(180deg, rgba(26,115,232,.18), rgba(26,115,232,.12)), var(--blue-600);
    box-shadow: 0 8px 18px rgba(26,115,232,.18);
    transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
    margin: 6px 0 12px;
}

    #load-checklist-btn:hover {
        filter: brightness(1.05);
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(26,115,232,.22);
    }

    #load-checklist-btn:active {
        transform: translateY(0);
    }

    #load-checklist-btn:disabled {
        opacity: .65;
        cursor: not-allowed;
    }

/* ===== Output (matches checklist.js rendering) ===== */
#checklist-output {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
    /* Title injected by JS */
    #checklist-output .output-title {
        margin: 0 0 6px;
        font-size: 16px;
        color: var(--silver-50);
        font-weight: 700;
    }
    /* Card look for the UL */
    #checklist-output .checklist {
        list-style: none;
        margin: 0;
        padding: 12px;
        background: var(--bg-800);
        border: 1px solid var(--border);
        border-radius: var(--radius-16);
        box-shadow: var(--shadow-1);
        display: grid;
        gap: 8px;
    }

/* Row structure from JS */
.checkbox-wrapper {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 10px;
}

    .checkbox-wrapper input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin-top: 2px;
        accent-color: var(--blue-600);
    }

.check-text {
    color: var(--silver-100);
    line-height: 1.45;
}

.strikethrough {
    text-decoration: line-through;
    color: var(--silver-300);
}

/* Special message styles used by JS */
.deadhead-message {
    margin: 0;
    padding: 12px;
    background: var(--bg-800);
    border: 1px solid var(--border);
    border-radius: var(--radius-16);
    box-shadow: var(--shadow-1);
}

/* ===== Back to Directory (consistent polish) ===== */
#back-to-directory-container {
    text-align: center;
    margin-top: 1.5rem;
}

#back-to-directory-button {
    box-shadow: var(--shadow-1);
    border: 1px solid rgba(138,180,255,.3);
}

    #back-to-directory-button:hover {
        filter: brightness(1.05);
        transform: translateY(-1px);
    }

    #back-to-directory-button:active {
        transform: translateY(0);
    }

/* Light Mode */
@media (prefers-color-scheme: light) {
    :root {
        --bg-900: #fff;
        --bg-800: #f7f9fc;
        --bg-700: #fff;
        --border: rgba(0,0,0,.08);
        --silver-50: #0b1220;
        --silver-100: #1b2436;
        --silver-300: #3b4b69;
        --silver-500: #6b7a96;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    #load-checklist-btn, #back-to-directory-button {
        transition: none !important;
    }
}
