/* General side panel */

#sidePanel {
    background-color: var(--lirec-color);
}

#sidePanelInner {
    position: fixed;
    display: flex;
    width: 100%;
    height: calc(100% - 8rem); /* 100% - header height */
    background-color: #f0f0f0;
}

#sidePanelBar {
    display: flex;
    flex-direction: column;
    background-color: var(--lirec-color);
    color: white;
    padding-top: 0.5rem;
}

#sidePanelBar h3:first-of-type {
    margin-top: 0;
}

#sidePanelBar h3 {
    text-transform: uppercase;
    font-size: .8rem;
    text-align: center;
    margin: 0;
}

.sidebar-button {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 1rem 0;
    background-color: var(--lirec-color);
    color: white;
    font-size: 2.5rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sidebar-button>svg:nth-child(2) {
    width: 30%;
}
.sidebar-button > img {
    width: 2.5rem;
    height: 2.5rem;
}

.sidebar-button:hover {
    background-color: var(--green-lirec);
    color: white;
}

#analysisContentPanel, #dictionaryContentPanel {
    background-color: #f6f6f6;
    width: 30vw;
    height: 100%;
    display: grid;
    grid-template-rows: auto auto 1fr;
    border: 5px solid var(--lirec-color);
    border-left: none;
    overflow-y: hidden;
}

/* Analysis panel */

#analysisContent {
    font-size: 12pt;
    overflow-y: scroll;
    max-height: 100%;
    background-color: white;
    padding-top: 8px;
}

#analysisContent li {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-column-gap: 1em;
    margin: 2em 0px;
}

#analysisContent input {
    margin: 2px;
    font-size: 14pt;
}

#analysisContent>div {
    overflow-y: visible;
}

#analysisExpanderButton {
    background-color: var(--lirec-color);
    color: white;
    border-radius: 0px 35px 35px 0px;
    border: solid 0px transparent;
    font-size: 2.5rem;
}

#analysisExpanderButton:hover {
    background-color: var(--green-lirec);
}

/* Dictionary panel */

#dictionaryContentPanel {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#dictionaryContentPanel>h2 {
    margin: .5rem 0 0 0;
}

#dictionarySearchBar {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: .5rem 0;
    padding: 0 .5rem;
    width: calc(100% - 2rem); /* 100% - margin and padding */
    border: 2px solid var(--lirec-color);
    box-sizing: border-box;
    border-radius: 1.25rem;
    height: 2.5rem;
    flex-shrink: 0;
    overflow: hidden;
    cursor: pointer;
}

#dictionarySearchBarInput {
    all: unset;
    flex-grow: 1;
}

#dictionarySearchBar>svg>path {
    fill: var(--lirec-color);
}

#dictionaryContent {
    overflow-y: auto;
    font-size: 1rem;
}

#dictionaryContent a[rel="mw:WikiLink"] {
    color: var(--lirec-color);
    cursor: pointer;
    font-weight: bold;
    background-color: unset;
}

#dictionaryContent a[rel="mw:WikiLink"]:hover {
    text-decoration: underline;
}

#dictionaryContent>h3 {
    text-align: center;
}

/* Side panel credits */

#sidePanelCredits {
    display: flex;
    flex-direction: column;
    font-size: .9rem;
    text-align: center;
}

#sidePanelCredits div {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    margin-block: .2rem;
}

#sidePanelCredits>div:nth-child(2)>img {
    max-width: 90%;
}

#sidePanelCredits>div:nth-child(3)>img {
    max-width: 45%;
}

#sidePanelCredits img {
    max-height: 2rem;
}

/* Mobile view */

@media (max-width: 1200px) {
    #sidePanelBar, #logoLirecContainer, #toolbarPanelContinuation {
        width: 7.5rem;
    }
}

@media (max-width: 1000px) {
    #sidePanelBar, #logoLirecContainer, #toolbarPanelContinuation {
        width: 5rem;
    }

    #sidePanelBar h3 {
        font-size: .7rem;
    }
}

@media (max-width: 800px) {
    #sidePanelBar, #logoLirecContainer, #toolbarPanelContinuation {
        width: 2.5rem;
    }

    #sidePanelBar h3, #sidePanelBar .grower {
        display: none;
    }

    #sidePanelBar svg:nth-of-type(2) {
        display: none;
    }

    #analysisExpander {
        position: fixed;
        bottom: 0;
    }

    #analysisContentPanel, #dictionaryContentPanel {
        width: calc(100% - 2.5rem); /* 100% - side panel and logo width */
        flex-shrink: 0;
    }

    #sidePanelCredits {
        display: none;
    }
}
