html, body {
    height: 100%;
    margin: 0;
    font-family: var(--calcite-font-family);
}

arcgis-map {
    width: 100%;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-inline: 1rem;
}
.logo img { height: 34px; }
.titel { font-size: 1.1rem; font-weight: 600; }

.sektion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
    border-block-end: 1px solid var(--calcite-color-border-3);
}
.knapprad { display: flex; gap: 0.5rem; }
.knapprad:not(:has(:not([hidden]))) { display: none; }

.copyright {
    font-size: 11px;
    color: #333;
    background: rgba(255, 255, 255, 0.75);
    padding: 2px 6px;
    border-radius: 3px;
}

/* Ritverktyget styrs från egna knappar; komponenten finns i DOM men syns inte */
.dold {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Popup-innehåll */
table.koord { border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 1.05em; }
table.koord th { text-align: left; padding: 2px 12px 2px 0; color: #555; font-weight: 600; }
table.koord td { padding: 2px 0; font-family: ui-monospace, Consolas, monospace; }
.srs { margin: 4px 0 8px; font-size: 11px; color: #666; }
.liten { font-size: 11px; }

/* === Mobil === */
body[data-layout="mobil"] .logo img { height: 26px; }
body[data-layout="mobil"] .logo { padding-inline: 0.5rem; gap: 0.5rem; }
body[data-layout="mobil"] arcgis-search { width: calc(100vw - 80px); max-width: 420px; }

.verktygsrad {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--calcite-color-foreground-1);
    border-block-start: 1px solid var(--calcite-color-border-3);
}
.verktygsrad .knapprad calcite-button { flex: 1; }
.verktygsrad .copyright { background: none; padding: 0; text-align: center; }

.startfel {
    position: fixed; inset: 40% 10% auto 10%; z-index: 1000;
    padding: 1rem; background: #fff; border: 2px solid #d22; border-radius: 4px;
}

/* Undvik horisontell rullist i panelen */
.sektion { box-sizing: border-box; min-width: 0; }
arcgis-legend { max-width: 100%; overflow-x: hidden; }
