/*
 * Styling the MDIWidget
 */
.mdi-widget {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    border: 2px solid transparent;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 1fr auto;
    overflow: hidden;
    box-sizing: border-box;
}

.mdi-viewport {
    grid-column: 1;
    grid-row: 1;
    overflow: hidden;
    position: relative;
}

.mdi-workspace {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 100%;
    min-height: 100%;
}

.mdi-hbar {
    grid-column: 1;
    grid-row: 2;
}

.mdi-vbar {
    grid-column: 2;
    grid-row: 1;
}

.mdi-scrollbar-corner {
    grid-column: 2;
    grid-row: 2;
    width: 15px;
    height: 15px;
    background-color: #e0e0e0;
}

.minimized-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px; /* Adjust the height as needed */
    background-color: #eee;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.mdi-window {
    position: absolute;
    border: 1px solid #000000;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    background-color: #FFFFFF;
    min-width: 25px;
    min-height: 25px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mdi-title-bar {
    background-color: #C3C3C3;
    padding: 2px;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: sans-serif;
}

/* Highlight the active (topmost) sub-window's title bar so the
   focused window is visually distinct, like an active tab. */
.mdi-window.mdi-active > .mdi-title-bar {
    background-color: #d8d8d8;
}

.mdi-title-bar img {
    object-fit: contain;
    margin-left: 16px;
}

.mdi-buttons {
    display: flex;
    margin-right: 16px;
}

.mdi-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 3px;
    width: 18px;
    height: 18px;
    border: 1px solid #999;
    border-radius: 3px;
    background-color: #e0e0e0;
    cursor: pointer;
    color: #444;
}

.mdi-button:hover {
    background-color: #d0d0d0;
    color: #000;
}

.mdi-button:active {
    background-color: #b0b0b0;
}

.mdi-button.mdi-close:hover {
    background-color: #e04040;
    color: #fff;
}

.mdi-button.mdi-close:active {
    background-color: #c03030;
}

.mdi-button svg {
    width: 10px;
    height: 10px;
}

.mdi-button svg line,
.mdi-button svg polyline,
.mdi-button svg rect {
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* this holds the child widget in a MDI window */
.mdi-child-container {
    border: 0px;
    padding: 2px;
    background-color: #f0f0f0;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mdi-grip {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    transition: opacity 0.15s;
    filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.4));
}

.mdi-window:hover .mdi-grip {
    opacity: 0.7;
}

.mdi-grip:hover {
    opacity: 1 !important;
}

.mdi-grip-se {
    bottom: 0;
    right: 0;
    border-style: solid;
    border-width: 0 0 16px 16px;
    border-color: transparent transparent #999 transparent;
}

.mdi-grip-sw {
    bottom: 0;
    left: 0;
    border-style: solid;
    border-width: 16px 0 0 16px;
    border-color: transparent transparent transparent #999;
}

.mdi-grip-ne {
    top: 0;
    right: 0;
    border-style: solid;
    border-width: 0 16px 16px 0;
    border-color: transparent #999 transparent transparent;
}

.mdi-grip-nw {
    top: 0;
    left: 0;
    border-style: solid;
    border-width: 0 0 16px 16px;
    border-color: transparent transparent transparent #999;
}

.mdi-grip-se:hover { border-bottom-color: #777; }
.mdi-grip-sw:hover { border-left-color: #777; }
.mdi-grip-ne:hover { border-right-color: #777; }
.mdi-grip-nw:hover { border-left-color: #777; }
