/* OS Simulator Styles — macOS & Windows UI Elements */

/* ============ SHARED WINDOW CHROME ============ */
.os-window {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    background: #fff;
    max-width: 800px;
    margin: 0 auto;
}

/* ============ macOS SYSTEM SETTINGS ============ */
.macos-window {
    background: #f5f5f7;
    border: 1px solid #d1d1d6;
}

.macos-titlebar {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(180deg, #e8e8ed 0%, #d6d6db 100%);
    border-bottom: 1px solid #c5c5ca;
}

.macos-traffic-lights {
    display: flex;
    gap: 8px;
    margin-right: 16px;
}

.traffic-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.traffic-light.red { background: #ff5f57; border: 1px solid #e14640; }
.traffic-light.yellow { background: #febc2e; border: 1px solid #d49b0e; }
.traffic-light.green { background: #28c840; border: 1px solid #1aab29; }

.macos-title {
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    flex: 1;
    text-align: center;
}

.macos-body {
    display: flex;
    min-height: 380px;
}

/* macOS Sidebar */
.macos-sidebar {
    width: 220px;
    background: rgba(245, 245, 247, 0.9);
    border-right: 1px solid #d1d1d6;
    padding: 12px 8px;
    overflow-y: auto;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #1d1d1f;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}

.sidebar-item:hover { background: rgba(0,0,0,0.05); }
.sidebar-item.active { background: #007aff; color: #fff; }
.sidebar-item .sidebar-icon { font-size: 18px; width: 24px; text-align: center; }

/* macOS Content Area */
.macos-content {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
}

.macos-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 16px;
}

/* Privacy Category List */
.privacy-category-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.privacy-category {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: #1d1d1f;
    cursor: pointer;
    transition: background 0.15s;
}

.privacy-category:hover { background: rgba(0,0,0,0.04); }
.privacy-category.active { background: #007aff; color: #fff; }
.privacy-category .category-icon { font-size: 16px; width: 24px; text-align: center; }
.privacy-category .category-arrow { margin-left: auto; color: #c5c5ca; }
.privacy-category.active .category-arrow { color: rgba(255,255,255,0.6); }

/* App Toggle List */
.app-toggle-list {
    margin-top: 12px;
}

.app-toggle-description {
    font-size: 12px;
    color: #86868b;
    margin-bottom: 16px;
    line-height: 1.5;
}

.app-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e5ea;
}

.app-toggle-row:last-child { border-bottom: none; }

.app-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-icon-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #e5e5ea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.app-name { font-size: 13px; color: #1d1d1f; }

/* macOS Toggle Switch */
.macos-toggle {
    position: relative;
    width: 42px;
    height: 26px;
    cursor: pointer;
}

.macos-toggle input { display: none; }

.macos-toggle .toggle-track {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #e5e5ea;
    border-radius: 13px;
    transition: background 0.2s;
}

.macos-toggle input:checked + .toggle-track {
    background: #34c759;
}

.macos-toggle .toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: left 0.2s;
}

.macos-toggle input:checked ~ .toggle-thumb {
    left: 18px;
}

/* ============ WINDOWS STYLES ============ */
.win-window {
    background: #f3f3f3;
    border: 1px solid #e0e0e0;
}

.win-titlebar {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.win-titlebar-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.win-titlebar-text {
    font-size: 12px;
    color: #333;
    flex: 1;
}

.win-titlebar-controls {
    display: flex;
    gap: 0;
}

.win-control-btn {
    width: 46px;
    height: 30px;
    border: none;
    background: transparent;
    color: #333;
    font-size: 10px;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
}

.win-control-btn.close { color: #333; }
.win-control-btn.close:hover { background: #e81123; color: #fff; }

.win-body {
    display: flex;
    min-height: 380px;
}

/* Windows Tree View (Device Manager / ADUC) */
.win-tree {
    width: 260px;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    padding: 8px;
    overflow-y: auto;
    font-size: 12px;
}

.tree-node {
    cursor: pointer;
    user-select: none;
}

.tree-node-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 6px;
    border-radius: 3px;
    transition: background 0.1s;
}

.tree-node-header:hover { background: #e5f3ff; }
.tree-node-header.selected { background: #cce8ff; }

.tree-expand {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: #555;
    flex-shrink: 0;
}

.tree-icon {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.tree-icon.warning { color: #f0ad4e; }

.tree-label {
    font-size: 12px;
    color: #1a1a1a;
    white-space: nowrap;
}

.tree-children {
    padding-left: 20px;
    display: none;
}

.tree-children.expanded { display: block; }

/* Windows Context Menu */
.win-context-menu {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    border-radius: 4px;
    padding: 4px 0;
    z-index: 200;
    min-width: 180px;
}

.context-menu-item {
    padding: 6px 24px;
    font-size: 12px;
    color: #1a1a1a;
    cursor: pointer;
    white-space: nowrap;
}

.context-menu-item:hover { background: #e5f3ff; }

.context-menu-separator {
    height: 1px;
    background: #e0e0e0;
    margin: 4px 0;
}

/* Windows Properties Dialog */
.win-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #f0f0f0;
    border: 1px solid #aaa;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    width: 420px;
    z-index: 300;
}

.win-dialog-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: #fff;
    border-bottom: 1px solid #ddd;
}

.win-dialog-title {
    font-size: 12px;
    color: #1a1a1a;
}

.win-dialog-close {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
}

.win-dialog-close:hover { background: #e81123; color: #fff; }

.win-dialog-tabs {
    display: flex;
    background: #f0f0f0;
    border-bottom: 1px solid #ccc;
    padding: 0 8px;
}

.win-dialog-tab {
    padding: 6px 16px;
    font-size: 12px;
    border: 1px solid transparent;
    border-bottom: none;
    cursor: pointer;
    background: transparent;
    color: #333;
    margin-bottom: -1px;
    border-radius: 4px 4px 0 0;
}

.win-dialog-tab:hover { background: #e8e8e8; }

.win-dialog-tab.active {
    background: #fff;
    border-color: #ccc;
}

.win-dialog-content {
    background: #fff;
    padding: 16px;
    min-height: 200px;
}

.win-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 16px;
    background: #f0f0f0;
    border-top: 1px solid #ddd;
}

.win-btn {
    padding: 5px 20px;
    font-size: 12px;
    border: 1px solid #adadad;
    background: #e1e1e1;
    border-radius: 3px;
    cursor: pointer;
    font-family: 'Segoe UI', sans-serif;
}

.win-btn:hover { background: #d5d5d5; }
.win-btn.primary { background: #0078d4; color: #fff; border-color: #0078d4; }
.win-btn.primary:hover { background: #006cc1; }

/* Windows Checkbox */
.win-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 12px;
}

.win-checkbox-row input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #0078d4;
}

/* Windows Dropdown */
.win-dropdown {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #adadad;
    border-radius: 3px;
    background: #fff;
    font-family: 'Segoe UI', sans-serif;
    width: 100%;
    cursor: pointer;
}

/* Windows Display Settings */
.display-settings-content {
    padding: 16px;
}

.monitor-layout {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.monitor-box {
    width: 120px;
    height: 80px;
    border: 2px solid #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #aaa;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.monitor-box.selected {
    border-color: #0078d4;
    background: #e8f0fe;
    color: #0078d4;
}

.display-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.display-setting-label {
    font-size: 13px;
    color: #333;
}

/* ADUC Group List */
.group-list {
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    padding: 4px;
    min-height: 100px;
    margin: 8px 0;
}

.group-item {
    padding: 4px 8px;
    font-size: 12px;
    cursor: default;
    border-radius: 2px;
}

.group-item:hover { background: #e5f3ff; }
.group-item.selected { background: #cce8ff; }

/* ============ INSTRUCTION OVERLAY ============ */
.sim-instructions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #fff8e1;
    border: 1px solid #ffc107;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #856404;
}

.sim-instructions .instruction-icon { font-size: 16px; }
