/* === Palette D (2026-10-22): blue #1D5387, mid blue #6086AB, light blue #A4BACF, cream #F7F7E5, red-orange #DC3300 ===
   (earlier: A navy+orange build/styles.css.bak-paletteA-orange-20261022; B navy+cerise build/styles.css.bak-paletteB-cerise-20261022;
    C blue+sienna build/styles.css.bak-paletteC-sienna-20261022) */
:root{
  --brand:         #1d5387;             /* primary blue   */
  --brand-strong:  #143c63;             /* darker / hover (derived) */
  --brand-accent:  #1d5387;             /* headings, links */
  --brand-mid:     #6086ab;             /* mid blue       */
  --brand-light:   #a4bacf;             /* header line    */
  --brand-tint:    #f7f7e5;             /* cream          */
  --brand-tint-05: rgba(29,83,135,.05);
  --accent:        #e8661c;             /* orange (was red-orange #dc3300) */
  --accent-light:  #c4540f;             /* hover (darker orange) */
  --Grey:          #555555;
}

/* ===== CYPRUS MEMORIAL MAP - MODULAR VERSION STYLES ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== ACCESSIBILITY ===== */

/* Screen reader only content - visually hidden but accessible to screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Hidden utility class for filtering */
.hidden {
    display: none !important;
}

/* Focus visible styles for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--brand);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-to-main:focus {
    top: 0;
}

body, html {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
}

#map {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

#header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* No bar (2026-10-23): the title and the buttons float on the map. */
    background: transparent;
    padding: 0 20px;
    pointer-events: none;   /* let map drags pass through the transparent area */
    /* Above the info-pane (2000) so the hamburger dropdown — trapped in this header's
       stacking context — can sit over the infowindow. Stays below modals (3000). */
    z-index: 2100;
}
/* Re-enable interaction only on the actual header controls */
#header > * {
    pointer-events: auto;
}

/* Two-line title, centred over the map */
.header-titles {
    position: absolute;
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
    text-align: center;
    padding: 6px 0;
    pointer-events: none !important;   /* the map stays draggable under the title */
}
/* Title without a box (2026-10-24): bold red-orange spaced capitals over a bold navy line, both Noto Sans */
#map-title {
    font-family: 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
    color: var(--brand);
    margin: 0;
    white-space: nowrap;
}
#map-title .t1,
#map-title .t2 { display: block; }
#map-title .t1 {
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    line-height: 1.15;
    color: var(--accent);
}
#map-title .t2 {
    font-size: 26px;                   /* Noto Sans bold, like the top line */
    font-weight: 700;
    line-height: 1.2;
    margin-top: 3px;
}

/* Header actions: EL·EN pill + solid azure Search */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
}
#header #language-toggle.header-pill {
    width: auto;
    margin: 0;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    color: #ffffff;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease;
}
#header #language-toggle.header-pill:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
}
#header .header-search {
    margin: 0;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    color: #ffffff;
    background: var(--brand-accent);
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s ease;
}
#header .header-search:hover {
    background: var(--brand);
}

#language-toggle {
    width: 100%;
    padding: 8px 12px;
    background: var(--brand);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    text-align: center;
    font-weight: 500;
    margin-top: 8px;
}

#language-toggle:hover {
    background: var(--brand-strong);
}

#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 2000;
    text-align: center;
}

#loading.hidden {
    display: none;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--brand);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom Popup Styles */
.custom-popup {
    position: absolute;
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    font-family: Arial, sans-serif;
    font-size: 14px;
    width: var(--pp-width);   /* all popups the same width; set in :root below */
    z-index: 1000;
    transform: translate(-50%, -100%);
    margin-top: -10px;
}

/* Triangular pointer at bottom of popup */
.custom-popup::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
    filter: drop-shadow(0 2px 1px rgba(0,0,0,0.1));
}

.custom-popup .title {
    font-weight: bold;
    color: var(--brand);
    margin: 0;
}

/* Church / chapel / cemetery / school hover popup: photo, category, community, name, date, "Δείτε περισσότερα →".
   Settings you can change (values in pixels): */
:root {
    --pp-frame:           15px;    /* white frame around the photo: top, left and right (popups with a photo) */
    --pp-width:           250px;   /* width of every popup (communities included); the photo fills it inside the frame */
    --pp-photo-ratio:     16 / 9;  /* photo shape: 16 / 9 wide, 4 / 3 taller, 2 / 1 very wide */
    --pp-photo-gap:       16px;     /* space between photo and category (ΕΚΚΛΗΣΙΕΣ) */
    --pp-layer-size:      10px;    /* category text size */
    --pp-layer-gap:       8px;     /* space between category and community name */
    --pp-community-gap:   4px;     /* space between community name and church name */
    --pp-date-gap:        3px;     /* space between church name and date */
    --pp-date-size:       12px;    /* date text size */
    --pp-community-size:  12px;    /* community text size */
    --pp-more-gap:        6px;     /* space above "Δείτε περισσότερα" (below the date) */
    --pp-more-gap-nodate: 12px;    /* space above "Δείτε περισσότερα" when there is no date */
    --pp-more-size:       12px;    /* "Δείτε περισσότερα" text size */
    --pp-name-color:      #444;    /* church / school / monument name colour (blue was var(--brand)) */
    --pp-more-color:      #888;    /* "Δείτε περισσότερα" colour (grey, as the category; orange was var(--accent)) */
}

.custom-popup .popup-photo {
    display: block;
    width: 100%;
    aspect-ratio: var(--pp-photo-ratio);
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    margin: 0 0 var(--pp-photo-gap);
}

.custom-popup .popup-layer {
    font-size: var(--pp-layer-size);
    letter-spacing: 0.08em;
    color: #888;
    margin-bottom: var(--pp-layer-gap);
}

/* popups with a photo: the same white frame above the photo as on its left and right */
.custom-popup:has(.popup-photo) {
    padding-top: var(--pp-frame);
    padding-left: var(--pp-frame);
    padding-right: var(--pp-frame);
}

.custom-popup .popup-community {
    font-size: var(--pp-community-size);
    color: #555;
    margin-bottom: var(--pp-community-gap);
}

.custom-popup .popup-date {
    font-size: var(--pp-date-size);
    color: #555;
    margin-top: var(--pp-date-gap);
}

.custom-popup .popup-community + .click-for-more,
.custom-popup .popup-name + .click-for-more,
.custom-popup .popup-date + .click-for-more,
.custom-popup .popup-census + .click-for-more,
.custom-popup .popup-layer + .title + .click-for-more {
    margin-top: var(--pp-more-gap);
    font-size: var(--pp-more-size);
    text-align: right;
    color: var(--pp-more-color);
}

.custom-popup .title.popup-name {
    color: var(--pp-name-color);
}

/* no date line: more space between the church name and "Δείτε περισσότερα" */
.custom-popup .popup-name + .click-for-more,
.custom-popup .popup-layer + .title + .click-for-more {
    margin-top: var(--pp-more-gap-nodate);
}

.custom-popup .popup-community + .click-for-more::after,
.custom-popup .popup-name + .click-for-more::after,
.custom-popup .popup-date + .click-for-more::after,
.custom-popup .popup-census + .click-for-more::after,
.custom-popup .popup-layer + .title + .click-for-more::after {
    content: " →";
}

/* (unused for now: condition line) */

.custom-popup .popup-cond { font-size: 12px; color: #555; margin-top: 5px; }

.custom-popup .click-for-more {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Community hover label: 1960 census lines (HOVER_LABEL_CENSUS in constants.js) */
.custom-popup:has(.popup-census) {
    width: auto;                    /* census lines don't wrap: at least the common width, wider if a line needs it */
    min-width: var(--pp-width);
}

.custom-popup .popup-census {
    font-size: 13px;
    color: #333;
    margin-top: 3px;
    white-space: nowrap;
}

/* Info Pane Styles */
/* alpha = how opaque the pane's own background is (1 = solid).
   blur  = how much the map behind it is blurred. */
:root {
    --ip-alpha: 0.85;
    --ip-blur: 1px;
    --lc-alpha: 0.8;
    --lc-blur: 2px;
}

#info-pane {
    position: fixed;
/*
    top: 87px;
    right: 20px;
*/
    top: 72px;
    right: 5px;
    width: 550px;
    max-height: calc(100vh - 107px);
    background: rgba(255, 255, 255, var(--ip-alpha));
    -webkit-backdrop-filter: blur(var(--ip-blur));
    backdrop-filter: blur(var(--ip-blur));
    border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

#info-pane.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

/* Grey Header Area */
#info-pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.10);
    cursor: move;
    touch-action: none;
    /* Soft steel-blue gradient: light on the left, dark on the right */
    background: linear-gradient(90deg, rgba(183,196,212,var(--ip-alpha)) 0%, rgba(130,153,176,var(--ip-alpha)) 100%);
    flex-shrink: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

#info-pane-header:hover {
    background: linear-gradient(90deg, rgba(173,186,204,var(--ip-alpha)) 0%, rgba(121,143,166,var(--ip-alpha)) 100%);
}

#info-pane-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--brand);
}

#info-pane-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 3px;
    color: var(--brand);
    line-height: 1;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#info-pane-close svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

#info-pane-close:hover {
    background: rgba(0,0,0,0.10);
}

#copy-link-btn {
    font-size: 16px;
    cursor: pointer;
    padding: 4px 7px;
    border: 1px solid rgba(29,83,135,0.35);
    background: transparent;
    border-radius: 3px;
    transition: all 0.2s;
    color: var(--brand);
    line-height: 1;
    position: relative;
}

#copy-link-btn:hover {
    background-color: rgba(29,83,135,0.12);
    border-color: rgba(29,83,135,0.55);
    color: var(--brand);
}

#copy-link-btn::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s;
    margin-bottom: 4px;
}

#copy-link-btn:hover::before {
    opacity: 1;
}

/* Scrollable Content Area */
#info-pane-content {
    padding: 12px 20px 20px 20px;
    overflow-y: auto;
    flex-grow: 1;
    font-size: 15px;
}

#info-pane-content p {
    margin: 8px 0;
    font-size: 17.5px;
    line-height: 1.55;
}

#info-pane-content strong {
    color: #333;
}

#info-pane-content b.popup-subtitle {
    font-size: 1.1em;
    color: var(--brand-accent);
}

/* "More / Περισσότερα" link to the detailed standalone community page */
#info-pane-content .info-more {
    margin: 14px 0 2px;
    text-align: right;
}
#info-pane-content .info-more a {
    display: inline-block;
    color: var(--brand-accent);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}
#info-pane-content .info-more a:hover {
    text-decoration: underline;
}

/* Info-pane section titles (Γεωγραφική Θέση / Πληθυσμός / Χριστιανικοί Ναοί) —
   azure like the "Περισσότερα" link, still bold, extra 6px above each. */
#info-pane-content p.ip-section { margin-top: 14px; }
#info-pane-content p.ip-section > b:first-child { color: var(--brand-accent); }


/* Thumbnail Gallery */
.thumbnail-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.thumbnail-grid-item {
    flex: 1 1 calc((100% - 16px) / 3);   /* three columns, two 8px gaps */
    max-width: calc((100% - 16px) / 3);
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.thumbnail-grid-item:hover {
    transform: scale(1.05);
}

.thumbnail-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Map location labels */
.map-location-label {
    font-family: Arial, sans-serif;
    text-shadow:
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff,
        0 0 3px #fff;
}

/* Hide Google Maps UI elements */
.gm-style-cc {
    display: none !important;
}

.gmnoprint a,
.gmnoprint span,
.gm-style-cc {
    display: none !important;
}

/* Hide Google logo */
a[href^="https://maps.google.com/maps"] {
    display: none !important;
}

.gmnoprint div {
    background: none !important;
}

/* General Modal Styles (About, etc.) */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.06);
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.10);
    cursor: move;
    touch-action: none;
    /* Match the info-pane header (translucent to match the card) */
    background: linear-gradient(90deg, rgba(183,196,212,0.5) 0%, rgba(130,153,176,0.5) 100%);
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: var(--brand);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 3px;
    color: #666;
    line-height: 1;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.modal-close:hover {
    background: rgba(0,0,0,0.1);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-body p {
    color: #333;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.modal-body ul {
    color: #333;
    font-size: 15px;
    line-height: 1.7;
    margin-left: 20px;
    margin-bottom: 16px;
}

.modal-body li {
    margin-bottom: 8px;
}

/* Contact Form Modal */
.contact-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.06);
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.contact-modal-content {
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.contact-modal-overlay.active .contact-modal-content {
    transform: scale(1);
}

.contact-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.10);
    cursor: move;
    touch-action: none;
    /* Match the info-pane header (translucent to match the card) */
    background: linear-gradient(90deg, rgba(183,196,212,0.5) 0%, rgba(130,153,176,0.5) 100%);
    flex-shrink: 0;
}

.contact-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: var(--brand);
}

.contact-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 3px;
    color: #666;
    line-height: 1;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-modal-close svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.contact-modal-close:hover {
    background: rgba(0,0,0,0.1);
}

.contact-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.contact-modal-body p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input.error,
.form-group textarea.error {
    border-color: #d32f2f;
}

.error-message {
    color: #d32f2f;
    font-size: 12px;
    display: none;
}

.error-message.show {
    display: block;
}

.submit-button {
    padding: 12px 24px;
    /* Match the popup header (the top where the title is) — solid */
    background: #8299b0;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.submit-button:hover {
    background: #798fa6;
}

.submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.success-message {
    display: none;
    padding: 14px;
    background: #4caf50;
    color: white;
    border-radius: 6px;
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
}

.success-message.show {
    display: block;
}

/* Sources Modal */
.sources-modal-content {
    max-width: 900px;
    max-height: 85vh;
}

.sources-modal-content .modal-body {
    overflow-y: auto;
}

.sources-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
}

.sources-table td {
    padding: 12px;
    border: 1px solid #ddd;
    vertical-align: top;
    text-align: justify;
    line-height: 1.8;
}

.sources-table td:first-child {
    width: 30px;
    text-align: center;
    font-weight: bold;
    background: #f8f9fa;
}

.sources-table tr:hover {
    background: #f5f5f5;
}

/* Transliteration table nested inside sources table */
.transliteration-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 13px;
    background: white;
}

.transliteration-table th,
.transliteration-table td {
    padding: 8px 10px;
    border: 1px solid #ccc;
    text-align: center;
}

.transliteration-table th {
    background: var(--brand-tint);
    font-weight: bold;
    color: var(--brand);
}

.transliteration-table tr:nth-child(even) {
    background: #fafafa;
}

.transliteration-table tr:hover {
    background: #e8f4f8;
}

/* Language-specific visibility */
body[data-language="el"] .lang-en {
    display: none;
}

body[data-language="en"] .lang-el {
    display: none;
}

/* Layer Controls */
#layer-controls {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(243, 246, 249, var(--lc-alpha));
    -webkit-backdrop-filter: blur(var(--lc-blur));
    backdrop-filter: blur(var(--lc-blur));
    padding: 12px 8px 12px 18px;
    border-radius: 0 0 10px 0;
    box-shadow: 1px 2px 10px rgba(0,0,0,0.20);
    z-index: 1000;
    width: 210px;
}

.layer-control-header {
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 2px 2px 8px;
    color: #8a94a0;
    padding-bottom: 8px;
    border-bottom: 1px solid #edeff2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.layer-chevron {
    flex: 0 0 auto;
    color: #aab4bf;
    transition: transform 0.2s ease;
}
/* Chevron points up when the pane is open, down when collapsed */
#layer-controls:not(.collapsed) .layer-chevron {
    transform: rotate(180deg);
}
/* Collapsed: hide the layer toggles (keep the header + the Lists button) */
#layer-controls.collapsed {
    padding-bottom: 12px;
}
#layer-controls.collapsed .layer-control-header {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}
#layer-controls.collapsed .layer-control-item,
#layer-controls.collapsed .layer-divider,
#layer-controls.collapsed #search-toggle-btn {
    display: none;
}

.layer-control-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    margin: 0;
    padding: 3px 6px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    transition: background 0.12s ease;
}

.layer-control-item:hover {
    background: #eef1f4;
}

/* Single-language layer label (swaps with the site language) */
.layer-control-item > span {
    font-size: 13px;
    font-weight: 500;
    color: #1c2733;
    line-height: 1.2;
    min-width: 0;
    white-space: nowrap;
    user-select: none;
}

/* Custom azure checkbox on the right */
.layer-control-item input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    flex: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 2px solid #c2ccd6;
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    transition: background 0.12s ease, border-color 0.12s ease;
}
.layer-control-item input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}
.layer-control-item input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.layer-control-item input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--brand-accent);
    outline-offset: 2px;
}

.layer-divider {
    height: 1px;
    background: #edeff2;
    margin: 5px 2px;
}

/* Lists (Κατάλογοι) button moved into the Layers pane — same look it had in the header */
.layers-lists-btn {
    display: block;
    width: 100%;
    margin: 4px 0 2px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    color: #ffffff;
    background: var(--brand);
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.layers-lists-btn:hover {
    background: var(--brand-mid);
}



/* Missing Persons Styles */
.view-toggle-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.view-toggle-btn {
    flex: 1;
    padding: 8px 16px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.view-toggle-btn:hover {
    background: #e0e0e0;
}

.view-toggle-btn.active {
    background: var(--brand-accent);
    color: white;
    border-color: var(--brand-accent);
}

.info-pane-missing-persons h4 {
    margin: 15px 0 10px 0;
    font-size: 16px;
    color: #d32f2f;
}

/* Killed Persons - Full View */
.killed-persons-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.killed-person-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
}

.killed-person-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.killed-person-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #666;
}

.killed-person-info div {
    line-height: 1.4;
}

.killed-person-info strong {
    color: #333;
    font-weight: 600;
}

/* Killed Persons - Compact View */
.killed-persons-list-compact {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.killed-person-item-compact-no-image {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 8px 10px;
}

.killed-person-name-compact {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.killed-person-status-compact {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.killed-person-date-compact {
    font-size: 11px;
    color: #999;
}

/* Missing Persons - Full View */
.missing-persons-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.missing-person-item {
    display: flex;
    gap: 12px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
}

.missing-person-image {
    width: 80px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: #ddd;
}

.missing-person-details {
    flex: 1;
}

.missing-person-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.missing-person-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #666;
}

.missing-person-info div {
    line-height: 1.4;
}

.missing-person-info strong {
    color: #333;
    font-weight: 600;
}

/* Missing Persons - Compact View */
.missing-persons-list-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.missing-person-item-compact {
    display: flex;
    gap: 10px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 8px;
}

.missing-person-image-compact {
    width: 50px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: #ddd;
}

.missing-person-details-compact {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.missing-person-name-compact {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.missing-person-status-compact {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.missing-person-age-compact {
    font-size: 11px;
    color: #999;
}

/* Custom Zoom Controls */
#custom-zoom-controls {
    position: absolute;
    bottom: 26px;
    left: 6px;
    z-index: 999;
    padding: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    display: none; /* Hidden - change to 'flex' to restore */
    flex-direction: column;
    overflow: hidden;
}

#custom-zoom-controls button {
    display: block;
    margin: 0;
    padding: 8px 12px;
    width: 35px;
    height: 35px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: transparent;
    border-radius: 0;
    transition: background-color 0.2s ease;
    color: #333;
}

#custom-zoom-controls button:not(:last-child) {
    border-bottom: 1px solid #eee;
}

#custom-zoom-controls button:hover {
    background: var(--brand-tint);
    color: var(--brand-accent);
}

#custom-zoom-controls button:focus {
    outline: 2px solid var(--brand-accent);
    outline-offset: -2px;
    background: var(--brand-tint);
}

/* Combined List Container (Search/Lists dropdown) */
#combined-list-container {
    position: absolute;
    top: 0;
    left: 220px;
    width: 350px;
    max-height: 600px;
    background: white;
    border-radius: 0 0 10px 0;
    box-shadow: 1px 2px 10px rgba(0,0,0,0.20);
    z-index: 1100;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

#combined-list-container.visible,
#combined-list-container.open,
#combined-list-container.mobile-visible {
    display: flex;
}

/* Lists pane at the left edge, full height (LISTS_PANE_LEFT in constants.js).
   While it is open the Layers pane moves to its right; it slides back on close. */
@media (min-width: 769px) {
    /* width of the lists pane: change it here only */
    body.lists-pane-left { --lists-w: 310px; }
    body.lists-pane-left #combined-list-container {
        width: var(--lists-w);
        top: 0;
        bottom: 0;
        left: 0;
        max-height: none;
        border-radius: 0;
        box-shadow: none;
    }

    body.lists-pane-left #layer-controls {
        transition: left 0.25s ease;
    }

    body.lists-pane-left:has(#combined-list-container.visible) #layer-controls {
        left: var(--lists-w);
    }

    /* While the lists pane is open the map sits to its right (searchDropdown.js: fitMapBesideLists) */
    body.lists-pane-left.lists-open #map {
        left: var(--lists-w);
        width: calc(100vw - var(--lists-w));
    }
    /* ...and the title is centred over the narrower map (centre of the area right of the pane) */
    body.lists-pane-left.lists-open .header-titles {
        left: calc(50% + var(--lists-w) / 2);
    }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: white;
    border-top: 1px solid #ddd;
    z-index: 1010;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 0;
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 11px;
    color: #666;
    transition: all 0.2s;
    padding: 4px;
    position: relative;
}

.mobile-nav-item:active {
    background: rgba(0, 0, 0, 0.05);
}

.mobile-nav-item.active {
    color: var(--brand);
}

.mobile-nav-item svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.mobile-nav-item span {
    font-size: 11px;
    line-height: 1;
}

/* Language button special styling */
.mobile-nav-item .language-icon {
    font-weight: bold;
    font-size: 14px;
    line-height: 24px;
}

.mobile-nav-item .language-label {
    font-size: 10px;
}

/* Mobile Menu Container */
#mobile-menu-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1008;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#mobile-menu-container.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

#mobile-menu-container.active .mobile-menu-content {
    transform: translateY(0);
}

.mobile-menu-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.mobile-menu-link {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    border-radius: 8px;
    transition: background 0.2s;
}

.mobile-menu-link:hover,
.mobile-menu-link:active {
    background: #f5f5f5;
}

.menu-separator-line {
    height: 1px;
    background: #e2e7ec;
    margin: 4px 4px;
}

/* Hamburger Menu (Desktop) */
#hamburger-menu-container {
    position: relative;   /* flows inside the header actions, next to Lists */
    display: inline-flex;
    align-items: center;
    z-index: 1200;
}

#hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 7px;
    padding: 6px 12px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}

#hamburger-btn:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
}

/* Dropdown = mirror of the Layers pane, docked to the right edge */
#hamburger-dropdown {
    display: none;
    position: fixed;
    top: 67px;               /* same height as the Layers pane, right after the thin line */
    right: 0;                /* flush to the right edge */
    margin: 0;
    width: 150px;            /* narrower than the Layers pane */
    background: #f3f6f9;
    border: none;
    border-radius: 0 0 0 10px;   /* mirror: square top, rounded bottom-left */
    box-shadow: -1px 2px 10px rgba(0,0,0,0.20);
    padding: 12px 18px 12px 8px; /* mirror of the Layers pane padding */
    overflow: hidden;
    z-index: 1000;
}

#hamburger-dropdown.open {
    display: block;
}

.hamburger-menu-item {
    display: block;
    padding: 6px 6px;              /* match .layer-control-item */
    color: #555;                   /* match .layer-control-item */
    text-decoration: none;
    transition: background 0.12s ease;
    font-size: 13px;               /* match .layer-control-item */
    line-height: 1.4;
    border-radius: 7px;            /* match .layer-control-item */
    box-sizing: border-box;
}

.hamburger-menu-item span {
    display: inline-block;
    vertical-align: middle;
}

/* Prevent external link icon from appearing */
.hamburger-menu-item[target="_blank"]::after {
    content: none !important;
}

.hamburger-menu-item:hover {
    background: #eef1f4;   /* match .layer-control-item:hover */
}

/* Search Control Item */
.search-control-item {
    padding: 0;
}

.search-control-item .search-toggle-btn {
    width: 100%;
    background: none;
    border: none;
    padding: 0px 0;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.search-control-item .search-toggle-btn:hover {
    color: var(--brand);
}

.search-icon {
    font-size: 16px;
}

/* Combined Dropdown List Container */
.expandable-list {
    position: absolute;
    top: 90px;
    left: 232px; /* 10px (layer-controls left) + 212px (layer-controls width) + 10px (margin) */
    width: 350px;
    max-height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 1100;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

.expandable-list.visible {
    display: flex;
}

.expandable-list.open {
    display: flex;
}

/* Dropdown Header */
.expandable-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    flex-shrink: 0;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.expandable-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Lists pane title ("Κατάλογοι / Lists") — match the info-pane title color */
.expandable-header .mobile-popup-title,
#combined-list-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--brand);
}

.expandable-header .close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 3px;
    color: #666;
    line-height: 1;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expandable-header .close-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.expandable-header .close-btn:hover {
    background: rgba(0,0,0,0.1);
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 0;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    flex-shrink: 0;
}

.tab-btn {
    flex: 1;
    padding: 12px 8px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: var(--brand-tint-05);
    color: var(--brand);
}

.tab-btn.active {
    color: var(--brand);
    border-bottom-color: var(--accent);
    background: white;
}

/* Tab Content */
.tab-content {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.tab-content.active {
    display: flex;
}

/* Search Container */
.search-container {
    padding: 12px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--brand);
}

/* List Filters */
.list-filters {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.filter-btn {
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #e0e0e0;
}

.filter-btn.active {
    background: var(--brand-accent);
    color: white;
    border-color: var(--brand-accent);
}

/* List Container */
.list-container {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

.list-container li {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.2s;
}

.list-container li:hover {
    background: var(--brand-tint);
}

.list-container li:last-child {
    border-bottom: none;
}

.list-container li.hidden {
    display: none;
}

/* List Item Details */
.list-container .community-name {
    font-weight: 600;
    display: block;
    color: #333;
}

.list-container .district {
    color: #999;
    font-size: 12px;
    display: block;
    margin-top: 2px;
}

.list-container .community {
    color: #999;
    font-size: 12px;
    display: block;
    margin-top: 2px;
}

/* Person List Styling */
#missing-persons-list li {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.person-name {
    font-weight: 600;
    color: #333;
}

.person-location {
    font-size: 12px;
    color: #666;
}

.person-status {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
    width: fit-content;
}

.status-killed {
    background: #ffebee;
    color: #c62828;
}

.status-identified {
    background: #fff3e0;
    color: #e65100;
}

.status-missing {
    background: var(--brand-tint);
    color: var(--brand-strong);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    /* Show mobile bottom navigation */
    .mobile-bottom-nav {
        display: flex;
    }

    /* Hide desktop hamburger menu */
    #hamburger-menu-container {
        display: none;
    }

    /* Adjust map for mobile nav */
    #map {
        height: calc(100vh - 56px);
    }

    /* Mobile header: navy bar, title wraps and is fully visible */
    #header {
        display: block;
        height: auto;
        padding: 8px 12px;
        font-size: 14px;
        line-height: 1.3;
    }

    #map-title {
        font-size: 14px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    /* Adjust layer controls for mobile */
    #layer-controls {
        position: fixed;
        top: auto;
        bottom: 56px;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 50vh;
        overflow-y: auto;
        display: none;
        z-index: 1009;
    }

    #layer-controls.mobile-visible {
        display: block;
    }

    /* Adjust custom zoom controls for mobile */
    #custom-zoom-controls {
        bottom: 66px;
        left: 8px;
    }

    #custom-zoom-controls button {
        width: 36px;
        height: 32px;
        font-size: 14px;
        padding: 6px 10px;
    }

    #info-pane {
        width: calc(100% - 20px);
        left: 10px;
        right: 10px;
        top: auto;
        bottom: 66px;
        max-height: 40vh;
    }

    .custom-popup {
        font-size: 12px;
        padding: 8px 12px;
    }

    .missing-person-image {
        width: 60px;
        height: 75px;
    }

    .view-toggle-buttons {
        gap: 4px;
    }

    .view-toggle-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* ===== MOBILE OVERRIDE STYLES ===== */
/* These styles override base styles for mobile-specific behavior */

@media (max-width: 768px) {
    /* Base positioning - override the translateY(100%) from styles.css */
    #combined-list-container {
        transform: translateY(0) !important;
    }

    #combined-list-container.mobile-visible {
        display: flex !important;
        position: fixed !important;
        bottom: 56px !important;
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: calc(50vh - 56px) !important;
        border-radius: 20px 20px 0 0 !important;
        z-index: 1009 !important;
        flex-direction: column !important;
    }

    /* Make layers panel same height as search panel */
    #layer-controls.mobile-visible {
        max-height: calc(50vh - 56px) !important;
    }

    /* Hide headers on all mobile panels to save space */
    #layer-controls .layer-control-header,
    #combined-list-container .mobile-popup-header,
    #combined-list-container .expandable-header,
    .mobile-menu-header {
        display: none !important;
    }

    /* Position menu panel same as other panels */
    #mobile-menu-container.active .mobile-menu-content {
        position: fixed !important;
        bottom: 56px !important;
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: calc(50vh - 56px) !important;
        height: auto !important;
        border-radius: 20px 20px 0 0 !important;
        transform: translateY(0) !important;
    }

    /* Make missing persons list left-aligned and inline */
    #missing-persons-list li {
        display: block !important;
        text-align: left !important;
    }

    #missing-persons-list .person-name,
    #missing-persons-list .person-location,
    #missing-persons-list .person-status {
        display: inline !important;
    }

    /* Swipe indicator line for mobile panels (except info pane) */
    #layer-controls.mobile-visible::before,
    #combined-list-container.mobile-visible::before,
    #mobile-menu-container.active .mobile-menu-content::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 2px;
        z-index: 10;
    }

    /* Hide desktop-only items in layer controls on mobile */
    .desktop-only-layer-item {
        display: none !important;
    }

    /* iOS standard 44px touch targets for layer items */
    #layer-controls .layer-control-item {
        padding: 10px 16px !important;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    #layer-controls .layer-control-item input[type="checkbox"] {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px;
        min-height: 24px;
        margin-right: 12px !important;
        cursor: pointer;
    }

    #layer-controls .layer-control-item span {
        font-size: 16px;
        line-height: 1.5;
    }

    /* iOS standard 44px touch targets for menu items */
    .mobile-menu-link {
        padding: 14px 20px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
    }

    .mobile-menu-link span {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }

    /* Larger spacing between mobile menu items */
    .menu-separator-line {
        margin: 8px 0 !important;
    }
}

/* --- BEGIN info-pane summary test (?info=summary) -------------------------
   Lifted from the .cp-* rules in map/build/generate-pages.mjs so the pane
   matches the right-hand infocard on the static community pages. The -pane
   variant drops the card's own background and border, since the info pane
   already provides them.
   Revert = delete this block. ------------------------------------------- */
.cp-infocard-pane{background:none;border:0;border-radius:0;padding:0}
.cp-infocard-pane .cp-fact{padding:6px 0}
.cp-infocard-pane .cp-fact-head{display:flex;align-items:center;gap:16px}
.cp-infocard-pane .cp-fact-ic{flex:0 0 40px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;color:#aab4bf}
.cp-infocard-pane .cp-fact-ic svg{width:30px;height:30px;display:block}
.cp-infocard-pane .cp-fact-title{font-size:14px;font-weight:700;letter-spacing:.06em;color:#8a97a5}
.cp-infocard-pane .cp-fact-lines{margin-left:56px;margin-top:-1px;display:flex;flex-direction:column}
.cp-infocard-pane .cp-fact-line{font-size:17px;font-weight:600;color:var(--brand);line-height:1.35}
.cp-infocard-pane .cp-fact-sub{font-size:17px;font-weight:400;color:#33475b;line-height:1.35}
.cp-infocard-pane .cp-fact-year{font-size:15px;font-weight:700;letter-spacing:.04em;color:#aab4bf;margin-top:9px;margin-bottom:1px}
.cp-infocard-pane .cp-fact-lines > .cp-fact-year:first-child{margin-top:0}
.cp-infocard-pane .cp-fact-eth{font-size:16px;color:#33475b;line-height:1.4}
.cp-infocard-pane .cp-fact-eth-wrap{line-height:1.3;margin-top:2px}
/* --- END info-pane summary test ---------------------------------------- */

/* 1973-74 school register: enrolment table and staff — info pane (#info-pane-content) and static community pages (#schools section) */
#info-pane-content .sd-pane, #info-pane-content .sd-block { margin-top: 10px; font-size: 17.5px; line-height: 1.55; }   /* = #info-pane-content p */
#schools .sd-block { margin: 8px 0 18px; font-size: 16px; line-height: 1.6; }   /* static pages: schools section */
#info-pane-content .sd-school-name, #schools .sd-school-name { font-weight: 600; margin: 12px 0 4px; }
#info-pane-content .sd-table-wrap, #schools .sd-table-wrap { overflow-x: auto; }
#info-pane-content table.sd-table, #schools table.sd-table { border-collapse: collapse; font-size: inherit; margin: 4px 0 10px; table-layout: fixed; }
#info-pane-content table.sd-table th, #info-pane-content table.sd-table td, #schools table.sd-table th, #schools table.sd-table td { width: 2.4em; padding: 2px 8px; text-align: right; border-bottom: 1px solid #b8c2cc; font-weight: normal; }
#info-pane-content table.sd-table th:first-child, #schools table.sd-table th:first-child { width: 5.6em; text-align: left; font-weight: 600; }
#info-pane-content table.sd-table thead th, #schools table.sd-table thead th { font-weight: 600; }
#info-pane-content table.sd-table .sd-total, #schools table.sd-table .sd-total { width: 4.2em; font-weight: 600; }
#info-pane-content table.sd-table tbody tr:last-child th, #info-pane-content table.sd-table tbody tr:last-child td, #schools table.sd-table tbody tr:last-child th, #schools table.sd-table tbody tr:last-child td { border-bottom: 0; font-weight: 600; }
#info-pane-content .sd-staff-title, #schools .sd-staff-title { font-weight: 600; margin-top: 4px; padding-left: 8px; }
#info-pane-content ul.sd-staff, #schools ul.sd-staff { margin: 2px 0 8px; padding-left: 20px; }
/* bold text in the heading blue (= p.ip-section > b:first-child) */
#info-pane-content table.sd-table thead th,
#schools table.sd-table thead th,
#info-pane-content table.sd-table th[scope="row"],
#schools table.sd-table th[scope="row"],
#info-pane-content table.sd-table .sd-total,
#schools table.sd-table .sd-total,
#info-pane-content table.sd-table tbody tr:last-child td,
#schools table.sd-table tbody tr:last-child td,
#info-pane-content .sd-staff-title,
#schools .sd-staff-title,
#info-pane-content .sd-school-name,
#schools .sd-school-name { color: var(--Grey); }
#schools ul.sd-staff { list-style: disc; }   /* nested inside the school list: keep solid bullets */
/* static pages: each school in its own box (like the church cards); section titles indented one step,
   the table and the teachers' names one step further (table text lines up with the names) */
#schools .school-list { list-style: none; padding-left: 0; }
#schools .school-list > li { margin: 0 0 26px; padding: 14px 18px; background: #f6f8fa; border: 1px solid #e4e9ee; border-radius: 8px; }
#schools .school-list > li:last-child { margin-bottom: 0; }
#schools .sd-block { margin-bottom: 0; }
#schools .sd-table-title, #schools .sd-staff-title,
#info-pane-content .sd-pane .sd-table-title, #info-pane-content .sd-pane .sd-staff-title { margin-left: 1em; padding-left: 0; font-weight: 600; color: var(--brand-accent); margin-top: 8px; }
#schools .sd-table-wrap, #info-pane-content .sd-pane .sd-table-wrap { margin-left: calc(2.4em - 8px); }
#schools ul.sd-staff, #info-pane-content .sd-pane ul.sd-staff { padding-left: 2.4em; }   /* school info window on the map: same as the static pages */

/* Community info pane / static pages: plain lists (cooperative societies) at the pane's text size */
#info-pane-content ul.ip-list { margin: 2px 0 8px; padding-left: 22px; font-size: 17.5px; line-height: 1.55; }
.cp-description ul.ip-list { margin: 2px 0 8px; padding-left: 22px; font-size: 20px; line-height: 1.6; }
#info-pane-content .ip-muted, .cp-description .ip-muted { color: #7a8894; }
#info-pane-content ul.ip-monuments > li + li { margin-top: 8px; }   /* = gap between the intro paragraph and the first monument */
#info-pane-content ul.ip-monuments > li.ip-selected { font-weight: 700; color: var(--brand); }   /* monument whose marker was clicked */

/* === Floating Layers (2026-10-23): no pane behind the layer toggles on desktop —
   labels, checkboxes and the Lists button sit directly on the map. === */
@media (min-width: 769px) {
    #layer-controls {
        background: transparent;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        box-shadow: none;
        border-radius: 0;
    }
    #layer-controls .layer-control-header {
        color: var(--brand);
        border-bottom-color: transparent;
    }
    #layer-controls .layer-chevron { color: var(--brand); }
    #layer-controls .layer-divider { background: transparent; }
    #layer-controls .layer-control-item:hover { background: rgba(255,255,255,0.55); }
    #layer-controls .layer-control-item > span {
        color: #1c2733;
    }
}

/* Lists (Κατάλογοι) button in the header, next to the language button — same pill (2026-10-23) */
#header #search-toggle-btn.header-pill {
    margin: 0;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    color: #ffffff;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease;
}
#header #search-toggle-btn.header-pill:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
}

/* Checkbox to the left of its label (2026-10-23) */
.layer-control-item {
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 14px;
}

/* Larger layer labels (2026-10-23); the column widens to fit the longest label */
@media (min-width: 769px) {
    #layer-controls { width: auto; }
    .layer-control-item > span { font-size: 17px; }
    .layer-control-item { padding-top: 7px; padding-bottom: 7px; }
}

/* No dividers between layer groups — every label is spaced the same (2026-10-23) */
#layer-controls .layer-divider { display: none; }

/* Πληθυσμός sits to the right of Κοινότητες, smaller (2026-10-23) */
.layer-control-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.layer-control-item.layer-control-sub > span { font-size: 13px !important; }
.layer-control-item.layer-control-sub { gap: 6px; }
.layer-control-item.layer-control-sub input[type="checkbox"] {
    width: 14px;
    height: 14px;
    border-width: 1.5px;
    border-radius: 3px;
}
.layer-control-item.layer-control-sub input[type="checkbox"]:checked::after {
    left: 3px;
    top: 0;
    width: 4px;
    height: 8px;
}

/* Square header buttons; Κατάλογοι (the left one) in the palette light blue (2026-10-23) */
#header #language-toggle.header-pill,
#header #search-toggle-btn.header-pill { border-radius: 0; }
#header #search-toggle-btn.header-pill {
    background: var(--brand-mid);      /* #6086AB — between the sea and the title box */
    border-color: var(--brand-mid);
    color: #ffffff;
    font-weight: 600;
}
#header #search-toggle-btn.header-pill:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #ffffff;
}

/* Hamburger: just the three lines in black, no button (2026-10-23) */
#hamburger-btn,
#hamburger-btn:hover {
    background: transparent;
    border: none;
    color: #000000;
    padding: 4px 6px;
    font-size: 22px;
}

/* Square corners on the info pane (2026-10-23) */
#info-pane,
#info-pane-header { border-radius: 0 !important; }

/* Square corners on the hover box over communities and points (2026-10-23) */
.custom-popup { border-radius: 0; }

/* Square corners on the Lists (Κατάλογοι) pane and its header (2026-10-23) */
@media (min-width: 769px) {
    .expandable-list,
    #combined-list-container,
    .expandable-header { border-radius: 0 !important; }
}

/* Phone: title on exactly two lines, smaller */
@media (max-width: 768px) {
    #map-title { white-space: nowrap; }
    #map-title .t1 { font-size: 13px; letter-spacing: 0.12em; }
    #map-title .t2 { font-size: 15px; margin-top: 2px; }
}
@media (max-width: 360px) {
    #map-title .t1 { font-size: 12px; letter-spacing: 0.08em; }
    #map-title .t2 { font-size: 13.5px; }
}

/* Thin navy line under the top title line only, as in title-option-D (2026-10-24) */
#map-title {
    display: flex;
    flex-direction: column;
    align-items: center;
}
#map-title .t1 {
    display: inline-block;
    position: relative;
    padding-bottom: 6px;
    padding-left: 0.18em;      /* balances the letter-spacing after the last letter, so the text stays centred */
}
/* The line spans exactly the letters: inset by the letter-spacing on both sides */
#map-title .t1::after {
    content: "";
    position: absolute;
    left: 0.18em;
    right: 0.18em;
    bottom: 0;
    height: 1px;
    background: var(--brand);
}

/* Zoom +/− bottom right, styled like Google's own zoom buttons; each press = half a level (2026-10-24) */
#custom-zoom-controls {
    display: flex;
    left: auto;
    right: 10px;
    bottom: 24px;
    border: none;
    border-radius: 2px;
    box-shadow: rgba(0,0,0,0.3) 0 1px 4px -1px;
}
#custom-zoom-controls button {
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 24px;
    font-weight: 400;
    line-height: 40px;
    text-align: center;
    color: #666666;
    background: #ffffff;
}
#custom-zoom-controls button:not(:last-child) {
    border-bottom: 1px solid #e6e6e6;
}
#custom-zoom-controls button:hover {
    background: #ffffff;
    color: #333333;
}
#custom-zoom-controls button:focus { outline: none; background: #ffffff; }
#custom-zoom-controls button:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: -2px; }
@media (max-width: 768px) {
    #custom-zoom-controls { right: 8px; bottom: 66px; left: auto; }
    #custom-zoom-controls button { width: 36px; height: 36px; line-height: 36px; font-size: 22px; padding: 0; }
}

/* Info pane: orange line under the title bar, orange "Περισσότερα →" link (2026-10-24) */
#info-pane-header { border-bottom: 1px solid var(--accent); }
#info-pane-content p.info-more a,
#info-pane-content p.info-more a:visited { color: var(--accent); }
#info-pane-content p.info-more a:hover { color: var(--accent-light); }

/* Info pane on top of the title and the top-right buttons (2026-10-25).
   The header sits below the pane; the ☰ dropdown lives on <body> so the menu still opens over it. */
#header { z-index: 1500; }              /* above the map and panes, below the info pane (2000) */
#hamburger-dropdown { z-index: 2500; }  /* moved to <body> by menu.js, so it can open over the info pane */

/* Phone: no + / − buttons (pinch to zoom) */
@media (max-width: 768px) {
    #custom-zoom-controls { display: none !important; }
}

/* "Οι Κοινότητες" button under the title, linking to the static index page — same look as Κατάλογοι (2026-10-25) */
#communities-index-btn.header-pill {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    color: #ffffff;
    background: var(--brand-mid);
    border: 1px solid var(--brand-mid);
    border-radius: 0;
    cursor: pointer;
    pointer-events: auto;              /* the title block itself lets map drags through */
    transition: background 0.15s ease;
}
#communities-index-btn.header-pill:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #ffffff;
}

/* ---- POI click window (POI_CLICK_WINDOW in constants.js; ui/poiWindow.js) ----
   Settings you can change: */
:root {
    --pw-width:       300px;   /* window width */
    --pw-row-size:    13px;    /* text size of the data lines */
    --pw-row-gap:     7px;     /* space between data lines */
    --pw-name-size:   16px;    /* name size */
    --pw-max-body:    45vh;    /* taller content (school staff lists) scrolls inside the window */
}
.custom-popup.poi-window {
    width: var(--pw-width);
    padding: var(--pp-frame) var(--pp-frame) 14px;
    cursor: default;
    z-index: 1100;
}
.poi-window .pw-close {
    position: absolute; top: 6px; right: 6px; z-index: 2;
    width: 26px; height: 26px; border: 0; border-radius: 50%;
    background: rgba(255,255,255,.92); color: #444; font-size: 20px; line-height: 24px;
    cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.25); padding: 0;
}
.poi-window .pw-photo { position: relative; aspect-ratio: var(--pp-photo-ratio); background: #eee; }
.poi-window .pw-photo img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.poi-window .pw-prev, .poi-window .pw-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 28px; height: 28px; border: 0; border-radius: 50%; padding: 0;
    background: rgba(0,0,0,.45); color: #fff; font-size: 20px; line-height: 26px; cursor: pointer;
}
.poi-window .pw-prev { left: 6px; }
.poi-window .pw-next { right: 6px; }
.poi-window .pw-prev:hover, .poi-window .pw-next:hover { background: rgba(0,0,0,.7); }
.poi-window .pw-count {
    position: absolute; right: 6px; bottom: 6px; padding: 1px 6px;
    background: rgba(0,0,0,.5); color: #fff; font-size: 11px;
}
.poi-window .pw-cap { font-size: 11px; color: #888; margin: 4px 0 0; }
.poi-window .pw-cap a { color: inherit; }
.poi-window .pw-photo + .pw-cap + .pw-body { margin-top: var(--pp-photo-gap); }
.poi-window .pw-body { max-height: var(--pw-max-body); overflow-y: auto; }
.poi-window .pw-name { color: var(--pp-name-color); font-size: var(--pw-name-size); margin-bottom: 8px; padding-right: 22px; }
.poi-window .pw-photo ~ .pw-body .pw-name { padding-right: 0; }
.poi-window .pw-row { display: flex; gap: 8px; align-items: flex-start; font-size: var(--pw-row-size); line-height: 1.4; color: #444; margin-top: var(--pw-row-gap); }
.poi-window .pw-ico { flex: none; color: #888; margin-top: 1px; }
.poi-window .pw-sub { font-size: 12px; color: #777; }
.poi-window .pw-label { color: #777; }
.poi-window .pw-source { font-size: 11px; color: #999; margin-top: 10px; padding-top: 6px; border-top: 1px solid #eee; }
.poi-window .pw-school { font-size: 12px; margin-top: 10px; }
.poi-window .sd-table-title, .poi-window .sd-staff-title { font-weight: 600; color: #555; margin: 8px 0 2px; }
.poi-window table.sd-table { border-collapse: collapse; margin: 2px 0 6px; }
.poi-window table.sd-table th, .poi-window table.sd-table td { padding: 1px 5px; text-align: right; border-bottom: 1px solid #dde3e8; font-weight: normal; }
.poi-window table.sd-table th:first-child { text-align: left; font-weight: 600; }
.poi-window table.sd-table thead th, .poi-window table.sd-table .sd-total { font-weight: 600; }
.poi-window ul.sd-staff { margin: 2px 0 0; padding-left: 16px; }
.poi-window .sd-role { color: #888; }
.pw-lightbox { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.pw-lightbox img { max-width: 94vw; max-height: 94vh; }

/* ---- The same content in the side info pane (POI_PANE_DATA in constants.js) ----
   Settings you can change: */
.pw-in-pane {
    --pw-row-size:   16px;     /* text size of the data lines in the pane */
    --pw-row-gap:    10px;     /* space between data lines */
    --pw-layer-size: 12px;     /* category (ΕΚΚΛΗΣΙΕΣ) size */
}
.pw-in-pane .pw-body { max-height: none; overflow: visible; }
.pw-in-pane .pw-photo + .pw-cap + .pw-body { margin-top: 14px; }
.pw-in-pane .pw-cap { font-size: 12px; color: #777; }
.pw-in-pane .popup-layer { font-size: var(--pw-layer-size); letter-spacing: .08em; color: #888; margin-bottom: 4px; }
.pw-in-pane .pw-ico { width: 18px; height: 18px; margin-top: 2px; }
.pw-in-pane .pw-sub { font-size: 14px; }
.pw-in-pane .pw-source { font-size: 13px; margin-top: 16px; padding-top: 8px; }
.pw-in-pane .pw-school { font-size: inherit; }
.pw-in-pane .pw-prev, .pw-in-pane .pw-next { width: 34px; height: 34px; font-size: 24px; line-height: 32px; }
.pw-in-pane .pw-count { font-size: 12px; }
/* community pane as data lines (COMMUNITY_PANE_DATA) */
.pw-community .popup-layer { margin-bottom: 2px; }
.pw-community .pw-rows > .pw-row:first-child { margin-top: 6px; }
.pw-community .pw-handwritten p { font-size: var(--pw-row-size); line-height: 1.5; color: #444; margin: 6px 0 4px; }
.pw-community .pw-list { margin: 2px 0 0; padding-left: 16px; }
.pw-in-pane .pw-name { font-weight: bold; font-size: 18px; margin: 2px 0 4px; padding-right: 0; }   /* name under the category in the pane */

/* TEST: serif font in the hover popups and the info pane -- only while SERIF_TEST = true (constants.js) */
:root { --serif-test-font: 'Noto Serif', Georgia, 'Times New Roman', serif; }
.serif-test .custom-popup, .serif-test .custom-popup *,
.serif-test #info-pane, .serif-test #info-pane * { font-family: var(--serif-test-font) !important; }
.pw-in-pane .pw-group + .pw-group { margin-top: var(--pw-group-gap, 8px); }   /* space between Εκκλησίες / Εξωκκλήσια / Μονές */
.pw-community .pw-row .pw-handwritten p { margin: 0 0 6px; }
.pw-community .pw-row .pw-handwritten p:last-child { margin-bottom: 0; }
#info-pane-content .pw-handwritten p { margin: 0 0 6px; font-size: inherit; line-height: inherit; }   /* beats the pane's own p margins */
#info-pane-content .pw-handwritten p:last-child { margin-bottom: 0; }
