/* ── Historical Maps — side-by-side swipe comparison ── */

.histmap {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 64px);
}

.histmap__header {
    padding: 24px 24px 12px;
    text-align: center;
}

.histmap__title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-primary, #1a5632);
    margin: 0 0 6px;
}

.histmap__subtitle {
    font-size: 0.95rem;
    color: #555;
    margin: 0 0 16px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Search bar ── */

.histmap__search {
    max-width: 420px;
    margin: 0 auto;
}

.histmap__search-label {
    display: block;
    font-size: 0.82rem;
    color: #666;
    margin-bottom: 6px;
}

.histmap__search-row {
    display: flex;
    gap: 8px;
}

.histmap__search-input {
    flex: 1;
    padding: 10px 14px;
    font-size: 1rem;
    border: 2px solid var(--color-accent, #e8a838);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s;
}

.histmap__search-input:focus {
    border-color: var(--color-primary, #1a5632);
}

.histmap__search-btn {
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--color-primary, #1a5632);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.histmap__search-btn:hover {
    background: #145228;
}


/* ── Intro strip ── */

.histmap__intro {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 14px 24px;
}

.histmap__intro-inner {
    max-width: 760px;
    margin: 0 auto;
}

.histmap__intro-inner p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.7;
    color: #444;
}

/* ── Intro strip ── */

.histmap__intro {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 14px 24px;
}

.histmap__intro-inner {
    max-width: 760px;
    margin: 0 auto;
}

.histmap__intro-inner p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.7;
    color: #444;
}
/* ── Legend bar ── */

.histmap__legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 8px 24px;
    font-size: 0.82rem;
    color: #555;
    background: #f9f9f9;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.histmap__legend-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    vertical-align: -2px;
    margin-right: 4px;
    border: 1px solid #ccc;
}

.histmap__legend-swatch--left {
    background: #f5e6c8;
}

.histmap__legend-swatch--right {
    background: #d4edda;
}

.histmap__legend-divider {
    color: #ccc;
}


/* ── Instruction tip strip ── */

.histmap__tip {
    text-align: center;
    padding: 8px 24px;
    font-size: 0.85rem;
    color: var(--color-primary, #1a5632);
    background: #f0f7f3;
    border-bottom: 1px solid #c8e6d4;
    font-weight: 500;
}

.histmap__tip-icon {
    margin-right: 6px;
    font-size: 1rem;
    letter-spacing: 2px;
}
/* ── Map container ── */

.histmap__map {
    flex: 1;
    min-height: 500px;
}

/* ── Side-by-side slider styling ── */

.leaflet-sbs-range {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

.leaflet-sbs-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 6px;
    height: 60px;
    background: var(--color-accent, #e8a838);
    border: 2px solid #fff;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.leaflet-sbs-range::-moz-range-thumb {
    width: 6px;
    height: 60px;
    background: var(--color-accent, #e8a838);
    border: 2px solid #fff;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.leaflet-sbs-divider {
    background: var(--color-accent, #e8a838);
    width: 3px;
}

/* ── Footer ── */

.histmap__footer {
    padding: 16px 24px;
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    background: #f9f9f9;
    border-top: 1px solid #e5e5e5;
}

.histmap__footer p {
    margin: 4px 0;
}

.histmap__footer a {
    color: var(--color-primary, #1a5632);
    text-decoration: underline;
}

/* ── Mobile ── */

@media (max-width: 600px) {
    .histmap__header {
        padding: 16px 16px 8px;
    }
    .histmap__title {
        font-size: 1.3rem;
    }
    .histmap__subtitle {
        font-size: 0.85rem;
    }
    .histmap__map {
        min-height: 400px;
    }
}

/* ── Side-by-side plugin layout (from leaflet-side-by-side) ── */

.leaflet-sbs {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    pointer-events: none;
}

.leaflet-sbs-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
    pointer-events: none;
    z-index: 999;
}

.leaflet-sbs-range {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -4px;
    right: -4px;
    width: calc(100% + 8px);
    z-index: 999;
    margin: 0;
    padding: 0;
    pointer-events: auto;
    height: 100%;
}

/* ── Historical maps educational section ────────────────── */
.histmap__edu {
    background: #f8f9fa;
    padding: 3rem 1.5rem;
    margin-top: 2.5rem;
}
.histmap__edu-container {
    max-width: 860px;
    margin: 0 auto;
}
.histmap__edu-h2 {
    font-size: 1.35rem;
    color: #1a2b4a;
    margin: 0 0 0.9rem;
}
.histmap__edu-h2:not(:first-child) {
    margin-top: 2.2rem;
}
.histmap__edu-container p {
    color: #374151;
    line-height: 1.75;
    margin-bottom: 1rem;
}
.histmap__edu-container a {
    color: #2563eb;
    text-decoration: underline;
}
.histmap__edu-list {
    color: #374151;
    line-height: 1.75;
    padding-left: 1.4rem;
    margin-bottom: 1rem;
}
.histmap__edu-list li {
    margin-bottom: 0.55rem;
}
