/* Base shared layout */
.box-section {
    border-top: 2px dashed #ccc;
    border-bottom: 2px dashed #ccc;
    background-color: #f9f9f924;
    margin: 1.5em 0;
    border-radius: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.box-section::before {
    display: block;
    padding: 0.3em 0.3em;
    font-weight: bold;
    font-size: 0.9em;
    border-bottom: 1px solid;
    margin-bottom: 0;
}

.box-section>*:first-child {
    margin-top: 1em;
}

.box-section>* {
    padding: 0.5em 1em 0.1em 1em;
    margin-bottom: 0;
}

/*By default MKDOCS introduces margins around each html block
This causes the content to be spaced out too much
This is a workaround to remove the margins around the content when inside a box-section*/
.box-section pre,
.box-section blockquote,
.box-section ul,
.box-section ol,
.box-section p {
    margin-bottom: 0.05em;
    /* Or adjust as needed */
    margin-top: 0.05em;
}


/* Optional */
.optional-section {
    border-color: #ccc;
    background-color: #3d435324;
}

.optional-section::before {
    content: "📘 Optional Content";
    background-color: #3d435324;
    border-color: #ccc;
}

/* Going Further */
.goingfurther-section {
    border-color: #007acc;
    background-color: #3d435324;
}

.goingfurther-section::before {
    content: "⚙️ Going Further";
    background-color: #3d435324;
    border-color: #007acc;
}

/* Going Further */
.summary-section {
    border-top: 1px solid;
    border-bottom: 1px solid;
    border-color: #31975124;
    background-color: #31975124;
    margin-top: 5em;
}

.summary-section::before {
    content: "✅ Lab Summary";
    background-color: #31975124;
    border-color: #31975124;
}

.summary-section>*:first-child {
    margin-top: 1em;
}

.summary-section>* {
    padding: 0.5em 1em 0.5em 1.5em;
    /* top, right, bottom, left */
}

.summary-section p,
.summary-section ul,
.summary-section ol,
.summary-section pre,
.summary-section blockquote {
    padding: 0.5em 1em 0.5em 1.5em;
    /* top, right, bottom, left */
}

.toc-title {
    display: none;
    margin: 0;
    padding: 0;
    height: 0;
    line-height: 0;
}

.hidden-title {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Base collapsible section styling */
.md-typeset details.optional-section {
    border-top: 2px dashed #bbb;
    border-bottom: 2px dashed #bbb;
    border-left: 0;
    border-right: 0;
    background-color: #f9f9f9;
    margin: 1.5em 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Style the clickable summary header */
.md-typeset details.optional-section>summary {
    background-color: #e0e0e0;
    padding: 0.4em 4em;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    border-bottom: 1px solid #bbb;
}

/* Inner content padding */
.md-typeset details.optional-section>*:not(summary) {
    padding: 0.8em 1.2em;
}

hr.gradient {
    position: relative;
    height: 4px;
    border: none;
    margin: 2.5em 0;
    border-radius: 2px;

    /* Base gradient line */
    background: linear-gradient(to right,
            #f9f9f9 0%,
            #9400FF 50%,
            #f9f9f9 100%);
}

/* Make the tables full width */
.md-typeset__table {
    width: 100%;
}

.md-typeset__table table:not([class]) {
    display: table
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    /* space between emoji and text */
    padding: 0.55em 1.3em;
    font-size: 1rem;
    font-weight: 600;
    background-color: #4f46e5;
    /* solid purple-blue that works with your font */
    border-radius: 0.5rem;
    /* rounded, not pill-shaped */
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    color: #ffffff;
    /* keep text readable */
}

.download-button:hover {
    background-color: #6366f1;
    /* slightly lighter on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

.download-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* Auto scaling images */

/* Scale to fit the page with constraints */
/* Bigger images will be max 15cm, sligthly bigger than the size of a beamer slide */
.md-content__inner img {
    max-width: 15cm;
}