:root
{
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    background: #101827;
    color: #e5edf7;
}

*
{
    box-sizing: border-box;
}

html,
body,
.app-shell
{
    width: 100%;
    height: 100%;
    margin: 0;
}

.app-shell
{
    display: grid;
    grid-template-columns: minmax(16rem, 21rem) 1fr;
    overflow: hidden;
}

.filter-panel
{
    display: flex;
    min-height: 0;
    flex-direction: column;
    background: #111c2d;
    border-right: 1px solid #334155;
    z-index: 1000;
}

.panel-header
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #334155;
}

h1
{
    margin: 0;
    font-size: 1.5rem;
}

.status
{
    margin: 0.3rem 0 0;
    color: #a9bad0;
    font-size: 0.85rem;
}

.status.error
{
    color: #fecaca;
}

.filters
{
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.75rem 1rem 2rem;
}

.panel-content
{
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
}

.progress-panel
{
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #334155;
}

.progress-panel h2
{
    margin: 0;
    color: #93c5fd;
    font-size: 1rem;
}

#progress-summary
{
    margin: 0.35rem 0 0.65rem;
    font-size: 0.9rem;
}

.progress-actions
{
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filters fieldset
{
    margin: 0 0 1rem;
    padding: 0;
    border: 0;
}

.filters legend
{
    width: 100%;
    margin-bottom: 0.4rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #334155;
    color: #93c5fd;
    font-weight: 700;
}

.filter-actions
{
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

button,
.button
{
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.7rem;
    border: 1px solid #64748b;
    border-radius: 0.35rem;
    background: #233249;
    color: inherit;
    cursor: pointer;
    font: inherit;
    line-height: normal;
    text-align: center;
}

button:hover:not(:disabled),
.button:hover:not(.disabled)
{
    background: #334155;
}

button:disabled,
.button.disabled
{
    cursor: not-allowed;
    opacity: 0.55;
}

button:focus-visible,
input:focus-visible
{
    outline: 3px solid #60a5fa;
    outline-offset: 2px;
}

.button:has(+ input:focus-visible)
{
    outline: 3px solid #60a5fa;
    outline-offset: 2px;
}

.visually-hidden
{
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.progress-message
{
    min-height: 1.2em;
    margin: 0.55rem 0 0;
    color: #bfdbfe;
    font-size: 0.8rem;
}

.progress-message.error
{
    color: #fecaca;
}

.progress-message.warning
{
    color: #fde68a;
}

.filter-row
{
    display: grid;
    grid-template-columns: auto 2.5rem 1fr;
    align-items: center;
    min-height: 2.5rem;
    gap: 0.5rem;
}

.filter-row label
{
    cursor: pointer;
}

.type-symbol
{
    display: flex;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
}

.type-swatch
{
    width: 0.75rem;
    height: 0.75rem;
    border: 1px solid #fff;
    border-radius: 50%;
}

.type-pin
{
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.map
{
    width: 100%;
    height: 100%;
    background: #07101e;
}

.leaflet-tooltip
{
    max-width: min(22rem, 80vw);
    border: 1px solid #94a3b8;
    background: #111827;
    color: #f8fafc;
}

.poi-tooltip h2
{
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.poi-tooltip p
{
    margin: 0.2rem 0;
    white-space: normal;
}

.poi-completion
{
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2rem;
    margin-top: 0.55rem;
    padding-top: 0.45rem;
    border-top: 1px solid #475569;
    cursor: pointer;
    font-weight: 700;
}

.panel-toggle
{
    display: none;
}

@media(max-width: 44rem)
{
    .app-shell
    {
        display: grid;
        grid-template-rows: auto 1fr;
        grid-template-columns: 1fr;
    }

    .filter-panel
    {
        max-height: 45vh;
        border-right: 0;
        border-bottom: 1px solid #334155;
    }

    .panel-header
    {
        padding: 0.65rem 0.8rem;
    }

    .panel-toggle
    {
        display: block;
    }

    .filter-panel.is-collapsed .panel-content
    {
        display: none;
    }

    .filters
    {
        padding-bottom: 1rem;
    }
}
