/* Terra OS: taskbar, Start, quick settings, context menu, toasts. */

/* ---------- Taskbar ---------- */
.taskbar {
  position: fixed;
  inset: auto 0 0 0;
  height: var(--taskbar);
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 8px;
  background: var(--glass);
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  backdrop-filter: blur(22px) saturate(1.4);
}
.tb-left {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 12px;
}
.tb-mid {
  display: flex;
  align-items: center;
  gap: 4px;
}
.tb-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 2px;
}
.tb-btn {
  position: relative;
  width: 42px;
  height: 40px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  transition: background 0.12s;
}
.tb-btn:hover,
.tb-btn[aria-expanded='true'] {
  background: var(--hover);
}
.tb-btn:active .tb-ico {
  transform: scale(0.88);
}
.tb-ico {
  width: 26px;
  height: 26px;
  transition: transform 0.12s var(--ease);
}
.tb-btn.search .tb-ico {
  width: 20px;
  height: 20px;
  color: var(--text-2);
}
.tb-btn::after {
  /* Running: a dash under it; the focused one, longer and green. */
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 6px;
  height: 3px;
  margin-left: -3px;
  border-radius: 2px;
  background: var(--text-3);
  opacity: 0;
  transition: width 0.18s var(--ease), margin 0.18s var(--ease), opacity 0.18s;
}
.tb-btn.running::after {
  opacity: 1;
}
.tb-btn.active::after {
  width: 16px;
  margin-left: -8px;
  background: var(--accent);
}
.tb-sep {
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: var(--line-2);
}
.tray {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px;
  border-radius: 7px;
  color: var(--text);
}
.tray:hover,
.tray[aria-expanded='true'] {
  background: var(--hover);
}
.tray .t-ico {
  width: 17px;
  height: 17px;
}
.clock {
  text-align: right;
  font-size: 12px;
  line-height: 1.3;
  padding: 0 8px;
  height: 40px;
  display: grid;
  align-content: center;
  border-radius: 7px;
}
.clock:hover {
  background: var(--hover);
}
.show-desktop {
  width: 6px;
  height: 40px;
  margin-left: 4px;
  border-left: 1px solid var(--line-2);
}
.tip {
  position: fixed;
  z-index: 60;
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--glass-solid);
  border: 1px solid var(--line-2);
  font-size: 12px;
  pointer-events: none;
  box-shadow: var(--shadow);
}

/* ---------- Flyouts: Start, quick settings, context menu ---------- */
.flyout {
  position: fixed;
  z-index: 50;
  bottom: calc(var(--taskbar) + 10px);
  background: var(--glass);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  backdrop-filter: blur(28px) saturate(1.5);
  animation: rise 0.22s var(--ease);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}
.start {
  left: 50%;
  width: min(640px, calc(100vw - 20px));
  max-height: calc(100vh - var(--taskbar) - 24px);
  margin-left: calc(min(640px, calc(100vw - 20px)) / -2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.start-search {
  margin: 22px 26px 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 14px;
  border-radius: 99px;
  background: var(--win);
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--accent);
}
.start-search svg {
  width: 17px;
  height: 17px;
  color: var(--text-2);
  flex: none;
}
.start-search input {
  flex: 1;
  background: none;
  border: 0;
  outline: none;
  min-width: 0;
}
.start-body {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 26px 16px;
}
.start h3 {
  margin: 12px 4px 8px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.start h3 small {
  font-weight: 400;
  color: var(--text-2);
}
.pins {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2px;
}
.pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  text-align: center;
}
.pin:hover {
  background: var(--hover);
}
.pin .ico {
  width: 36px;
  height: 36px;
}
.pin .lbl {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
}
.rec {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  text-align: left;
}
.rec:hover {
  background: var(--hover);
}
.rec .ico {
  width: 32px;
  height: 32px;
  flex: none;
}
.rec small {
  display: block;
  color: var(--text-2);
  font-size: 12px;
}
.start-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 26px;
  background: var(--press);
  border-top: 1px solid var(--line);
}
.me {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: 6px;
  text-align: left;
}
.me:hover {
  background: var(--hover);
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--accent-ink);
  background: linear-gradient(145deg, #86efac, #14b8a6);
  flex: none;
}
.me small {
  display: block;
  color: var(--text-2);
  font-size: 12px;
}
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: grid;
  place-items: center;
}
.icon-btn:hover {
  background: var(--hover);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}
.quick {
  right: 10px;
  width: 340px;
  padding: 16px;
}
.qgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.qtile {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--win-2);
  border: 1px solid var(--line);
  font-size: 13px;
  text-align: left;
}
.qtile svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.qtile[aria-pressed='true'] {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
}
.walls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.wall {
  height: 46px;
  border-radius: 8px;
  border: 2px solid transparent;
  background: var(--w);
}
.wall[aria-pressed='true'] {
  border-color: var(--accent);
}
.qfoot {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-2);
}
.menu {
  position: fixed;
  z-index: 70;
  min-width: 200px;
  padding: 5px;
  border-radius: 9px;
  background: var(--glass);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  animation: rise 0.14s var(--ease);
}
.menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 5px;
  text-align: left;
  font-size: 13px;
}
.menu button:hover,
.menu button:focus-visible {
  background: var(--hover);
  outline: none;
}
.menu svg {
  width: 16px;
  height: 16px;
}
.menu hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 4px 6px;
}
.toast {
  position: fixed;
  z-index: 80;
  right: 14px;
  bottom: calc(var(--taskbar) + 14px);
  max-width: 340px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--glass-solid);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  animation: rise 0.2s var(--ease);
  font-size: 13px;
}

