/* ============ activities overview ============ */
#overview {
  position: fixed; inset: 0; z-index: 6500;
  display: flex; flex-direction: column;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(24px);
  animation: ov-in var(--dur-med) var(--ease-decel);
}
#overview.closing { animation: ov-out var(--dur-med) var(--ease-accel) forwards; }
@keyframes ov-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ov-out { to { opacity: 0; } }

.ov-workspaces {
  display: flex; gap: 16px; justify-content: center;
  padding: 20px 24px 8px;
  flex: none;
}
.ov-ws {
  position: relative; width: 168px; height: 94px;
  border-radius: 10px; border: none;
  background: rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  overflow: hidden; cursor: pointer;
  transition: box-shadow var(--dur-fast), background var(--dur-fast);
}
.ov-ws:hover { background: rgba(255,255,255,.14); }
.ov-ws.current { box-shadow: inset 0 0 0 2px var(--accent); }
.ov-ws .ov-ws-label {
  position: absolute; bottom: 4px; right: 6px; font-size: 10px; color: rgba(255,255,255,.6);
}
.ov-ws .ov-ws-thumb {
  position: absolute; inset: 6px; display: flex; gap: 3px; align-items: center; justify-content: center;
}
.ov-ws .ov-ws-win {
  background: rgba(255,255,255,.28); border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.ov-ws-add {
  width: 168px; height: 94px; border-radius: 10px;
  border: 2px dashed rgba(255,255,255,.25); background: transparent;
  color: rgba(255,255,255,.5); font-size: 28px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ov-ws-add:hover { border-color: rgba(255,255,255,.5); color: rgba(255,255,255,.8); }

.ov-search-wrap {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  padding: 10px 24px 6px; flex: none;
}
#ov-grid-btn {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.12); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
#ov-grid-btn:hover { background: rgba(255,255,255,.22); }
#ov-grid-btn svg { width: 18px; height: 18px; }
#ov-search {
  width: min(560px, 80%); height: 40px; padding: 0 16px;
  border-radius: 999px; border: none;
  background: rgba(255,255,255,.12); color: #fff;
  font-size: 15px; text-align: center;
  transition: background var(--dur-fast), box-shadow var(--dur-fast);
}
#ov-search::placeholder { color: rgba(255,255,255,.55); }
#ov-search:focus { outline: none; background: rgba(255,255,255,.16); box-shadow: 0 0 0 2px var(--accent); }

.ov-body { flex: 1; min-height: 0; position: relative; padding: 8px 48px 24px; overflow: hidden; }

/* window spread */
#ov-windows {
  position: absolute; inset: 8px 48px 24px;
  transition: opacity var(--dur-med), transform var(--dur-med);
}
#ov-windows.hidden-mode { opacity: 0; transform: scale(.96); pointer-events: none; }
.ov-win {
  position: absolute; border-radius: 10px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast);
  animation: ov-win-in var(--dur-med) var(--ease-decel);
  background: var(--bg);
}
@keyframes ov-win-in { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
.ov-win:hover { transform: scale(1.03); box-shadow: 0 12px 32px rgba(0,0,0,.6); }
.ov-win .ov-win-title {
  position: absolute; top: 0; left: 0; right: 0; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: var(--headerbar); font-size: 11px; font-weight: 700; color: var(--fg);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 8px;
}
.ov-win .ov-win-body { position: absolute; inset: 26px 0 0; overflow: hidden; pointer-events: none; }
.ov-win .ov-win-close {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
  border-radius: 50%; border: none; background: rgba(0,0,0,.45); color: #fff;
  display: none; align-items: center; justify-content: center; font-size: 11px; z-index: 2;
}
.ov-win:hover .ov-win-close { display: flex; }
.ov-win .ov-win-close:hover { background: var(--error); }
.ov-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  color: rgba(255,255,255,.55); font-size: 15px;
}
.ov-empty svg { width: 56px; height: 56px; opacity: .4; }

/* search results */
#ov-results {
  position: absolute; inset: 8px 48px 24px; overflow-y: auto;
  animation: ov-fade var(--dur-med) var(--ease-decel);
}
@keyframes ov-fade { from { opacity: 0; } to { opacity: 1; } }
.ov-res-section { margin-bottom: 20px; }
.ov-res-head { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.6); margin: 0 0 8px 8px; }
.ov-res-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.ov-res-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 128px; padding: 14px 8px; border-radius: 12px; border: none;
  background: transparent; color: #fff; cursor: pointer;
}
.ov-res-item:hover { background: rgba(255,255,255,.12); }
.ov-res-item img, .ov-res-item svg.app-icon { width: 56px; height: 56px; }
.ov-res-item .ov-res-label { font-size: 12.5px; text-align: center; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-res-item.file-item .file-ico { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; }
.ov-res-item.file-item .file-ico svg { width: 48px; height: 48px; }
.ov-res-item.file-item .ov-res-sub { font-size: 10.5px; color: rgba(255,255,255,.55); }
.ov-no-results {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 10px; color: rgba(255,255,255,.6); font-size: 15px;
}
.ov-no-results svg { width: 48px; height: 48px; opacity: .4; }

/* app grid */
#ov-appgrid {
  position: absolute; inset: 8px 48px 24px; overflow-y: auto;
  animation: ov-fade var(--dur-med) var(--ease-decel);
}
.appgrid-pages { display: flex; flex-direction: column; gap: 8px; }
.appgrid-page {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 4px; max-width: 1080px; margin: 0 auto; width: 100%;
}
.appgrid-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 6px; border-radius: 14px; border: none;
  background: transparent; color: #fff; cursor: pointer;
  position: relative;
}
.appgrid-item:hover { background: rgba(255,255,255,.12); }
.appgrid-item:active { background: rgba(255,255,255,.18); }
.appgrid-item img, .appgrid-item svg.app-icon { width: 64px; height: 64px; }
.appgrid-item .ag-label { font-size: 12.5px; text-align: center; max-width: 104px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.appgrid-item.folder-item .ag-folder {
  width: 64px; height: 64px; border-radius: 16px;
  background: rgba(255,255,255,.18); backdrop-filter: blur(6px);
  display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 9px;
}
.appgrid-item.folder-item .ag-folder img { width: 100%; height: 100%; }
.appgrid-folder-pop {
  position: fixed; z-index: 6600;
  background: rgba(30,30,30,.85); backdrop-filter: blur(20px);
  border-radius: 20px; padding: 20px;
  box-shadow: var(--shadow-popover);
  animation: pop-in var(--dur-med) var(--ease-decel);
}
.appgrid-folder-pop .agf-title { text-align: center; color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.appgrid-folder-pop .appgrid-page { max-width: 400px; }
.appgrid-dots {
  display: flex; gap: 8px; justify-content: center; padding: 14px 0 4px;
}
.appgrid-dots button {
  width: 8px; height: 8px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.3); padding: 0;
}
.appgrid-dots button.on { background: #fff; }

#ov-close {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.14); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
#ov-close:hover { background: rgba(255,255,255,.24); }
#ov-close svg { width: 16px; height: 16px; }

/* dock peek in overview: hide dock */
#overview ~ #dock, body.ov-open #dock { opacity: 0; transform: translateX(-100%); pointer-events: none; }
