/* Managing printing only the preview tabs */
@media print {
    /* 1. Hide the entire App UI */
    body > * {
        display: none !important;
    }

    /* 2. Un-hide ONLY the preview container */
    /* Note: We target the specific ID or class of your preview tab */
    #interface, #tabs, .tab.active, #preview1 {
        display: block !important;
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    /* 3. Ensure the iframe fills the page */
    iframe {
        height: 100vh !important;
        width: 100vw !important;
        position: absolute;
        top: 0;
        left: 0;
    }
}

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

:root {
    --interface-background: #1d2021;
    --interface-foreground: #83a598;
    --interface-accent: #c27c9d;

}

* {
    font-family: monospace;
    font-size: 0.9rem;

}

body {
    background-color: var(--interface-background);
    position: relative;
}

h1, a, nav span {
    color: var(--interface-foreground);
}

#interface {
    min-height: 50%;
    max-height: 50%;
}

header {
    margin-top: 2rem;
    padding-left: 2rem;
    padding-right: 2rem;
}

nav {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

button {
    border-radius: 4px;
    margin-bottom: 1rem;
}
button.tab-css {
    border: 1px solid pink;
}

button.tab-md {
    background-color: var(--interface-foreground);
}

button.tab-preview {
    background-color: pink;
}

button:hover {
    background-color: palegoldenrod;
}

pre, code {
    margin: 0 !important;
    padding: 0;
    padding: 6px;
    display: block;
    background-color: var(--interface-background) !important;
}

code:focus {
    outline: none;
}



#tabs {
    position: relative;;
}

.tab {
    position: absolute;
    top: 10px;

    width: 95vw;
    height: 85vh;

    overflow: scroll !important;

    background-color: var(--interface-background);
}

.tab h2 {
    position: absolute;
}


.active {
    z-index: 10;
    visibility: visible;
}


.inactive {
    z-index: 1;
    visibility: hidden;
}

.tab-selector.active-tab {
    background-color: palegoldenrod !important;
    border: 3px solid palegoldenrod;
    color: var(--interface-background);
}

.tab:nth-of-type(2) h2 {
    left: 100px;
}

.tab:nth-of-type(3) h2 {
    left: 250px;
}

.tab-content {
    position: absolute;
    top: 50px;
    background-color: var(--interface-background);
    border: 1px solid var(--interface-foreground);

    width: 100%;
}

.tab-selector {
    text-underline-offset: 4px;
    cursor: pointer;
    padding-bottom: 4px;
    padding-top: 4px;

}

.tab-selector:hover {
    background-color: var(--interface-foreground);
    color: var(--interface-background);
}

#preview1, #preview2 {
    top: 0;
    height: 85vh;
}

.hidden {
    visibility: hidden;
}

.visible {
    visibility: visible;
}