:root {
    --bg: #ffffff;
    --panel: #f6f8f9;
    --line: rgba(15, 30, 40, .12);
    --ink: #17262e;
    --muted: #5a7078;
    --accent: #0288d1;
    --hq: #e5484d;
    --rep: #e0850b;
    --school: #0288d1;
    --location: #0f9e92;
}

* {
    box-sizing: border-box;
}

.ffmap {
    display: flex;
    height: 640px;
    max-height: 86vh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background: var(--bg);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
}

.ffmap__side {
    width: 340px;
    flex: none;
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border-right: 1px solid var(--line);
}

.ffmap__head {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--line);
}

.ffmap__title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
}

.ffmap__sub {
    margin: 0;
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.45;
}

.ffmap__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
}

.ffmap__chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(15, 30, 40, .04);
    border: 1px solid var(--line);
    font-size: 12.5px;
    cursor: pointer;
    user-select: none;
    color: var(--ink);
    transition: opacity .15s, background .15s;
}

.ffmap__chip[aria-pressed="false"] {
    opacity: .4;
}

.ffmap__chip .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: none;
}

.ffmap__list {
    overflow-y: auto;
    flex: 1;
    padding: 6px 0;
}

.ffmap__item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 11px 20px;
    background: none;
    border: 0;
    border-bottom: 1px solid rgba(15, 30, 40, .07);
    cursor: pointer;
    color: var(--ink);
    font: inherit;
    transition: background .12s;
}

.ffmap__item:hover, .ffmap__item.is-active {
    background: rgba(2, 136, 209, .09);
}

.ffmap__item b {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.ffmap__item span {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}

.ffmap__type {
    display: inline-block;
    font-size: 10.5px;
    text-transform: uppercase;
    varter-spacing: .04em;
    margin-bottom: 4px;
    padding: 1px 7px;
    border-radius: 4px;
}

.ffmap__map {
    flex: 1;
    position: relative;
}

#ffmapCanvas {
    position: absolute;
    inset: 0;
}

.ffmap__err {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.ffmap__pin {
    width: 20px;
    height: 20px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .28);
    cursor: pointer;
}

.ffmap__balloon {
    font-family: system-ui, sans-serif;
    max-width: 240px;
}

.ffmap__balloon b {
    font-size: 14px;
}

.ffmap__balloon p {
    margin: 5px 0 0;
    font-size: 12.5px;
    color: #555;
    line-height: 1.45;
}

.ffmap__balloon a {
    color: #0288d1;
    font-size: 12.5px;
}


/* === Map Point Modal === */

.point-modal {
    border-radius: 6px;
    padding: 0 !important;
}

.point-modal__header {
    border-bottom: 1px solid #e2e2e2;
    padding: 16px 24px;
}

.point-modal__name {
    margin: 0;
    padding: 0;
}


.point-modal__badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 12px;
    border-radius: 8px;
    line-height: 1.2;
    margin-bottom: 18px;
}

.point-modal__content-wrapper {
    padding: 16px 24px;
}
.point-modal__detail {
    display: grid;
    grid-template-columns: minmax(110px, 150px) 1fr;
    gap: 16px;
    border-bottom: 1px solid #e2e2e2;
    padding: 14px 0;
}

.point-modal__detail:last-of-type {
    border-bottom: none;
}

.point-modal__detail-label {
    color: #6c737f;
}

.point-modal__url {
    display: flex;
    justify-content: flex-end;
    margin-top: 40px;
}

.point-modal__more-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    height: max-content;
    border-radius: 8px;
    border: 1px solid #5080FC;
    padding: 4px 16px;
    line-height: 1;
    color: #5080FC;
    transition: border-color .25s ease-in-out, color .25s ease-in-out, background-color .25s ease-in-out;
    font: inherit;
    background: transparent;
    cursor: pointer;
}

.point-modal__more-link:hover {
    border-color: #5080FC;
    background-color: #5080FC;
    color: #ffffff;
}

.point-modal__close {
    height: 36px;
    padding: 8px 16px;
    color: #7b818d;
    background: var(--light-blue);
    border: 0;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}


/* === End of Map Point Modal === */

.add-point-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    height: max-content;
    border-radius: 8px;
    border: 1px solid #5080FC;
    padding: 4px 16px;
    margin-top: 18px;
    line-height: 1;
    background-color: #5080FC;
    color: #ffffff;
    transition: border-color .25s ease-in-out, color .25s ease-in-out, background-color .25s ease-in-out;
    font: inherit;
    cursor: pointer;
}

.add-point-button:hover {
    background: #1C32A3;
    color: #ffffff;
}

@media (max-width: 720px) {
    .ffmap {
        flex-direction: column;
        height: auto;
        max-height: none;
    }

    .ffmap__side {
        width: 100%;
    }

    .ffmap__list {
        max-height: 220px;
    }

    .ffmap__map {
        height: 380px;
        flex: none;
    }
}