/* Genosis Time Map 2 */
html, body.tm-body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Open Sans", Helvetica, Arial, sans-serif;
    font-size: 13px;
    color: #333;
}

#tm-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: #2F3B2F;
    color: #FFF;
    z-index: 1100;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}

#tm-top a.tm-home {
    color: #E8DCB5;
    font-weight: bold;
    text-decoration: none;
}

#tm-top .tm-title {
    font-weight: bold;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#tm-follow-box label {
    margin-right: 6px;
}

#tm-follow {
    width: 240px;
    padding: 4px 6px;
    border: 0;
    border-radius: 3px;
}

#tm-map {
    position: absolute;
    top: 44px;
    bottom: 56px;
    left: 0;
    right: 0;
    background: #DFE7EA;
}

#tm-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #F7F5EF;
    border-top: 1px solid #CCC;
    z-index: 1100;
}

#tm-slider {
    flex: 1;
    min-width: 120px;
}

.tm-year {
    font-size: 22px;
    font-weight: bold;
    min-width: 72px;
    text-align: center;
    color: #2F3B2F;
}

.tm-opts label {
    margin-right: 10px;
    white-space: nowrap;
}

.tm-count {
    color: #777;
    white-space: nowrap;
}

.tm-btn {
    border: 1px solid #999;
    background: #FFF;
    border-radius: 3px;
    padding: 3px 8px;
    cursor: pointer;
}

.tm-play {
    width: 40px;
    height: 34px;
    font-size: 15px;
}

.tm-select {
    padding: 3px;
}

/* Pins */
.tm-pin span {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #FFF;
    box-shadow: 0 0 2px rgba(0, 0, 0, .6);
}

.tm-pin.tm-new span {
    width: 16px;
    height: 16px;
    margin: -2px 0 0 -2px;
    box-shadow: 0 0 0 4px rgba(255, 200, 0, .55), 0 0 2px rgba(0, 0, 0, .6);
}

.tm-arrow span {
    display: block;
    width: 0;
    height: 0;
    margin: 0 auto;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 12px solid #8A5A2B;
}

.tm-step span {
    min-width: 20px;
    padding: 0 3px;
    box-sizing: border-box;
    display: inline-block;
    height: 20px;
    line-height: 18px;
    text-align: center;
    border-radius: 10px;
    background: #E74C3C;
    color: #FFF;
    font-weight: bold;
    font-size: 11px;
    border: 1px solid #FFF;
}

/* Popup */
.tm-pop {
    display: flex;
    gap: 10px;
    min-width: 220px;
}

.tm-pop-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 3px;
}

.tm-pop-name {
    font-weight: bold;
    font-size: 14px;
}

.tm-pop-links {
    margin-top: 6px;
}

/* Panels */
#tm-legend, #tm-path-box {
    position: absolute;
    z-index: 1050;
    background: rgba(255, 255, 255, .95);
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .35);
    padding: 8px 10px;
}

#tm-legend {
    top: 56px;
    right: 12px;
    line-height: 20px;
}

#tm-path-box {
    top: 56px;
    left: 56px;
    width: 380px;
    max-width: calc(100% - 80px);
    max-height: calc(100% - 140px);
    overflow: auto;
}

#tm-path-list {
    margin: 6px 0;
    padding: 0;
    list-style: none;
}

#tm-path-list li {
    display: flex;
    gap: 8px;
    padding: 4px 2px;
    border-bottom: 1px solid #EEE;
    line-height: 1.35;
}

#tm-path-list li.tm-onmap {
    cursor: pointer;
}

#tm-path-list li.tm-onmap:hover {
    background: #FDF2F0;
}

#tm-path-list .tm-num {
    flex: 0 0 22px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    color: #FFF;
    background: #E74C3C;
}

#tm-path-list li.tm-nomap .tm-num {
    background: #CCC;
}

#tm-path-list li.tm-nomap {
    color: #777;
}

#tm-path-list small {
    color: #666;
}

#tm-path-list .tm-desc {
    font-style: italic;
}

.tm-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

#tm-message {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1200;
    background: #FFF;
    padding: 16px 20px;
    border-radius: 4px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .35);
    max-width: 420px;
    text-align: center;
}

@media (max-width: 760px) {
    #tm-path-box {
        left: 50px;
        right: 8px;
        width: auto;
        max-width: none;
        max-height: 40%;
    }
    #tm-follow-box label, .tm-count {
        display: none;
    }

    #tm-follow {
        width: 140px;
    }

    #tm-bar {
        height: auto;
        flex-wrap: wrap;
        padding: 6px;
    }
}

/* Life path on the profile page */
.tm-life {
    margin: 0 0 12px 0;
    border-radius: 2px;
    overflow: hidden;
}

.tm-life-head {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    background: #F6F6F6;
    font-weight: bold;
}

.tm-life-head a {
    font-weight: normal;
    font-size: 13px;
}

.tm-life-map {
    height: 260px;
}

/* Pin groups */
.tm-cluster div {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 3px rgba(0, 0, 0, .5);
}

.tm-cluster span {
    background: #FFF;
    border-radius: 50%;
    width: 62%;
    height: 62%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    color: #333;
}

/* Labels are capitalized (names and places are left as entered) */
.tm-cap,
.tm-opts label,
#tm-follow-box label,
#tm-speed,
#tm-path-clear,
#tm-count,
#tm-legend div,
.tm-pop-links a,
.tm-life-head {
    text-transform: capitalize;
}

/* Everyone in a group has died by the slider year */
.tm-cluster.tm-dead {
    opacity: 0.4;
}
