/* WINDOW FRAME STYLES */

.window {
    position: absolute;
    background-color: #202020;
    /* Dark Mode */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 300px;
    min-height: 200px;

    /* Animation */
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 200ms var(--ease-win), transform 200ms var(--ease-win), width 200ms, height 200ms;
}

.window.active {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 3001;
    /* Base active z-index, handled by JS */
}

.window.opening {
    opacity: 1;
    transform: scale(1);
}

.window.closing {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.window.minimized {
    opacity: 0;
    transform: translateY(300px) scale(0.5);
    pointer-events: none;
}

/* Title Bar */
.window-titlebar {
    height: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(32, 32, 32, 0.95);
    padding: 0 0 0 12px;
    user-select: none;
}

.window.active .window-titlebar {
    background: #2b2b2b;
}

.window-title {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.window-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.window-controls {
    display: flex;
    height: 100%;
}

.control-btn {
    width: 46px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: white;
    cursor: default;
    transition: background 0.2s;
}

.control-btn svg {
    width: 10px;
    /* Windows style icons are small */
    height: 10px;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.control-btn.close-btn:hover {
    background: #e81123;
}

/* Content Area */
.window-content {
    flex: 1;
    padding: 0;
    overflow: auto;
    background: #191919;
    color: white;
    position: relative;
}

/* Scrollbar specific for Windows style */
.window-content::-webkit-scrollbar {
    width: 12px;
}

.window-content::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    border: 4px solid #191919;
    /* Creates padding effect */
}

.window-content::-webkit-scrollbar-track {
    background: transparent;
}

/* Injected Content Inner */
.window-content-inner {
    padding: 20px;
}

.window-content-inner h1 {
    margin-top: 0;
    font-weight: 300;
}