/* Orglist full-page map */
html, body.orglist-map-page {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #0f172a;
}

.org-map-shell {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#org-map {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.org-brand {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.org-logo {
    display: block;
    padding: 0;
    background: transparent;
    border-radius: 0;
    line-height: 0;
    text-decoration: none;
    box-shadow: none;
}

.org-logo img {
    display: block;
    height: 48px;
    width: auto;
    filter: brightness(0) invert(28%);
}

.org-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
}

.org-lang {
    display: inline-flex;
    gap: 4px;
}

.org-lang-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    color: #0f172a;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.org-lang-link.is-active,
.org-lang-link:hover {
    background: #0f172a;
    color: #fff;
}

.org-social {
    display: inline-flex;
    gap: 2px;
    margin-left: 2px;
    padding-left: 6px;
    border-left: 1px solid rgba(15, 23, 42, 0.12);
}

.org-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: #0f172a;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.org-social-link:hover {
    background: rgba(15, 23, 42, 0.08);
    color: #0369a1;
}

.org-panel {
    position: absolute;
    top: 16px;
    right: 16px;
    bottom: 16px;
    width: min(400px, calc(100vw - 32px));
    z-index: 1000;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.org-panel-head {
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.org-panel-head h1 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.org-filters {
    display: grid;
    gap: 8px;
}

.org-filters input,
.org-filters select,
.org-filters button {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dbe1ea;
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
}

.org-filters button {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
    cursor: pointer;
    font-weight: 600;
}

.org-filters button:hover {
    background: #1e293b;
}

.org-filters-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.org-panel-meta {
    margin: 8px 0 0;
    font-size: 12px;
    color: #64748b;
}

.org-list {
    flex: 1;
    overflow: auto;
    padding: 8px;
}

.org-item {
    display: block;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.org-item:hover,
.org-item.is-active {
    background: rgba(15, 23, 42, 0.05);
    border-color: rgba(15, 23, 42, 0.08);
}

.org-item-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.org-item-meta {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.org-empty {
    padding: 24px 16px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

.org-panel-toggle {
    display: none;
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 1001;
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    background: #0f172a;
    color: #fff;
    font: inherit;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.leaflet-popup-content {
    margin: 10px 12px;
    font-size: 13px;
    line-height: 1.4;
}

.leaflet-popup.org-popup-wrap .leaflet-popup-content-wrapper {
    border-radius: 10px;
}

.org-popup {
    min-width: 220px;
    max-width: 340px;
}

.org-popup-title {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.35;
    margin-bottom: 8px;
    color: #0f172a;
}

.org-popup-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.org-popup-table th,
.org-popup-table td {
    padding: 5px 0;
    vertical-align: top;
    border-top: 1px solid #e2e8f0;
    font-size: 12px;
    line-height: 1.35;
}

.org-popup-table tr:first-child th,
.org-popup-table tr:first-child td {
    border-top: 0;
}

.org-popup-table th {
    width: 42%;
    padding-right: 10px;
    color: #64748b;
    font-weight: 600;
    text-align: left;
}

.org-popup-table td {
    color: #0f172a;
    word-wrap: break-word;
}

.org-popup-table a {
    color: #0369a1;
    text-decoration: none;
}

.org-popup-table a:hover {
    text-decoration: underline;
}

.org-popup-actions {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

.org-popup-actions a {
    color: #0369a1;
    font-weight: 600;
    text-decoration: none;
}

.org-popup-actions a:hover {
    text-decoration: underline;
}

.leaflet-popup-content strong {
    display: block;
    margin-bottom: 4px;
}

@media (max-width: 820px) {
    .org-brand {
        top: 12px;
        left: 12px;
    }

    .org-logo {
        padding: 0;
    }

    .org-logo img {
        height: 36px;
    }

    .org-panel {
        top: auto;
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        max-height: 48vh;
        border-radius: 16px 16px 0 0;
        transform: translateY(calc(100% - 56px));
        transition: transform 0.25s ease;
    }

    body.org-panel-open .org-panel {
        transform: translateY(0);
    }

    .org-panel-toggle {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    body.org-panel-open .org-panel-toggle {
        bottom: calc(48vh + 8px);
    }
}
