/** General Theme **/

strong {
    color: #ac4901;
}

b {
    color: #0169c1;
}

dl dt {
    display: inline;
    padding: 0.25rem 0.4rem;
    background: #4e4e4e;
    color: #eaeaea;
    border-radius: 0.25rem;
}

dl dd {
    border-bottom-left-radius: .5rem;
    border-left: 3px solid #4e4e4e;

    margin-bottom: 0.9rem;
    padding-left: 0.618rem;
    padding-top: 0.618rem;
    padding-bottom: 0.309rem;
    position: relative;
    top: -0.5rem;
}

dl dd:hover {
    border-top-right-radius: .5rem;
    border-right: 3px solid #4e4e4e;
}

dd p {
    margin-bottom: 0.7em;
}

details summary {
    cursor: pointer;
}

/**********************************************************************************************************************/
/** FIX FOR DIAGRAMS **************************************************************************************************/

.mermaid foreignObject {
    overflow: auto;
}


/**********************************************************************************************************************/

/* Hotfix for https://github.com/getgrav/grav-theme-quark/issues/9 */
/* Must be below 3 or mobile will glitch
 */
section#header { z-index: 2; }

/* Little patch for the language selector, to center it vertically. */
/* Beta feature : may cause bugs. We'll see. */
.dropdown-selector,
.language-selector {
    -webkit-transform: initial !important;
    -moz-transform: initial !important;
    -o-transform: initial !important;
    -ms-transform: initial !important;
    transform: initial !important;
    margin-right: 0rem !important;
}

/* Little fix for the anchors plugin */
.anchorjs-link {
    font-size: 0.8em !important;
    color: #80839a;
}

/* Ensures the footer stays on the bottom of the page */
#page-wrapper {
    min-height: calc(100vh - 3rem);
}

/* Fixed height footer */
#footer {
    height: 3rem;
}
#footer p {
    margin-bottom: 0;
}
#footer .ljbac {
    color: #d632a8;
}
#footer .ljbac:hover,
#footer .ljbac:focus {
    color: #b72b90;
}

iframe.geogebra {
    border: 1px dotted #a6a6a6;
}

/** Desktop header navigation *****************************************************************************************/

/*nav.dropmenu > ul > li > ul > li {*/
/*    font-size: 0.8em;*/
/*}*/
/*nav.dropmenu > ul > li ul li a {*/
/*    min-width: 11rem;*/
/*}*/
/*nav.dropmenu ul {*/
/*    white-space: initial;*/
/*}*/

.mobile-menu {
    display: block;
}

.mobile-menu details[open] > summary ~ * {
    animation: sweep .5s ease-in-out;
}

@keyframes sweep {
    0%    {opacity: 0; margin-left: -10px}
    100%  {opacity: 1; margin-left: 0px}
}


/*.relative{position:relative!important}*/

/*#header {*/
/*    padding-right: 4em;*/
/*}*/

/** Mobile navigation without javascript ******************************************************************************/
/** We're using the checkbox hack. **/

.mobile-menu .button_container {
    right: 50%;
}

.mobile-menu .button_container .top,
.mobile-menu .button_container .middle,
.mobile-menu .button_container .bottom {
    z-index: 3;
}

#mobile-navigation-toggle {
    cursor: pointer;
    width: 42px;
    height: 42px;
    position: absolute;
    /*right: 0.8em;*/
    right: 50%;
    right: calc(50% - 7px);
    top: 0.8em;
    z-index: 200;

    opacity: 0;
}

/*#mobile-navigation-toggle:focus ~ .mobile-menu .button_container {*/
/*    outline: 1px dotted darkcyan;*/
/*}*/
#mobile-navigation-toggle:focus ~ .mobile-menu .button_container .top,
#mobile-navigation-toggle:focus ~ .mobile-menu .button_container .middle,
#mobile-navigation-toggle:focus ~ .mobile-menu .button_container .bottom {
    background-color: #262d84;
}

#mobile-navigation-toggle:checked {
    position: fixed;
}

.mobile-menu .button_container:hover { opacity: .95; }

#mobile-navigation-toggle:checked ~ .mobile-menu .button_container { position: fixed; }

#mobile-navigation-toggle:checked ~ .mobile-menu .button_container .top { transform: translateY(8px) translateX(0) rotate(45deg); background: #FFF; }

#mobile-navigation-toggle:checked ~ .mobile-menu .button_container .middle { opacity: 0; background: #FFF; }

#mobile-navigation-toggle:checked ~ .mobile-menu .button_container .bottom { transform: translateY(-8px) translateX(0) rotate(-45deg); background: #FFF; }

#mobile-navigation-toggle:checked ~ .mobile-menu .button_container .overlay {
    visibility: visible;
    height: 100%;
    opacity: .95;
}


.mobile-menu details,
.mobile-menu ul {
    text-align: left;
    word-break: break-word;

    line-height: 1.8rem;
    font-size: 1.6rem;

    padding: 0;
    margin: 0;
}

.mobile-menu details {
    border-top: 1px solid #323232;
    border-left: 1px solid #323232;
    border-bottom: 1px solid #323232;
    border-top-left-radius: 0.618rem;
    padding-bottom: 0.1em;
}

/* Only works on webkit, duh. Can't find this for firefox */
.mobile-menu summary:focus::-webkit-details-marker {
    color: #fafafa;
}
.mobile-menu summary {
    border-right: 4px solid transparent;
}
.mobile-menu summary:focus {
    border-right: 4px solid #fafafa;
}

.mobile-menu li summary {
    padding: .4em 0.05em .2em 0.4em;
}

.mobile-menu li > a {
    padding: 0.2em 0.1em 0.3em 0.4em;
    display: block;
    border-top: 1px solid #323232;
    border-left: 1px solid #323232;
    border-bottom: 1px solid #323232;
}

.mobile-menu a.active {
    font-style: italic;
}

.mobile-menu ul {
    padding-left: 0.33rem;
    list-style: none;
}

/**********************************************************************************************************************/

#language-selector-button:hover ~ *,
#language-selector-button:focus ~ * {
    display: block;
    visibility: visible;
}

#langSelectorList {
    margin: 0;
    /*visibility: hidden;*/
    /*display: block !important;*/
    /*animation: test_show 1.5s ease-in-out;*/
    /*animation-delay: 1s;*/
}
#langSelectorList:focus-within,
#langSelectorList:hover,
#langSelectorList:focus {
    display: block;
    visibility: visible;
}

/*@keyframes test_show {*/
/*    0%    {display: block;}*/
/*    100%  {display: none;}*/
/*}*/


#lesson-selector-button:hover ~ *,
#lesson-selector-button:focus ~ *,
/* class only won't work, we need an id here for some reason */
.dropdown-menu-button:hover ~ *,
.dropdown-menu-button:focus ~ * {
    display: block;
    visibility: visible;
}


#lesson-selector-dropdown:focus-within,
#lesson-selector-dropdown:hover,
#lesson-selector-dropdown:focus,
/* same */
.dropdown-menu:focus-within,
.dropdown-menu:hover,
.dropdown-menu:focus {
    display: block;
    visibility: visible;
}


.dropdown-selector {
    float: right;
    position: relative;
    top: 50%;
    vertical-align: middle;
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    margin: 0 1rem !important;
    display: inline-block;
}

.dropdown-selector > .btn:first-child {
    margin-left: 0;
}

.dropdown-selector .btn {
    float: left;
    position: relative;
    display: inline-block;
    margin-bottom: 0;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    touch-action: manipulation;
    cursor: pointer;
    user-select: none;
    background-image: none;
    border: 1px solid transparent;
    /* size */
    padding: 5px 10px;
    font-size: 0.8rem;
    line-height: 1.5;
    border-radius: 3px;
    /* Aspect */
    color: #333;
    background-color: #fff;
    border-color: #ccc;
}

.dropdown-selector .dropdown-menu {
    position: absolute;
    top: 95%;
    /*left: 0;*/
    right: 0;
    z-index: 1000;
    display: none;
    float: left;
    padding: 5px 0;
    margin: 2px 0 0;
    font-size: 1rem;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border-radius: 4px;
    box-shadow: 0 6px 12px rgba(0,0,0,.175);
}

.dropdown-selector .dropdown-menu img {
    width: 24px;
    height: 12px;
    max-width: inherit;
}

.dropdown-selector .dropdown-menu li {
    line-height: 1rem;
    font-color: #c0c0c0;
    display: list-item;
    text-align: -webkit-match-parent;
}

.dropdown-selector .dropdown-menu li:hover {
    background-color: #eee;
}

.dropdown-selector .dropdown-menu > li > a {
    display: block;
    padding: 3px 15px;
    clear: both;
    font-weight: 400;
    line-height: 1.42857143;
    color: #333;
    white-space: nowrap;
}

/**********************************************************************************************************************/

