@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&family=Noto+Sans:ital,wght@0,400;0,600;1,400&display=swap');


:root {
    --primary-color: #DD4127;
    --light-primary: #fcf2f0;
    --hyperlink-color: #0E5A6F;
}

body, html {
    margin: 0px;
    padding: 0px;
    font-family: "whitney", sans-serif;
}

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

h1, h2 {
    font-family: "whitney", sans-serif;
    color: var(--primary-color);
    font-weight: normal;
}

header {
    padding: 50px;
    border-bottom: 2px solid var(--light-primary);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

header h1 {
    flex: 1 0 100%;
}

header p {
    flex: 0 1 50%;
    text-align: justify;
}

header p:first-of-type {
    padding-right: 50px;

}


footer {
    padding: 20px;
    border-top: 2px solid var(--light-primary);
}

#topbar {
    margin: 0px;
    padding: 5px 20px;
    width: 100%;
    height: 40px;
    font-family: "whitney", sans-serif;
    background-color: var(--primary-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#topbar a:link, #topbar a:visited {
    color: #FFFFFF;
}

#topbar a {
    font-weight: normal;
}

#btc-about-text {
    width: 50%;
    float: left;
}

#btc-about-logos {
    width: 500px;
    float: left;
    margin-left: 30px;
    margin-bottom: 30px;
}

#banner-container {
    width: 100%;
    height: 400px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

#banner-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
}

.jp {
    font-family: "Noto Sans JP", sans-serif;
}

#container {
    display: flex;
    flex-direction: row;
    position: relative;
    font-family: "Noto Sans", sans-serif;

}

#container h1, #container h2 {
    font-family: "Noto Sans", sans-serif;
}

#chart--controls {
    z-index: 100;
    width: 400px; /* 30% */
    flex: 0 1 400px;
    height: 100vh;
    background-color: var(--light-primary);
    padding: 20px;
    position: sticky;
    top: 0px;
    margin-left: 0px;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
}

#chart--controls h1 {
    color: var(--primary-color);
}

#chart--controls h2 {
    color: #000000;
    margin: 20px 0px 0px 0px;
    font-size: 12pt;
    font-weight: bold;
    padding: 0px;
}

#legend {
    width: 100%;
    height: 100px;
    padding: 0px;
}


#controls--footer {
    border: 1px solid var(--primary-color);
    padding: 10px 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    align-content: center;
    margin-top: auto;
    background-color: white;
    border-radius: 10px;
}

#btc-logo-container {
    flex: 1 0 100px;
    width: 100px;
}

#btc-logo-container img {
    width: 100%;
}

#btc-info {
    flex: 0 1 100%;
    padding-left: 15px;
    font-size: 10pt;
}

#chart--container {
    z-index: 500;
    width: calc(100% - 400px); /* 60% */
    flex: 0 1 calc(100% - 400px);
    position: relative;
    top: 0px;
    /* left: 400px; */
    /* height: 100vh; */
    /* overflow-y: scroll; */
}

#timelines {
    position: sticky;
    top: 0;
    background: linear-gradient(rgba(255,255,255,1), 95%, rgba(255,255,255,0));
}


#chart {
    z-index: -100;
    width: 100%;
    min-height: 100vh;
    position: relative;
}

#resize--overlay {
    z-index: 1000;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0px;
    left: 0px;
    background-color: #FFFFFF;
    opacity: 0.8;
}

#details--container,
#timeline-expand--container {
    z-index: 1000;
    position: sticky;
    top: 0px;
    right: -400px;
    width: 400px;
    height: 100vh;
    overflow-y: scroll;
    overflow-x: clip;
    padding-right: 20px;
    padding-left: 20px;
    background-color: #F9F9F9;
    border-left: 2px solid #FFFFFF;
    box-shadow: -15px 0px 15px #CCCCCC;
    font-size: 11pt;
    line-height: 16pt;
}

#details--container,
#timeline-expand--container {
    display: none;
}

#timeline-expand--filters {
    font-size: 10pt;
    margin-top: 10px;
}

#timeline-expand--filters label {
    margin-right: 10px;
}


#timeline-expand--closebutton,
#details-expand--closebutton {
    width: 100%;
    margin: 0px 0px 20px 0px;
    padding: 15px 0px 15px 0px;
    color: #446688;
    font-size: 10pt;
    text-align: right;
}

#timeline-expand--closebutton:hover,
#details-expand--closebutton:hover {
    font-weight: bold;
    cursor: pointer;
}

#timeline-expand--events {
    margin-top: 20px;
}

#timeline-expand--closebutton {
	position: sticky;
	top: 0;
	z-index: 1000;
	background-color: #F9F9F9;
}


#details {
    width: 100%;
    position: relative;
    /* top: 0; */
    padding-bottom: 50px;
}

#details--romaji, #timeline-expand--header {
    color: var(--primary-color);
    padding-bottom: 0px;
    margin-bottom: 0px;
    margin-top: 0px;
    font-family: "Noto Sans", sans-serif;
    font-weight: 600;
}



#details--kanji {
    padding-top: 0px;
    margin-top: 0px;
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 700;
    color: #333333;
}

#details--romaji, #details--kanji {
    font-size: 22pt;
    line-height: 28pt;
}


#details--header-container {
    position: sticky;
    top: 0;
    background-color: #F9F9F9;
    padding-bottom: 15px;
    margin: 0px;
    padding-top: 0px;
}



.subsection--header {
    font-size: 13pt;
    font-weight: bold;
    border-bottom: 1px solid #CCCCCC;
    margin-top: 50px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.photographer--name {
    font-size: 10pt;
    font-weight: 400;
    text-anchor: end;
    dominant-baseline: central;
    pointer-events: none;
}

.photographer--name-bounding-rect {
    cursor: pointer;
    pointer-events: all;
    fill: none;
    stroke: none;
}

.name--romaji {
    font-family: "Noto Sans", sans-serif;
}

.name--kanji {
    font-family: "Noto Sans JP", sans-serif;
}

.vitals--label {
    font-family: "Noto Sans", sans-serif;
    font-size: 10pt;
    text-anchor: start;
    dominant-baseline: central;
    pointer-events: none;
}

.legend--label {
    font-family: "Noto Sans", sans-serif;
    font-size: 10pt;
    text-anchor: middle;
    dominant-baseline: central;
}


.events--label, .expand--label {
    font-family: "Noto Sans", sans-serif;
    font-size: 8pt;
    font-weight: 600;
    text-transform: uppercase;
    text-anchor: start;
    dominant-baseline: central;  
    cursor: default;
}

.expand--label {
    font-weight: 300;
    text-transform: unset;
    fill: var(--primary-color); 
    text-anchor: end;
}

.expand--label:hover {
    font-weight: 600;
    cursor: pointer;
}


.photographer--axis {
    stroke: #CCCCCC;
    stroke-width: 10;
    pointer-events: none;
}

.photographer--unknown, .photographer--death-unknown {
    pointer-events: none;
}

.events--axis {
    stroke: #DDDDDD;
    stroke-width: 10;
}

.photographer--birth {
    stroke: #CCCCCC;
    fill: #333333;
    pointer-events: none;
}

.photographer--death {
    stroke: #CCCCCC;
    fill: #333333;
    pointer-events: none;
}

.photographer--death-unknown {
    fill: #FFFFFF;
    font-size: 8pt;
    dominant-baseline: central;
    text-anchor: middle;
    font-weight: bold;
}

.photographer--active {
    stroke: #CCCCCC;
    fill: #DD4127;
    pointer-events: none;
}

.photographer--inactive {
    stroke: #CCCCCC;
    fill: #DD4127;
    pointer-events: none;
}

.photographer--activeyears {
    stroke: #DD4127;
    stroke-width: 4;
    stroke-linecap: round;
    pointer-events: none;
}

.photographer--event {
    stroke-width: 1.5;
    stroke-linecap: round;
    pointer-events: all;
    fill: #AAAAAA;
    stroke: #FFFFFF;
    pointer-events: visible;
}

.photographer--event-active {
    fill: var(--primary-color);
    stroke: #FFFFFF;
    
}

.photographer--event-container {
    visibility: hidden;
}


.event--marker {
    stroke: var(--primary-color);
    stroke-width: 2;
}

.tooltip {
    position: absolute;
    top: 0px;
    left: 0px;
    visibility: hidden;
    pointer-events: none;
    width: 400px;
    background-color: rgba(255,255,255,0.95);
    padding: 4px;
    font-size: 10pt;
    border: 1px solid #CCCCCC;
    border-radius: 3px;
    box-shadow: 0px 0px 8px #CCCCCC;

}

.preview-tooltip, .photographer-event-tooltip {
    z-index: 1000;
    position: absolute;
    visibility: hidden;
    pointer-events: none;
    width: 300px;
    background-color: rgba(255,255,255,0.95);
    padding: 10px;
    font-size: 10pt;
    border: 1px solid #CCCCCC;
    border-radius: 3px;
    box-shadow: 0px 0px 8px #CCCCCC;
}

.preview-tooltip {
    top: 0px;
    left: 0px;
}

.photographer-event-tooltip {
    top: 0px;
    right: 0px;
}

.see-more {
    font-weight: bold;
    color: var(--primary-color);
}

#search--container {
    width: 100%;
    margin: 10px 0px;
    padding: 5px 0px;
    position: relative;
}


#search--freetext {
    font-family: "Noto Sans", sans-serif;
    font-size: 11pt;
    padding: 5px;
    color: #AAA;
    width: 100%;
}

#search--clear {
    width: 20px;
    padding: 5px;
    font-weight: bold;
    cursor: pointer;
    font-size: 16pt;
    position: absolute;
    top: 0px;
    right: 0px;
    margin-right: 5px;
    display: flex;
    height: 100%;
    align-items: center;
}

.invisible {
    visibility: hidden;
}

#search--clear:hover {
    color: var(--primary-color);
}

#search--freetext:focus {
    color: #333333;
}

.search-tooltip {
    z-index: 1000;
    position: absolute;
    top: 0px;
    right: 0px;
    margin-right: 20px;
    margin-top: -0.35em;
    width: 200px;
    padding: 0px;
    font-size: 10pt;
    cursor: default;
}

.search-result--row {
    border: 1px solid #F0F0F0;
    background-color: rgba(255,255,255,0.95);
    border-radius: 8px;
    padding: 5px;
    margin: 4px 0px;
    box-shadow: 0px 0px 8px #CCCCCC;
}

.search-result--match {
    display: inline-block;
    padding: 0px 4px;
    background-color: rgba(230, 164, 152, 0.828);
    border-radius: 5px;
    font-weight: bold;
    border: 1px solid #FFFFFF;
}

.preview-tooltip p {
    margin: 0px;
    padding: 0px;
}

.event--highlight {
    stroke: #446688;
    stroke-width: 3;
}

.heading--year, .heading--name {
    padding-top: 2px;
    margin-top: 0px;
    margin-bottom: 5px;
}

.gridline--vertical {
    stroke: #CECECE;
    stroke-dasharray: 5 3;
    stroke-width: 1;
    pointer-events: none;
}

.gridline--horizontal {
    stroke: #DDDDDD;
    stroke-width: 1;
    pointer-events: none;
}



/* EVENT LABELS */

.event--label {
    display: inline-block;
    padding: 1px 4px;
    border-width: 1px;
    border-style: solid;
    border-radius: 3px;
    font-size: 8pt;
    margin-left: 4px;
    margin-right: 4px;
    font-weight: normal;
}

#timeline-expand--filters .event--label {
    cursor: pointer;
    margin-left: 0px;
    margin-bottom: 4px;
}

#timeline-expand--filters .event--label:hover {
    border-color: #F6C900;
}

.deselected {
    opacity: 0.2;
}


.event--technology {
    border-color: #8dd3c7;
    background-color: rgba(141,211,199,0.8);    
}

.event--professional {
    border-color: #ffffb3;
    background-color: rgba(205, 205, 133, 0.8) 
}

.event--institutional {
    border-color: #bebada;
    background-color: rgba(190,186,218,0.8);
}

.event--exhibition {
    border-color: #fb8072;
    background-color: rgba(251,128,114,0.8);
}


.marker--contrast {
    fill: #FFFFFF;
}

.timeline--axis text {
    font-family: "Noto Sans", sans-serif;
    font-size: 8pt;
}


#events--container {
    width: 100%;
}

.event--row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    margin-bottom: 10px;
    border-top: 1px dotted #CCCCCC;
    padding-top: 10px;
    padding-left: 5px;
}

.event--row:first-child {
    border-top: none;
}

.event--row .year {
    flex: 1 0 100%;
    width: 100%;
    font-weight: 600;
    text-align: left;
    padding-left: 0px;
}

.vital-row {
    padding-left: 0px;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    background-color: var(--light-primary);
    margin: 0px;
    padding: 10px 5px;
    border-left: 3px solid var(--light-primary);
}

.active-row {
    border-left: 3px solid var(--primary-color);
    margin-bottom: 0px;
    padding-bottom: 10px;
    margin-top: 0px;
    padding-left: 20px;
}

.special-row {
    border-left: 3px solid var(--primary-color);
}

.event--row .event {
    flex: 1 0 100%;
    width: 100%;
}

.event--row .event ul {
    list-style-type: square;
    padding-left: 15px;
}

.event--spacer {
    content: "";
    height: 20px;
}

#details--biblio ul,
#details--data-attribution ul,
#details--btc-resources ul {
    list-style-type: square;
    padding-left: 20px;
}

#details--biblio li,
#details--data-attribution li,
#details--btc-resources li {

    margin-bottom: 10px;
}

.event--hidden {
    display: none;
}

a:link, a:visited {
    font-weight: bold;
    color: var(--hyperlink-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}


.selected {
    font-weight: bold;
    fill: var(--primary-color);
}

.special-highlight-line {
    stroke-width: 2;
    stroke: #F6C900;
}

.element--visible {
    visibility: visible;
}

/* Media Queries */

@media screen and (max-width: 1024px) {
    #chart--controls {
        flex: 0 1 250px;
    }

    #chart--container {
        width: calc(100% - 250px); /* 60% */
        flex: 0 1 calc(100% - 250px);    
    }

}

@media screen and (max-width: 600px) {
    #chart--controls {
        display: none;
    }

    #chart--container {
        width: 100%;
        flex: 1 0 100%;
    }

    header {
        flex-direction: column;
        padding: 20px;
    }

    header p {
        padding-right: 0px !important;
    }

    #details--container, #timeline-expand--container {
        width: 100%;
        position: fixed;
        top: 0px;
        left: 0px;
        right: 0px;
        height: 100vh;
        z-index: 5000;
        overflow-y: auto;
    }

    #timeline-expand--closebutton, #details-expand--closebutton {
        position: sticky;
        top: 0;
        background-color: #F9F9F9;
    }

    .event--marker {
        stroke-width: 1;
    }

    .tooltip, .preview-tooltip, .photographer-event-tooltip {
        width: 200px;
    }

    #btc-about-text {
        width: 100%;
    }
    
    #btc-about-logos {
        width: 100%;
        margin-left: 0px;
        margin-top: 30px;
    }

    #banner-container {
        height: 200px;
    }
}

