/* Network maps (Pan-Imperial Journeys, ship journeys), drawn with sigma.js */

#container {
    position: relative;
    width: 1041px;
    height: 577px;
    margin: 0 auto;
    background-image: url("world-map-base.png");
    background-size: contain;
    border: 1px solid var(--map-frame);
}

#controls-div {
    width: 1041px;
}

#seven-years-war-label {
    position: absolute;
    top: 62px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.15em;
    color: var(--oxblood);
    text-shadow: 0 0 6px #fff, 0 0 12px #fff;
    pointer-events: none;
    z-index: 5;
}

/* Name search, top left of the map */
#search-box {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.autocomplete {
    position: relative;
    display: flex;
    gap: 0.4rem;
    width: 300px;
}

#edge-search {
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-family: "Inter", sans-serif;
    font-size: 0.9em;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--paper-edge);
    border-radius: 0;
    outline: none;
}

#edge-search:focus {
    border-color: var(--border-strong);
}

#clear-edge-search {
    display: none;
    padding: 0 0.8rem;
    font-family: "Inter", sans-serif;
    font-size: 0.85em;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--border-strong);
    cursor: pointer;
}

#clear-edge-search:hover {
    background: var(--ink);
    color: #fff;
}

.autocomplete-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid var(--paper-edge);
    border-top: none;
    max-height: 280px;
    overflow-y: auto;
    z-index: 10;
}

.autocomplete-items div {
    padding: 0.5rem 0.75rem;
    font-size: 0.88em;
    cursor: pointer;
    background: #fff;
    border-bottom: 1px solid var(--paper-edge);
}

.autocomplete-items div:hover,
.autocomplete-active {
    background: var(--ink) !important;
    color: #fff;
}

/* Biography of the person found by the search, under the map */
#search-bio:not(:empty) {
    max-width: 1041px;
    margin: 1rem auto 0;
    padding: 1rem 1.25rem;
    background: var(--bg);
    border-left: 3px solid var(--accent);
    font-size: 1rem;
    line-height: 1.7;
}

#search-bio mark {
    background: rgba(122, 31, 31, 0.12);
    color: inherit;
    padding: 0 2px;
}

/* Histogram of journeys over time, bottom left of the map */
.histogram-card {
    position: absolute;
    left: 12px;
    bottom: 12px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--paper-edge);
    padding: 0.4rem 0.4rem 0;
    z-index: 5;
}

.histogram-title {
    font-family: var(--sans);
    font-size: 0.65em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    padding-left: 0.4rem;
}

#dates-histogram svg {
    display: block;
}

#dates-histogram text {
    font-family: "Inter", sans-serif;
    fill: var(--muted);
}

#dates-histogram .domain,
#dates-histogram .tick line {
    stroke: #b9b2a3;
}
