.runic-editor {
    border-radius: 1em;
    outline: 2px solid var(--surface-1-border);
    background-color: var(--surface-1);

    font-size: 0.75em;

    overflow: hidden;
}

.runic-editor__input-area {
    display: grid;
    align-items: stretch;
    border-bottom: 2px solid var(--surface-1-border);
}

/* Mobile - Vertical layout */

.runic-editor__input-area {
    grid-auto-flow: row;
    grid-auto-rows: auto;
}

/* Desktop - Horizontal layout */

@media (min-width: 1024px) {
    .runic-editor__input-area {
        grid-auto-flow: column;
        grid-auto-columns: 1fr auto 1fr;
    }
}

.runic-editor__input-divider {
    position: relative;
    line-height: 1;
}

.runic-editor__input-divider::after {
    font: inherit;
    color: currentColor;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Mobile - Down arrow */

.runic-editor__input-divider::after {
    content: "↓";
}

/* Desktop - Right arrow */

@media (min-width: 1024px) {
    .runic-editor__input-divider::after {
        content: "→";
    }
}

/* SVG Preview Area */

.runic-editor__preview {
    width: 100%;

    display: grid;
    align-items: stretch;

    overflow: hidden;
}

/* Mobile */

.runic-editor__preview {
    grid-auto-flow: row;
}

/* Desktop */

@media (min-width: 1024px) {
    .runic-editor__preview {
        grid-template-columns: 7fr auto 3fr;
        grid-auto-flow: column;
    }
}

.runic-editor__preview > hr {
    margin: 0;
    border: 1px solid var(--surface-1-border);
}

.runic-editor__svg-container {
    position: relative;
    height: 15em;
    padding: 1em;
    display: grid;
    place-items: center;

    background-color: black;
    --transparency-darker: var(--surface-1);
    --transparency-lighter: var(--surface-0);
    background-image: linear-gradient(
            45deg,
            var(--transparency-lighter) 25%,
            transparent 25%,
            transparent 75%,
            var(--transparency-lighter) 75%,
            var(--transparency-lighter) 100%
        ),
        linear-gradient(
            45deg,
            var(--transparency-lighter) 25%,
            var(--transparency-darker) 25%,
            var(--transparency-darker) 75%,
            var(--transparency-lighter) 75%,
            var(--transparency-lighter) 100%
        );
    background-position:
        0px 0px,
        1em 1em;
    background-size: 2em 2em;
    background-repeat: repeat;
}

/* Desktop */

@media (min-width: 1024px) {
    .runic-editor__svg-container {
        height: 100%;
    }
}

.runic-editor__svg-container > .runic-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

details {
    padding: 1em;
    /* noop */
}

summary {
    font-weight: 900;
    cursor: pointer;
}

/* On desktop, hide the summary element so that the user cannot
collapse the details tag. */

@media (min-width: 1024px) {
    details > summary {
        display: none;
    }

    details {
        display: block;
    }
}

.runic-editor__settings-container {
}

.runic-editor__download-group {
    margin-top: 1em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5em;
}

.runic-editor__download-button {
    flex: 1 0 0;

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5em;
}

.runic-editor__download-button > svg {
    width: 1em;
    height: 1em;
}
