/* File: system/design_styling/desktop.css */

:root {
    /* WeOS Core Color Palette */
    --bg-dark: #0f1015;
    --glass-bg: rgba(30, 32, 40, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f0f0f0;
    --text-muted: #888c99;
    
    /* Accents */
    --accent-green: #00ff66;
    --accent-light-green: #99ffcc;
    --accent-red: #ff3333;
    --accent-grey: #2a2c36;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    /* Future background image can go here for the desktop wallpaper */
    background-size: cover;
    background-position: center;
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    height: 100vh;
    overflow: hidden; /* Prevents scrolling the whole screen */
    display: flex;
    flex-direction: column;
}

/* The Liquid Glass Effect */
.liquid-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* --- macOS Style Topbar --- */
#weos-topbar {
    width: 100%;
    height: 30px;
    background: rgba(30, 32, 40, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    box-sizing: border-box;
    font-size: 13px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
}

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-menu-item {
    cursor: pointer;
    transition: color 0.2s;
    letter-spacing: 0.3px;
}

.topbar-menu-item:hover {
    color: var(--accent-light-green);
}

.topbar-active-app {
    font-weight: bold;
    color: white;
}

/* --- Main Desktop Workspace --- */
#weos-workspace {
    width: 100vw;
    height: 100vh;
    padding-top: 30px; /* Pushes content down below the Topbar */
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
}

/* --- Desktop Icons --- */
.desktop-icon-container {
    width: 90px;
    padding: 10px;
    margin: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}

.desktop-icon-container:hover {
    background: rgba(255, 255, 255, 0.1);
}

.desktop-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px; /* Squircle shape like iOS/macOS */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    margin-bottom: 5px;
}

.desktop-icon-label {
    color: white;
    font-size: 12px;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8); /* Ensures text is readable over any wallpaper */
}

/* --- Floating App Windows --- */
.weos-window {
    position: absolute;
    width: 600px;
    height: 400px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* We will apply the .liquid-glass class to this via JS for the blur */
}

/* Specific overrides for iPad screens */
@media screen and (max-width: 1024px) {
    .weos-window {
        width: 80%;
        height: 60%;
    }
}

.window-header {
    height: 45px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    padding: 0 15px;
    cursor: grab;
    user-select: none;
}

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

.window-controls {
    display: flex;
    gap: 12px;
    flex: 1;
}

.control-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    cursor: pointer;
}

.dot-close { background-color: var(--accent-red); }
.dot-minimize { background-color: #ffbd2e; } /* Mac Yellow */
.dot-maximize { background-color: var(--accent-green); }

.window-title {
    flex: 2;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    margin-right: 60px; /* Offsets the controls so the text stays perfectly centered */
}

.window-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth momentum scrolling on iPad */
}

/* --- Topbar Dropdown Menus --- */
.topbar-dropdown {
    position: absolute;
    top: 32px; /* Just below the topbar */
    left: 0;
    min-width: 200px;
    background: rgba(30, 32, 40, 0.8);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    padding: 5px 0;
    display: none; /* Hidden by default */
    z-index: 10000;
}

.topbar-dropdown-item {
    padding: 6px 15px;
    font-size: 13px;
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

.topbar-dropdown-item:hover {
    background-color: var(--accent-green);
    color: black;
}

.topbar-menu-item-container {
    position: relative; /* Anchor for the dropdowns */
}