/* ===== Windows Container ===== */
.windows-container {
    position: absolute;
    inset: 0;
    bottom: 48px;
    z-index: 10;
    pointer-events: none;
}

/* ===== Window Base ===== */
.window {
    position: absolute;
    background: var(--bg-window);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    min-width: 350px;
    min-height: 250px;
    pointer-events: auto;
    overflow: hidden;
    transition: none;
    resize: both;
}

/* Resize handle */
.window::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 15px;
    height: 15px;
    cursor: nwse-resize;
    background: linear-gradient(135deg, transparent 50%, var(--accent) 50%);
    border-radius: 0 0 12px 0;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.window:hover::after {
    opacity: 1;
}

.window.active {
    display: flex;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--accent);
}

.window.minimized {
    display: none !important;
}

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

/* ===== Window Header ===== */
.window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    cursor: grab;
}

.window-header:active {
    cursor: grabbing;
}

.window-header.terminal-header {
    background: #1e1e2e;
}

.window-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}

.window-title i {
    color: var(--accent);
}

/* ===== Window Controls ===== */
.window-controls {
    display: flex;
    gap: 8px;
}

.win-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: var(--bg-hover);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: all 0.2s ease;
}

.win-btn:hover {
    background: var(--bg-window);
}

.win-btn.close:hover {
    background: var(--danger);
    color: white;
}

.win-btn.minimize:hover {
    background: var(--warning);
    color: #000;
}

.win-btn.maximize:hover {
    background: var(--success);
    color: white;
}

/* ===== Window Content ===== */
.window-content {
    flex: 1;
    overflow: auto;
    padding: 20px;
}

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

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

.window-content::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 4px;
}

.window-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
