@font-face {
    font-family: 'Inter';
    src: url('fonts/inter/Inter-Regular.ttf') format('truetype');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/inter/Inter-Bold.ttf') format('truetype');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

body {
    /* padding-top: 15px;
    padding-bottom: 15px; */
    padding: 15px 20px;
    max-width: 900px;
    margin: auto;
    font-family: Inter, sans-serif;
    font-size: 1.1rem;
    background-color: rgb(255, 253, 249);
}

header {
    text-align: center;
}

#logo {
    width: 200px;
}

#mechanism {
    margin: 0 auto;
    padding: 0px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
}

.mechanism-img {
    width: 100%;
    height: auto;
    object-fit: fill;
    box-sizing: border-box;
    /* border-radius: 40px 40px 0px 0px; */
    border-radius: 40px;
    /* border: 3px solid rgb(242, 233, 216); */
    /* border: 3px solid #d9d9d9; */
    /* border-bottom: 3px solid #d9d9d9; */
}

h1 {
    margin-top: 10px;
}

/* h1,h2 {
    color: #1C6BFD;
} */

a {
    text-decoration: underline;
    color: #543310;
    text-decoration-color: #6F4E37;
}

p {
    line-height: 1.3;
}

li {
    line-height: 1.3;
}

sup,
sub {
    vertical-align: baseline;
    position: relative;
    top: -0.4em;
}

sub {
    top: 0.4em;
}

:target {
    background-color: #f2e9d8;
    margin: -10px;
    padding: 10px;
    border-radius: 13px;
}

/* section {
    margin-bottom: 20px;
} */

footer {
    margin: 40px 0px 5px 0px;
    text-align: right;
    color: #000;
}

.link {
    color: #543310;
    font-size: 1.1rem;
    font-weight: 400;
    margin: -10px -15px;
    padding: 10px 15px;
    border-radius: 100px;
    line-height: 2;
}

#sideEffects {
    width: 100% !important;
    min-height: 495;
}

/* div {
    background-color: rgb(255, 253, 249);
    border-radius: 40px;
    padding: 20px;
    border: 3px solid rgb(242, 233, 216);
    margin: 10px;
} */

/* .drug {
    background-color: #F3EAD8;
    margin: -2px 0px;
    padding: 2px 8px;
    border-radius: 20px;
} */

table {
    border-collapse: collapse;
    border: 2px solid rgb(200, 200, 200);
    letter-spacing: 1px;
    font-size: 0.8rem;
}

td,
th {
    border: 1px solid rgb(190, 190, 190);
    padding: 10px 20px;
}

section:not(:last-child) {
    margin-bottom: 20px;
}

.chart-details,
.chart-details * {
    color: #543310;
    font-size: 0.9rem;
    /* text-align: right; */
    text-decoration-color: rgb(190, 190, 190);
}

/* canvas {
    margin-bottom: 10px;
} */

/* deprecated */
#button-div {
    text-align: center;
    margin-bottom: 20px;
}


/* deprecated */
.trial {
    margin-bottom: 20px;
    white-space: nowrap;
    position: relative;
    overflow-x: scroll;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    /* -webkit-mask: linear-gradient(90deg,#0000,#000 10% 80%,#0000) */
}

#divAllData {
    text-align: center;
    margin-bottom: 20px;
    position: absolute;
    left: 50%;
    top: 91%;
    transform: translate(-50%, -50%);
}

#buttonTrialDiv {
    margin-bottom: 20px;
    white-space: nowrap;
    position: relative;
    overflow-x: scroll;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

button {
    margin: 0px auto;
    font-family: Inter, sans-serif;
    font-size: 1.1rem;
    color: #FFFDF9;
    padding: 8px 15px;
    border-radius: 100px;
    background-color: #543310;
    border: 0px solid #000;
    transition-duration: 0.5s;
}

#buttonTrialDiv button {
    margin: 0px 5px 0px 0px;
}

.buttonTrial {
    background-color: #faebd7;
    color: #543310;
}

.buttonTrial:hover {
    /* background-color: #836544; */
    background-color: #e8d5c1;
}

.buttonTrial.buttonTrialActive {
    background-color: #543310;
    color: #FFFDF9;
}

/*CSS for the search bar*/

.search-container-flex {
    display: flex;
    justify-content: center;
}

.search-container {
    background-color: #fff;
    padding: 10px;
    margin: 20px 0px;
    border-radius: 35px;
    width: 100%;
    max-width: 500px;
    text-align: left;
    border: 3px solid #f0efed;
}

#search-input {
    display: flex;
    align-items: center;
}

#search {
    width: 85%;
    padding: 12px 15px;
    /* margin-bottom: 20px; */
    border: 0px;
    border-radius: 4px;
    font-size: 1.1rem;
    box-sizing: border-box;
    /* display: inline-block; */
}

#search:focus {
    outline: none;
}

#results {
    text-align: left;
    margin: 0px 15px;
}

#results ul {
    list-style: none;
    padding: 0;
}

#results li {
    background: #f0efed;
    margin-top: 8px;
    /* padding: 10px; */
    border-radius: 15px;
    /* border-left: 4px solid #007bff; */
    transition: background 0.3s;
}

#results li:hover {
    background: #f2e9d8;
}

svg {
    display: inline-block;
    /* vertical-align: middle; */
    padding-left: 15px;
}

ul a {
    text-decoration: none;
    padding: 10px;
    display: block;
    width: 100%;
    height: 100%;
}

#results li.highlight {
    background: #f2e9d8;
}

/* Featured */

#featured {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
}

.featured-item {
    width: 100%;
    flex: 1 1 100%;
    margin: 10px 0px 0px 0px;
    /* overflow: hidden; */
}

.featured-item img {
    width: 100%;
    height: auto;
    display: block;
    box-sizing: border-box;
    border-radius: 40px;
    border: 3px solid #f0efed;
    margin: auto;
    background-color: #ffffff;
}

.featured-item:hover img {
    background-color: #FFFDF9;
    transition-duration: 0.5s;
}

/* Misc */

* {
    -webkit-tap-highlight-color: transparent;
}

@media (min-width: 600px) and (max-width: 799px) {
    body {
        width: 70%;
        padding: 15px 20px;
    }

    .featured-item {
        flex: 1 1 45%;
    }

    .featured-item:first-of-type {
        flex: 1 1 100%
    }

    #featured {
        gap: 20px;
    }
}

@media (min-width: 800px) {
    section {
        width: calc(50% - 15px);
    }

    section:not(:nth-last-child(2)) {
        margin-bottom: 20px;
    }

    body {
        padding: 15px 30px
    }

    .featured-item {
        flex: 1 1 30%;
    }

    #featured {
        gap: 20px;
    }
}


/* EXPERIMENTAL */

#chartContainer {
    position: relative;
}

#chartGradientOverlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255, 253, 249, 0) 70%, rgba(255, 253, 249, 1) 91.5%);
    pointer-events: none; /* Allow interaction with the chart below */
}