html, body {
    height: 100%;
    margin: 0;
}

.map-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.map-sidebar {
    width: 300px;
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    background: #10263b;
    color: #e9eef3;
}

.map-sidebar-header {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.map-sidebar-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1 1 auto;
}

.map-sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.map-section-title {
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .72rem;
    color: #8fa8bd;
    margin-bottom: .5rem;
}

.map-sidebar .form-check-label {
    font-size: .9rem;
}

.map-canvas {
    flex: 1 1 auto;
    position: relative;
}

.feature-info {
    background: rgba(255, 255, 255, .06);
    border-radius: 6px;
    padding: 10px;
    max-height: 40vh;
    overflow: auto;
    color: #cdd9e4;
}

.feature-table {
    color: #cdd9e4;
    margin-bottom: 0;
    font-size: .8rem;
}

.feature-table th,
.feature-table td {
    border-color: rgba(255, 255, 255, .12);
    padding: .25rem .35rem;
}

.idmis-mark {
    font-weight: 700;
    letter-spacing: .08em;
}

@media (max-width: 768px) {
    .map-shell {
        flex-direction: column;
    }

    .map-sidebar {
        width: 100%;
        flex: 0 0 auto;
        max-height: 45vh;
    }
}

/* ── Embed mode (/public/map?embed=true, the homepage iframe) ─────────────────── */
.is-embed .map-shell {
    position: relative;
}

/* The homepage draws its "idmis.gis.al" link badge over the bottom-left corner
   of the iframe; lift the scale bar above it. */
.is-embed .ol-scale-line {
    bottom: 3.5em;
}

/* Floating feature-info panel, below the full-screen button (top right).
   Light, to match the homepage around the iframe. */
.embed-info {
    position: absolute;
    top: 2.75em;
    right: .5em;
    z-index: 5;
    width: min(320px, calc(100% - 1em));
    max-height: calc(100% - 4.5em);
    display: flex;
    flex-direction: column;
    padding: 6px 12px 12px;
    background: #fff;
    color: #1b2a1f;
    border: 1px solid #e2e8e0;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(20, 53, 29, .18);
}

.embed-info:has(#featureInfo:empty) {
    display: none;
}

.embed-info .feature-info {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    padding: 0;
    background: none;
    color: inherit;
}

.embed-info .feature-table,
.embed-info .feature-table th,
.embed-info .feature-table td {
    color: #1b2a1f;
    border-color: #e2e8e0;
}

.embed-info-close {
    align-self: flex-end;
    padding: 0 4px;
    background: none;
    border: 0;
    color: #54685a;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.embed-info-close:hover {
    color: #1b2a1f;
}
