html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background-color: #1e1e1e;
}

:root {
    --info-bar-background: #2b2b2b;
    --info-bar-text: #f5f5f5;
    --info-bar-border: rgba(255, 255, 255, 0.15);
}

body.dark-theme,
html.dark-theme {
    --info-bar-background: #2b2b2b;
    --info-bar-text: #f5f5f5;
    --info-bar-border: rgba(255, 255, 255, 0.15);
}

body.light-theme,
html.light-theme {
    --info-bar-background: #f0f0f0;
    --info-bar-text: #000000;
    --info-bar-border: rgba(0, 0, 0, 0.15);
}

.main-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.frames-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.mobile-info-bar {
    display: none;
    background-color: var(--info-bar-background);
    color: var(--info-bar-text);
    border-bottom: 1px solid var(--info-bar-border);
    padding: 10px 16px;
    font-family: RO-Sans, sans-serif;
    font-size: 14px;
    position: relative;
    padding-right: 56px;
}

.mobile-info-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.mobile-info-link:hover,
.mobile-info-link:focus {
    text-decoration: underline;
}

.mobile-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.mobile-info-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.mobile-info-dismiss {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.mobile-info-dismiss svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.mobile-info-dismiss:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 50%;
}

.mobile-info-hidden {
    display: none !important;
}

@media (max-width: 1499px) {
    .mobile-info-bar {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Geef een startverdeling in procenten of pixels */
.middle-container {
    height: 50%; /* bijvoorbeeld 50% van de viewport */
    position: relative;
    flex: 0 1 auto; /* laat JavaScript de hoogte in pixels overschrijven */
    min-height: 0;
}

.bottom-container {
    height: 50%; /* en de onderste helft ook 50% */
    display: flex;
    flex-direction: row;
    width: 100%;
    flex: 0 1 auto; /* laat JavaScript de hoogte in pixels overschrijven */
    min-height: 0;
}

.bottom-frame {
    width: 100%;
    height: 100%;
    border: none !important;
    outline: none !important;
}

/* Alle frames zichtbaar: gelijke verdeling (25% elk) */
.all-visible .bottom-left-frame,
.all-visible .bottom-middle-frame,
.all-visible .bottom-right-frame,
.all-visible .bottom-right-frame-extra {
    flex: 1; /* Gelijke breedte */
}

.bottom-container.three-visible {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100vw;
    max-width: 100%;
    height: 50%;
}

.three-visible .bottom-left-frame,
.three-visible .bottom-middle-frame,
.three-visible .bottom-right-frame {
    flex: 1 1 33.33%;
    max-width: 33.33%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.bottom-frame {
    width: 100%;
    height: 100%;
    border: none !important;
    outline: none !important;
}

/* Alleen links en rechts zichtbaar: links 66.67%, rechts 33.33% */
.left-right-visible .bottom-left-frame {
    flex: 2; /* 66.67% */
}

.left-right-visible .bottom-right-frame {
    flex: 1; /* 33.33% */
}

.left-right-visible .bottom-middle-frame,
.left-right-visible .bottom-right-frame-extra {
    display: none;
}

/* Alleen links en midden zichtbaar: links 66.67%, midden 33.33% */
.left-middle-visible .bottom-left-frame {
    flex: 2; /* 66.67% */
}

.left-middle-visible .bottom-middle-frame {
    flex: 1; /* 33.33% */
}

.left-middle-visible .bottom-right-frame,
.left-middle-visible .bottom-right-frame-extra {
    display: none;
}

/* Alleen links zichtbaar: links neemt volledige breedte */
.left-only .bottom-left-frame {
    flex: 1; /* 100% */
}

.left-only .bottom-middle-frame,
.left-only .bottom-right-frame,
.left-only .bottom-right-frame-extra {
    display: none;
}

/* Geen frames zichtbaar */
.none-visible .bottom-left-frame,
.none-visible .bottom-middle-frame,
.none-visible .bottom-right-frame,
.none-visible .bottom-right-frame-extra {
    display: none;
}

iframe {
    width: 100%;
    height: 100%;
    border: none !important;
    outline: none !important;
}

:root {
    --draghandle-light: url("../img/draghandle_light.png");
    --draghandle-dark: url("../img/draghandle_dark.png");
}

.resize-handle,
.resize-handle-inverted {
    position: absolute;
    right: 0;
    width: 100px;
    height: 100px;
    cursor: se-resize;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5;
    transition: opacity 0.2s ease-in-out;
}

.resize-handle {
    bottom: 0;
}

.resize-handle-inverted {
    top: 0;
}

/* Light / dark achtergrond */
body.light-theme .resize-handle,
body.light-theme .resize-handle-inverted {
    background-image: var(--draghandle-light);
}

body.dark-theme .resize-handle,
body.dark-theme .resize-handle-inverted {
    background-image: var(--draghandle-dark);
}

.resize-handle:hover,
.resize-handle-inverted:hover {
    opacity: 0.75;
}

.resize-handle:active,
.resize-handle-inverted:active {
    opacity: 1;
}

.link {
    font-size: 12px;
    color: LightGray;
    font-family: RO-Sans, sans-serif !important;
    transition: color 0.2s ease;
    text-decoration: none;
}

.link:hover {
    color: yellow;
    text-decoration: underline;
}

p {
    margin: 3px;
    margin-left: 10px;
    font-size: 12px;
    color: LightGray;
    font-family: RO-Sans, sans-serif !important;
}
