/* Windows 98 Window Styling */

.window {
    position: absolute;
    min-width: 200px;
    min-height: 150px;
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #000000;
    border-bottom: 1px solid #000000;
    display: flex;
    flex-direction: column;
}

.window.minimized {
    display: none;
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100vh - 28px) !important;
}

/* Title Bar */
.window-titlebar {
    height: 18px;
    background: linear-gradient(to right, #000080, #1084d0);
    display: flex;
    align-items: center;
    padding: 0 2px;
    cursor: move;
    user-select: none;
}

.window-titlebar.inactive {
    background: linear-gradient(to right, #808080, #a0a0a0);
}

.window-titlebar-icon {
    width: 16px;
    height: 16px;
    margin-right: 4px;
}

.window-titlebar-text {
    flex: 1;
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.window-titlebar-buttons {
    display: flex;
    gap: 2px;
}

.window-titlebar-button {
    width: 16px;
    height: 14px;
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #000000;
    border-bottom: 1px solid #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
}

.window-titlebar-button:active {
    border-top: 1px solid #000000;
    border-left: 1px solid #000000;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
    padding-top: 1px;
}

.window-titlebar-button.minimize::after {
    content: '_';
    position: relative;
    top: -2px;
}

.window-titlebar-button.maximize::after {
    content: '□';
    font-size: 12px;
}

.window-titlebar-button.close::after {
    content: '×';
    font-size: 16px;
    line-height: 10px;
}

/* Menu Bar */
.window-menubar {
    height: 18px;
    background: #c0c0c0;
    border-bottom: 1px solid #ffffff;
    display: flex;
    align-items: center;
    padding: 0 2px;
}

.window-menubar-item {
    padding: 2px 6px;
    cursor: pointer;
    font-size: 11px;
}

.window-menubar-item:hover {
    background: #000080;
    color: #ffffff;
}

/* Window Content */
.window-content {
    flex: 1;
    background: #ffffff;
    overflow: auto;
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #dfdfdf;
    border-bottom: 1px solid #dfdfdf;
    margin: 2px;
}

.window-content::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

.window-content::-webkit-scrollbar-track {
    background: #c0c0c0;
}

.window-content::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #808080;
    border-bottom: 1px solid #808080;
}

.window-content::-webkit-scrollbar-button {
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #000000;
    border-bottom: 1px solid #000000;
    height: 16px;
    width: 16px;
}

.window-content::-webkit-scrollbar-button:vertical:decrement {
    background: #c0c0c0 url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M 8,6 L 4,10 L 12,10 Z" fill="%23000"/></svg>') center/8px no-repeat;
}

.window-content::-webkit-scrollbar-button:vertical:increment {
    background: #c0c0c0 url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M 8,10 L 4,6 L 12,6 Z" fill="%23000"/></svg>') center/8px no-repeat;
}

.window-content::-webkit-scrollbar-button:horizontal:decrement {
    background: #c0c0c0 url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M 6,8 L 10,4 L 10,12 Z" fill="%23000"/></svg>') center/8px no-repeat;
}

.window-content::-webkit-scrollbar-button:horizontal:increment {
    background: #c0c0c0 url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M 10,8 L 6,4 L 6,12 Z" fill="%23000"/></svg>') center/8px no-repeat;
}

/* Status Bar */
.window-statusbar {
    height: 20px;
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    display: flex;
    align-items: center;
    padding: 0 4px;
    font-size: 11px;
}

.window-statusbar-section {
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
    padding: 1px 4px;
    margin-right: 2px;
}

/* Dialog Styles */
.dialog {
    min-width: 300px;
    max-width: 500px;
}

.dialog .window-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dialog-icon {
    width: 32px;
    height: 32px;
}

.dialog-message {
    flex: 1;
    font-size: 11px;
    line-height: 1.4;
}

.dialog-buttons {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 12px;
}

.dialog-button {
    min-width: 75px;
    height: 23px;
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #000000;
    border-bottom: 1px solid #000000;
    font-family: 'MS Sans Serif', Arial, sans-serif;
    font-size: 11px;
    cursor: pointer;
}

.dialog-button:active {
    border-top: 1px solid #000000;
    border-left: 1px solid #000000;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
    padding-top: 1px;
}

.dialog-button:focus {
    outline: 1px dotted #000000;
    outline-offset: -4px;
}
