/*
 * Schematischer Grundriss (Standort → Grundriss, Einrichtung per Fragen, Druck A4 quer).
 * Nicht maßstäblich; Kontrast der Beschriftung ≥ 7:1 auf allen Farbtönen.
 */
.fp {
    margin: 0;
    display: grid;
    gap: var(--space-2);
}

.fp__caption {
    font-size: var(--fs-small);
    color: var(--c-text);
}

.fp__svg {
    width: 100%;
    height: auto;
    max-height: 70vh;
    display: block;
    font-family: var(--font);
}

.fp--compact .fp__svg {
    max-height: 340px;
}

.fp__outline {
    fill: #f7f9fc;
    stroke: #8a97ab;
    stroke-width: 2;
}

.fp__corridor {
    fill: #e7ecf3;
    stroke: none;
}

.fp__corridor-label,
.fp__stairs-label,
.fp__entrance-label {
    font-size: 12px;
    fill: #3b4658;
    letter-spacing: 0.02em;
}

.fp__block rect,
.fp__entrance rect {
    stroke: #51607a;
    stroke-width: 1.5;
}

.fp__block--open rect {
    stroke: #b42318;
    stroke-dasharray: 6 4;
}

.fp__tone-0 rect { fill: #e3eefb; }
.fp__tone-1 rect { fill: #e6f4ea; }
.fp__tone-2 rect { fill: #fdf0dd; }
.fp__tone-3 rect { fill: #f1e8fb; }
.fp__tone-4 rect { fill: #e0f3f4; }
.fp__tone-5 rect { fill: #fbe7ea; }

.fp__entrance rect {
    fill: #fff6cc;
}

.fp__name {
    font-size: 15px;
    font-weight: 700;
    fill: #14213d;
}

.fp__team {
    font-size: 13px;
    fill: #1f2d45;
}

.fp__rooms {
    font-size: 13px;
    fill: #1f2d45;
}

.fp__zone {
    font-size: 12px;
    fill: #3b4658;
    font-style: italic;
}

.fp__missing {
    font-size: 12px;
    font-weight: 700;
    fill: #b42318;
}

.fp__empty {
    font-size: 16px;
    fill: #3b4658;
}

.fp__door {
    stroke: #f7f9fc;
    stroke-width: 5;
}

.fp__door--main {
    stroke-width: 7;
}

.fp__arrow,
.fp__stairs-icon,
.fp__lift-icon {
    fill: none;
    stroke: #14213d;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fp__stairs rect {
    fill: #ffffff;
    stroke: #51607a;
    stroke-width: 1.5;
}

.fp__lift {
    fill: #ffffff;
}

.fp__link:focus-visible rect {
    outline: none;
    stroke: var(--c-focus, #0b57d0);
    stroke-width: 4;
}

.fp__link:hover rect {
    stroke-width: 3;
}

.fp__list {
    margin: 0;
    padding-left: 1.4em;
    font-size: var(--fs-small);
    color: var(--c-text);
    columns: 2 18rem;
    column-gap: var(--space-5);
}

.fp__list li {
    break-inside: avoid;
    margin-bottom: 2px;
}

/* ---- Standortseite: Grundriss bearbeiten ---------------------------------------------- */
.fp-floors {
    display: grid;
    gap: var(--space-6);
}

.fp-floor {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: minmax(0, 1fr) 19rem;
    align-items: start;
}

.fp-edit {
    display: grid;
    gap: var(--space-3);
}

.fp-edit__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-2);
}

.fp-edit__item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: var(--space-2);
    align-items: center;
    padding: var(--space-2);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
}

.fp-edit__item.is-dragging {
    opacity: 0.5;
}

.fp-edit__item.is-target {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px var(--brand-primary-soft);
}

.fp-edit__handle {
    cursor: grab;
    color: var(--c-muted);
    display: inline-flex;
}

.fp-edit__rename {
    display: flex;
    gap: var(--space-1);
    min-width: 0;
}

.fp-edit__rename input {
    min-width: 0;
    flex: 1;
}

.fp-edit__meta {
    grid-column: 2 / -1;
    font-size: var(--fs-xs);
    color: var(--c-muted);
}

.fp-edit__count {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 64rem) {
    .fp-floor {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---- Druck A4 quer ------------------------------------------------------------------- */
.fp-print {
    max-width: 277mm;
    margin: 0 auto;
    padding: 10mm 0;
    font-family: var(--font);
    color: #14213d;
}

.fp-print__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12mm;
    margin-bottom: 4mm;
}

.fp-print__head h1 {
    font-size: 20pt;
    margin: 0;
}

.fp-print__page {
    break-after: page;
    page-break-after: always;
}

.fp-print__page:last-child {
    break-after: auto;
    page-break-after: auto;
}

.fp-print .fp__svg {
    max-height: 150mm;
}

.fp-print__tools {
    margin-bottom: var(--space-4);
}

.fp-print__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-3) 0 0;
}

/* Benannte Seite: nur der Grundriss-Druck ist A4 quer, alle anderen Seiten drucken wie bisher. */
@page grundriss {
    size: A4 landscape;
    margin: 10mm;
}

@media print {
    .fp-print {
        page: grundriss;
        padding: 0;
    }

    .fp-print__tools {
        display: none;
    }
}
