#app {
    padding: 1rem;
    max-width: 2100px;
    width: 100%;
    margin: 0 auto;
    height: calc(100dvh - 48px);
    display: flex;
    flex-direction: column;
}

[hidden] {
    display: none !important;
}


.editor-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: .25rem;
}

.editor {
    display: flex;
    flex-direction: row;
    gap: .25rem;
    flex: 1;
    height: 100%;
}

@media (max-width: 900px) {
    .editor {
        flex-direction: column;
    }
}

.markdown-container {
    display: flex;
    flex-direction: column;
    flex: 0 1 auto;
    width: 40vw;
    min-width: 25vw;
    max-width: 80%;
    resize: horizontal;
    overflow: hidden;

    @media (max-width: 900px) {
        width: 100%;
        max-width: 100%;
        resize: vertical;
        height: 30vh;
        max-height: 60vh;
    }
}

.editor-controls {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 .5rem;
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 6px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: var(--bg-sunken);
    height: 33px;

    >div {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }
}

textarea {
    font-family: var(--sd-mono);
    font-size: 0.875rem;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;

    resize: none;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;

    @media (max-width: 900px) {
        width: 100%;
        flex: 1 1 auto;
    }

}

textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}



.preview-container {
    display: flex;
    flex: 1 1 0;
    max-width: 100%;
    min-height: 0;

    position: relative;
    background: repeating-linear-gradient(45deg,
            var(--bg-raised),
            var(--bg-raised) 8px,
            var(--bg-sunken) 8px,
            var(--bg-sunken) 9px);

    >span {
        display: inline-block;
        z-index: 0;
        font-weight: 600;
        background: var(--sd-info-trans);
        position: absolute;
        font-size: 1.25rem;
        padding: .25rem 2rem;
        color: var(--sd-info);
        top: 50%;
        left: 0;
        right: 0;
        text-align: center;
    }
}

#status {
    font-size: 0.85rem;
    color: var(--muted);
}

#status.error {
    color: var(--error);
}

#preview-frame {
    width: 100%;
    min-height: 300px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    z-index: 1;
}

#settings-modal {
    box-shadow: var(--shadow-lg);
    border-radius: var(--sd-radius);
    max-width: 600px;
    width: calc(100% - 2rem);

}