/***** General Layout *****/

section .explanation-note {
    font-size: 0.85em;
    color: rgb(120,120,120);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-left: 3em;
    padding-right: 3em;
    margin-top: 2em; 
}

#text-intro .divider,
section .explanation-note .divider {
    opacity: 0.3;
    font-weight: 700;
}

#text-bubble-pack, 
#text-my-comparison {
    margin-top: 3em;
}

.why-questions {
    text-align: center;
    /* max-width: 500px; */
    margin-left: auto;
    margin-right: auto;
}

#section-header .no-sketchy-back.no-paint {
    padding: 1em 0em;
    text-shadow: 0 1px 5px #fff, 1px 0 5px #fff, -1px 0 5px #fff, 0 -1px 5px #fff;
    /* border-bottom: 0.15em solid var(--color-dogs); */
}

/***** Navigation *****/

nav {
    position: fixed;
    height: 85px;
    width: 85px;
    text-align: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;  
    z-index: 3;
    font-size: 0.8em;
    opacity: 0;
    cursor: none;
    pointer-events: none;
    transition-property: opacity;
    transition-duration: .3s;
}

nav > div {
    width: 50px;
}

nav a {
    border-bottom: none;
    font-weight: 700;
}

nav a:hover {
    border-bottom: 0.15em solid black;
}

nav.bottom-right {
    bottom: 0;
    right: 0;
    /* border-top-left-radius: 100%; */
}
nav.bottom-right > div {
    padding-left: 31px;
    padding-top: 31px;
}

/***** Explanation boxes *****/
section .explanation-note span.random-color-note {
    font-weight: 700;
    background-color: rgb(120,120,120);
    color: white;
    padding: 0 0.3em;
}

section .explanation-text {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: white;
    padding: 0;
    margin-top: 1em;
    margin-bottom: 2em;
}

section .explanation-text h4 {
    font-weight: 900;
    font-size: 1.4em;
}

section .explanation-text div {
    padding: 3em 3em 3em 4em;
}
section .explanation.rough-box {
    --rough-stroke-width: 3px;
    --rough-roughness: 6;
}
section .explanation.no-rough-box.no-paint div {
    padding: 2em 3em 2em 3em;
}

section .hover-explanation {
    color: rgb(90,90,90);
    font-size: 0.85em;
    text-align: center;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
section .hover-explanation .bold {
    color: black;
    line-height: 1.6;
}
section .hover-explanation.rough-box {
    --rough-stroke-width: 1.5px;
    --rough-roughness: 3;
}
section .hover-explanation.rough-box p {
    padding: 2.5em 3em;
}
section .hover-explanation.no-rough-box.no-paint  {
    margin-top: 2em;
}
section .hover-explanation.no-rough-box.no-paint p  {
    padding: 1em 0em;
    margin: 0em 0;
}
/* @supports (background: paint(something)) {
    section .hover-explanation.rough-box {
    }
} */

section .explanation-text p {
    line-height: 1.7;
}

section .explanation-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 2em;
    /* border-right: 30px solid var(--color-dark-pink); */
}

section .explanation-animation img {
    width: 100%;
    /* max-width: 400px; */
    z-index: -1;
}

section .explanation-text, 
section .explanation-animation {
    align-self: stretch;
}

/***** Explanation of the bubble pack visual *****/

section .bubble-pack-explanation .button-wrapper {
    max-width: 500px;
    margin: 1em auto;
    padding: 1em;
    text-align: center;
    overflow: hidden;
    transition: padding 0.3s ease 0.3s, margin 0.3s ease 0.3s, opacity 0.3s ease;
}
section .bubble-pack-explanation .button-wrapper.rough-box {
    --rough-stroke-width: 1.5px;
    --rough-roughness: 3;
}
section .bubble-pack-explanation .no-rough-box.no-paint  {
    padding: 0em;
}

section .bubble-pack-explanation .button-wrapper.fade-out {
    padding-top: 0em;
    padding-bottom: 0em;
    margin-top: 0em;
    margin-bottom: 0em;
    opacity: 0;
    animation: slideUp 0.3s ease 0.3s forwards;
}

@keyframes slideUp {
    from {max-height: 200px;}
    to {max-height: 0px;}
}

section .bubble-pack-explanation .button-wrapper button {
    font-family: var(--body-font);
    font-weight: 700;
    font-size: 1em;
    line-height: 1.5;
    padding: 1.8em 1em;
    background: none;
    border: none;
    margin-left: 1em;
    margin-right: 1em;
    margin-top: 0em;
    margin-bottom: 0em;
}
section .bubble-pack-explanation .no-paint button {
    padding: 0.5em 1em;
}

section .visual-tree-explanation {
    /* display: none; */
    padding-top: 0em;
    padding-bottom: 0em;
    margin-top: 0em;
    margin-bottom: 0em;
    border-top: 1px solid rgba(200,200,200,0);
    border-bottom: 1px solid rgba(200,200,200,0);
    transition: border-top-color 1s ease, border-bottom-color 1s ease, margin 1s ease, padding 1s ease;

    max-height:0;
    overflow: hidden;
}

section .visual-tree-explanation.reveal {
    border-top-color: rgba(200,200,200,1);
    border-bottom-color: rgba(200,200,200,1);
    margin-top: 1em;
    margin-bottom: 2em;
    padding-top: 1.2em;
    padding-bottom: 0.8em;
    animation: slide 0.5s ease forwards;
}

@keyframes slide {
    from {max-height: 0;}
    to {max-height: 2000px;}
}

section .bubble-pack-explanation .example-sentences {
    font-weight: 700;
}
section .bubble-pack-explanation .dim {
    font-weight: 300;
    color: rgb(200,200,200);
}

/***** Section | CAT vs DOG *****/

#section-both .sketchy-underline {
    --lineColor: var(--color-both);
}
#section-both .no-sketchy-underline.no-paint {
    border-bottom: 0.15em solid var(--color-both);
}

/* #section-both .sketchy-background {
    --lineColor: rgba(252, 146, 152, 0.7);
}
#section-both .sketchy-background a {
    border-bottom: none;
    font-weight: 700;
}
#section-both .no-sketchy-underline.no-paint {
    border-bottom-color: var(--color-both);
} */
#section-both .text a {
    font-weight: 700;
    border-bottom: 0.2em solid var(--color-dark-pink);
}

#section-both .sketchy-back {
    /* padding: 0.7em 1.4em; */
    --lineColor: rgba(252, 146, 152, 0.7);
}
#section-both .no-sketchy-back.no-paint {
    background: var(--color-both); 
    /* border-bottom: 0.15em solid var(--color-both); */
}

#section-both {
    display: grid;
    grid-auto-flow: dense;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: auto;
    grid-row-gap: 1em;
    grid-template-areas:
    "header header header header header"
    ". intro intro intro ."
    "chart chart chart chart chart"
    ". visual-text-1 visual-text-1 visual-text-1 ."
    ". text-final text-final text-final ."
    ". switch switch switch ."
    ". back back back .";
}

#section-both .header {
    grid-area: header;
}

#section-both .text-intro {
    grid-area: intro;
}

#section-both #chart-vs {
    grid-area: chart;
}

#section-both #text-vs-visual-explanation {
    grid-area: visual-text-1;
}

#section-both .text-final {
    grid-area: text-final;
}

#section-both #switch-animal-div {
    grid-area: switch;
}

#section-both #back {
    grid-area: back;
    text-align: center;
    margin-top: 1em;
}

#section-both {
    margin-top: 2em;
}

#section-both .section-title {
    margin-top: 1.5em;
    margin-bottom: 2em;
}

#section-both .section-title h1 {
    padding: 0.2em 1.4em;
}

#section-both .text-final {
    margin-top: 2em;
}

/***** Go to other animal button *****/

.switch-animal {
    justify-self: center;
    text-align: center;
    /* max-width: 400px; */
    --rough-stroke-width: 3px;
    --rough-roughness: 6;
}

.switch-animal p {
    margin-bottom: 0em;
    pointer-events: none;
}
.switch-animal h3 {
    margin-top: 0em;
    margin-bottom: 0.2em;
    pointer-events: none;
}

#section-both a.switch-link {
    display: block;
    padding: 3.5em 9em;
    border-bottom: none;
}

#section-both #back a {
    color: rgb(160,160,160);
    border-bottom-color: rgb(230,230,230);
}

/***** Chart General *****/

svg {
    overflow: visible;
}

.chart-container {
    position: relative;
    /* margin: 0 auto; */
}

.chart-bubble-pack canvas, 
.chart-bubble-pack svg, 
.chart-circle-pack canvas, 
.chart-circle-pack svg,
.chart-vs canvas, 
.chart-vs svg {
    position: absolute;
    top: 0;
    left: 0;
}

.text-chart-container {
    margin: 0 auto;
    text-align: center;
}

/***** The text that appears on a chart hover *****/

a.chart-hover-div {
    font-family: var(--chart-font);
    z-index: 3;
    pointer-events: all;
    position: fixed;
    opacity: 0;
    bottom: 0px;
    width: calc(100% - 2em);
    padding-left: 1em;
    padding-right: 1em;
    padding-bottom: 1em;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0px 0px 15px rgba(200, 200, 200, 0.6);
    border-bottom: none;
    display: none;
}

.chart-hover-div div {
    pointer-events: none;
}

.new-tab {
    position: absolute;
    top: 0.3em;
    right: 0.3em;
    opacity: 0.5;
}

.chart-hover-subtitle {
    font-family: var(--chart-font);
    font-size: 21px;
    color: rgb(130, 130, 130);
    fill: rgb(130, 130, 130);
}
/* For mobile */
.chart-hover-div .chart-hover-subtitle {
    margin-top: 1em;
    margin-bottom: 0.1em;
}
/* For bubble pack */
.chart-bubble-pack .chart-hover-subtitle {
    margin: 0;
    line-height: 1.3;
}

.chart-hover-text {
    font-family: var(--chart-font);
    font-size: 30px;
    color: black;
    fill: black;
}
/* For mobile */
.chart-hover-div .chart-hover-text {
    margin-top: 0em;
    margin-bottom: 0em;
    line-height: 1.1;
}
/* For bubble pack */
.chart-bubble-pack .chart-hover-text {
    margin-top: 0.2em;
    margin-bottom: 0.3em;
    line-height: 0.9;
}

.chart-hover-children-text {
    display: none;
    font-family: var(--chart-font);
    font-size: 21px;
    color: var(--color-dark-pink);
    fill: black;
}
/* For mobile */
.chart-hover-div .chart-hover-children-text {
    margin-top: 0.5em;
    margin-bottom: 0em;
    line-height: 1.1;
}
/* For bubble pack */
.chart-bubble-pack .chart-hover-children-text {
    margin-top: 0.6em;
    margin-bottom: 0.2em;
    line-height: 0.9;
}

.chart-hover-sub-title-divider {
    color: rgb(220, 220, 220);
    fill: rgb(220, 220, 220);
}

.chart-hover-divider {
    color: rgb(200, 200, 200);
    fill: rgb(200, 200, 200);
}

/***** MY vs A Comparison Visuals *****/

.chart-comparison .title {
    font-family: var(--title-font);
    font-weight: 900;
    text-anchor: middle;
    font-size: 22px;
    fill: black;
}

.chart-comparison .label {
    font-family: var(--chart-font);
    font-size: 26px;
    fill: black;
    text-shadow: white 1px 1px, white 1px -1px, white -1px 1px, white -1px -1px;
}

.chart-comparison .note-thickness {
    font-family: var(--body-font);
    font-style: italic;
    font-size: 14px;
    fill: rgb(180,180,180); 
}

.chart-comparison .line-group g {
    mix-blend-mode: multiply;
}

/***** Sentence tree Visuals *****/

.sentence-tree-label {
    font-family: var(--chart-font);
    font-size: 1.5em;
    text-shadow: 0 2px 0 #fff, 2px 0 0 #fff, -2px 0 0 #fff, 0 -2px 0 #fff;
}

#single-word-network img {
    max-width: 300px;
    width: 100%;
}

/***** Bubble pack Visuals *****/

#section-bubble-pack {
    margin: 0.5em 0;
    position: relative;
}

.chart-bubble-pack .foreign-hover-group div {
    background: rgba(255,255,255,0.95);
    padding: 10px;
    pointer-events: none;
    border: 3px solid currentColor;
}

.chart-bubble-pack .hover-circle {
    stroke: black;
    stroke-width: 3px;
    fill: none;
}

.chart-bubble-pack .hover-connector-path {
    fill: none;
    stroke: currentColor;
    stroke-width: 3px;
}

/***** Chart annotations *****/

.chart-circle-pack .annotation-note-title {
    font-family: var(--title-font);
    font-weight: 900;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 1.0em;
    line-height: 1.6em;
    fill: currentColor;
}

.annotation-note-label {
    font-family: var(--body-font);
    font-size: 0.8em;
    fill: rgb(40, 40, 40);
}

.note-line, .annotation-connector .connector {
    stroke: currentColor;
    stroke-width: 3px;
}

.chart-circle-pack .annotation-subject .subject {
    stroke: currentColor;
    stroke-width: 3px;
}

.chart-circle-pack .annotation-note-bg {
    fill-opacity: 0.9
}

.chart-comparison .note-small .annotation-note-bg {
    stroke: currentColor;
    stroke-width: 3px;
    fill-opacity: 0.95;
}

.chart-comparison .annotation-note-label {
    fill: rgb(140, 140, 140);
}

/***** Search box above bubble pack visuals *****/

#section-bubble-pack .stick {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1;
}  

.search-box {
    position: relative;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2em;
}

.search-box {
    font-family: var(--body-font);
    max-width: 350px;
    font-size: 1em;
}
.search-box.rough-box {
    --rough-fill: #ffffff;
    --rough-stroke-width: 1.5px;
    --rough-roughness: 3;
}

.search-box > div {
    padding: 1.6em 1.3em;
    width: calc(100% - 2*1.3em);
}
.search-box.no-paint > div {
    padding: 0.5em;
    width: calc(100% - 2*0.5em);
    background: white;
}

.search-box .awesomplete {
    width: calc(100% - 3em);
    padding: 0.5em;
}

.search-box h5 {
    font-family: var(--title-font);
    padding: 1em 0.5em 0em 1em;
    font-size: 1.2em;
}

.search-box input {
    font-family: var(--body-font);
    border: none;
    padding: 0.5em;
    margin: 0.5em;
    font-size: 1em;
    width: 100%;
    background: rgba(142, 223, 200, 0.3);
}

.search-box input:focus { 
    outline: none !important;
}

.search-box .awesomplete > ul > li:hover {
    background: #4CB4C7 !important;
    color: white;
}
.search-box .awesomplete > ul > li[aria-selected="true"] {
    background: #4CB4C7 !important;
    color: white;
}
.search-box .awesomplete li:hover mark {
    background: var(--color-dark-pink) !important;
    color: white;
}
.search-box .awesomplete li[aria-selected="true"] mark {
    background: var(--color-dark-pink) !important;
    color: inherit;
}

/***** Cats vs Dogs visual *****/

#chart-vs .title-cat,
#chart-vs .title-dog {
    font-family: var(--title-font);
    text-anchor: middle;
    font-size: 34px;
    letter-spacing: 0.01em;
    font-weight: 900;
}

#chart-vs .title-vs {
    font-family: var(--title-font);
    text-anchor: middle;
    font-size: 21px;
    fill: #cecece;
    font-weight: 900;
}

#chart-vs .sub-title-vs {
    font-family: var(--title-font);
    text-anchor: middle;
    font-size: 26px;
    fill: #212121;
    font-weight: 900;
}

#chart-vs .axis-title {
    font-family: var(--body-font);
    text-anchor: middle;
    font-size: 12px;
    fill: #212121;
}

#chart-vs .annotation-small {
    font-family: var(--body-font);
    /* text-anchor: middle; */
    font-size: 13px;
    fill: #212121;
    text-shadow: 0 2px 0 #fff, 2px 0 0 #fff, -2px 0 0 #fff, 0 -2px 0 #fff;  
}

/***** FOOTER *****/

/* #section-footer::before, */
#section-footer::after {
    content:"";
    display:inline-block;
    display: block;
    width: 100%;
    height: 65px;
}
/* #section-footer::before {
    background: url("../assets/images/paw_tile__to_right.png");
    margin-bottom: 30px;
} */
#section-footer::after {
    background: url("../assets/images/paw_tile__to_left.png");
    margin-top: 30px;
}

#section-footer {
    background-color: rgba(252, 146, 152, 0.7);
    margin-top: 6em;
    padding: 2em 0 1em 0;
}

#section-footer .sketchy-underline {
    --lineColor: white;
}
#section-footer .no-sketchy-underline.no-paint {
    border-bottom: 0.15em solid white;
}

#section-footer-inner {
    display: grid;
    grid-auto-flow: dense;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: auto;
    grid-row-gap: 1em;
    grid-template-areas:
    "social social social team team"
    "method method method team team";
    justify-items: start;
    align-items: start;
}

#section-footer-inner #social {
    grid-area: social;
    align-self: start;
}

#section-footer-inner #team{
    grid-area: team;
    justify-self: center;
    align-self: start;
}

#section-footer-inner #method {
    grid-area: method;
}

#section-footer-inner #social p {
    font-size: 1.1em;
}

#section-footer h4  {
    padding-top: 0.6em;
    font-size: 1.3em;
}

#section-footer #team ul  {
    list-style: none;
    margin-top: 2em;
    font-size: 0.9em;
}

#section-footer #team li {
    margin: 0 0 0.3em 0;
}
#section-footer #team li.spacing {
    margin: 0 0 1.3em 0;
}

#section-footer h3, #section-footer h4 {
    color: var(--color-footer);
}
#section-footer a {
    font-weight: 700;
    color: var(--color-footer);
    border-bottom: none;
    padding: 0.2em 0em;
}
#section-footer a:hover {
    background-color: var(--color-footer);
    color: white; 
}

#section-footer .divider {
    color: white;
}

#section-footer #method p {
    font-size: 0.8em;
}

/***** Small screen adjustments *****/

@media screen and (max-width: 900px) {
    #section-both, #section-footer-inner {
        display: block;
    }

    #text-vs-visual-explanation {
        margin-bottom: 3em;
    }

    section .explanation-text.rough-box {
        margin: 1em 0 3em 0;
    }

    section .explanation-animation {
        margin-top: 1em;
    }

    section .explanation-note {
        padding-left: 0em;
        padding-right: 0em;
    }

    a.chart-hover-div {
        display: block;
    }

    section .awesomplete > ul {
        background: hsla(0,0%,100%,.9);
    }

    #section-both .sketchy-back {
        padding: 0.7em 0em;
    }

    #section-both .section-title {
        margin-top: 0em;
    }

    #section-both .section-title h1 {
        padding: 0.2em 0.8em;
    }

    #section-both a.switch-link {
        padding: 3.5em 5em;
    }

    #section-footer-inner > div {
        margin-top: 3em;
    }

    #section-footer #team ul  {
        margin-top: 1.1em;
    }
}