/* Mac OS 8 window kit — ported from jonahsplayground.com (client/src/styles/window.css).
   Static version for the site: no drag/resize/scroll JS; windows are always "active".
   Everything is scoped under .window so it never touches the older .mac-window cards,
   and it resets the properties those older unscoped rules would otherwise leak in. */

.window {
    image-rendering: pixelated;
    background-color: #cccccc;
    border: 2px solid black;
    box-shadow: #fff 2px 2px inset, #999 -2px -2px inset;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 3px;
    margin: 0 auto;
    text-align: left;
}

/* ============================================
   TITLE BAR
   ============================================ */

.window .window-titlebar {
    background: #cccccc;
    padding: 12px 8px;
    display: flex;
    align-items: center;
    height: 22px;
    position: relative;
}

.window .titlebar-buttons {
    display: flex;
    gap: 0;
    margin-right: -6px;
    margin-left: -6px;
}

.window .titlebar-button {
    width: 20px;
    height: 20px;
    border-radius: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
    background-color: transparent;
    border: none;
}

.window .titlebar-button.close {
    background-image: url('/assets/images/window/window-close.png');
}

.window .titlebar-button.tabify {
    background-image: url('/assets/images/window/window-expand.png');
}

.window .titlebar-button.minimize {
    background-image: url('/assets/images/window/window-minimize.png');
}

.window .titlebar-stripes {
    transform: scaleY(2);
    flex: 1;
    height: 8px;
    min-width: 0;
    border-style: solid;
    border-width: 0 2px;
    border-image-source: url('/assets/images/window/titlebar-stripes.png');
    border-image-slice: 0 2 fill;
    border-image-repeat: repeat;
    background: none;
    margin-left: 16px;
    margin-right: 16px;
}

.window .titlebar-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    font-weight: 400;
    /* tall enough to mask the stripes (8px scaled x2 = 16px) behind the title */
    height: 20px;
    line-height: 20px;
    color: #000000;
    padding: 0 10px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-header);
    background-color: #cccccc;
    z-index: 10;
    max-width: calc(100% - 80px);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ============================================
   CONTENT AREA
   ============================================ */

.window .window-content {
    background-color: #ffffff;
    background-image: none;
    border: 2px solid black;
    margin: 4px 4px 0 4px;
    padding: 0;
    min-height: 0;
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: #fff 2px 0px, #999 -2px -2px;
}

.window .window-header {
    border-bottom: 2px solid #000;
    box-shadow: #fff 2px 2px inset, #999 -2px -2px inset;
    flex-shrink: 0;
    background-color: #ddd;
    padding: 8px;
    font-family: var(--font-header);
}

.window .window-body {
    display: flex;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.window .window-content-inner {
    flex: 1;
    min-width: 0;
    background-color: #ffffff;
}

/* ============================================
   SCROLLBARS (decorative on the site)
   ============================================ */

.window .window-scrollbar-v {
    width: 25px;
    background-image: url('/assets/images/window-scrollbar/scrollbar-bkgd-vert.png');
    border-left: 2px solid black;
    background-repeat: repeat-y;
    background-size: 24px auto;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.window .window-scrollbar-h {
    height: 25px;
    background-image: url('/assets/images/window-scrollbar/scrollbar-bkgd-hoz.png');
    border: 2px solid black;
    border-top: 0px;
    background-repeat: repeat-x;
    background-size: auto 25px;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex: 1;
    min-width: 0;
    margin: 0px 1px 0 0px;
}

.window .scroll-arrow {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    border: none;
    background-size: 24px 24px;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    image-rendering: pixelated;
}

.window .scroll-arrow.up {
    background-image: url('/assets/images/window-scrollbar/scrollbar-up.png');
    box-shadow: black 0px 2px;
}

.window .scroll-arrow.down {
    background-image: url('/assets/images/window-scrollbar/scrollbar-down.png');
    box-shadow: black 0px -2px;
}

.window .scroll-arrow.left {
    background-image: url('/assets/images/window-scrollbar/scrollbar-left.png');
    box-shadow: black 2px 0px;
}

.window .scroll-arrow.right {
    background-image: url('/assets/images/window-scrollbar/scrollbar-right.png');
    box-shadow: black -2px 0px;
}

.window .scroll-track {
    flex: 1;
    position: relative;
    min-height: 24px;
    min-width: 24px;
}

.window .scroll-thumb {
    position: absolute;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px 24px;
    image-rendering: pixelated;
}

.window .scroll-thumb-v {
    width: 24px;
    height: 24px;
    top: 0;
    background-image: url('/assets/images/window-scrollbar/scrollbar-thumb-vert.png');
    box-shadow: black 0px 2px, black 0px -2px;
}

.window .scroll-thumb-h {
    height: 24px;
    width: 24px;
    left: 0;
    background-image: url('/assets/images/window-scrollbar/scrollbar-thumb-hoz.png');
    box-shadow: black 2px 0px, black -2px 0px;
}

/* ============================================
   BOTTOM BAR WITH RESIZE HANDLE
   ============================================ */

.window .window-bottom {
    display: flex;
    margin: 0 4px 3px 4px;
    height: 24px;
    flex-shrink: 0;
    box-shadow: #999 -2px -2px;
}

.window .resize-handle {
    width: 24px;
    height: 24px;
    background-image: url('/assets/images/window/window-resize.png');
    background-size: 24px 24px;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}
