/* Taskbar, flyouts, Start menu, search, quick settings, notification center, and hover previews */

/* Shared flyout surface */
.flyout {
  position: fixed;
  z-index: 1050;
  background: var(--flyout);
  border-radius: 8px;
  box-shadow: var(--shadow-flyout);
  animation: flyout-in 0.2s var(--ease);
}

[data-transparency="on"] .flyout {
  backdrop-filter: blur(60px) saturate(2);
}

@keyframes flyout-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Taskbar */
.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  height: var(--taskbar-h);
  display: flex;
  align-items: stretch;
  background: var(--taskbar-bg);
  border-top: 1px solid var(--stroke);
}

[data-transparency="on"] .taskbar {
  backdrop-filter: blur(60px) saturate(2);
}

.taskbar-center {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
}

[data-align="left"] .taskbar-center {
  left: 6px;
  transform: none;
}

/* Narrow screens: drop Task View and extra icons so the launchers keep clear of the tray */
@media (max-width: 900px) {
  #tb-taskview {
    display: none;
  }
}

@media (max-width: 720px) {
  #tb-search {
    display: none;
  }

  .taskbar-center {
    left: 6px;
    right: 186px;
    transform: none;
    justify-content: center;
  }

  .tb-app:nth-child(n + 6) {
    display: none;
  }
}

@media (max-width: 480px) {
  .tb-app:nth-child(n + 4) {
    display: none;
  }
}

.tb-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: default;
  transition: background 0.12s var(--ease-out), transform 0.1s var(--ease-out);
}

.tb-btn:hover {
  background: var(--subtle);
}

.tb-btn:active {
  transform: scale(0.94);
}

.tb-btn > .ico {
  width: 20px;
  height: 20px;
}

.tb-start > .ico {
  width: 18px;
  height: 18px;
}

.tb-apps {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
}

.tb-app.running::after,
.tb-app.active::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  height: 3px;
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.15s var(--ease);
}

.tb-app.running::after {
  width: 5px;
  background: var(--text-2);
}

.tb-app.active::after {
  width: 16px;
  background: var(--accent);
}

.tb-app.active .ico {
  color: var(--text);
}


.taskbar-tray {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  display: flex;
  align-items: center;
}

.tray-btn {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: default;
}

.tray-btn:hover {
  background: var(--subtle);
}

.tray-ico .ico {
  width: 16px;
  height: 16px;
}

.clock-btn {
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  line-height: 1.25;
  cursor: default;
}

.clock-btn:hover {
  background: var(--subtle);
}

.clock-time {
  font-size: 12px;
}

.clock-date {
  font-size: 12px;
}

.show-desktop {
  width: 6px;
  height: 100%;
  margin-left: 4px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--stroke-strong);
  background: transparent;
}

.show-desktop:hover {
  background: var(--subtle);
}

/* Hover previews above the taskbar */
.preview {
  position: fixed;
  bottom: calc(var(--taskbar-h) + 8px);
  z-index: 1060;
  display: flex;
  gap: 10px;
  padding: 10px;
  max-width: calc(100vw - 16px);
  background: var(--flyout);
  border-radius: 8px;
  box-shadow: var(--shadow-flyout);
  animation: flyout-in 0.16s var(--ease);
}

.pv-card {
  width: 220px;
  padding: 8px;
  border-radius: 6px;
  cursor: default;
}

.pv-card:hover,
.pv-card.focused {
  background: var(--subtle);
}

.pv-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.pv-ico .ico {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.pv-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
}

.pv-close {
  width: 22px;
  height: 22px;
}

.pv-thumb {
  height: 110px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 25%, var(--canvas)), var(--canvas));
  border: 1px solid var(--stroke);
}

.pv-big .ico {
  width: 44px;
  height: 44px;
  color: var(--accent);
  stroke-width: 1.2;
}

/* Start menu */
.start-menu {
  left: 50%;
  bottom: calc(var(--taskbar-h) + 8px);
  transform: translateX(-50%);
  width: min(620px, calc(100vw - 16px));
  height: min(700px, calc(100vh - var(--taskbar-h) - 40px));
  display: flex;
  flex-direction: column;
  padding: 20px 20px 0;
}

.start-menu.align-left {
  left: 8px;
  transform: none;
}

.start-search {
  display: block;
  position: relative;
  margin-bottom: 18px;
}

.start-search > .ico {
  position: absolute;
  left: 12px;
  top: 10px;
  color: var(--text-2);
  width: 16px;
  height: 16px;
}

.start-search-input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--stroke);
  border-bottom-color: var(--stroke-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  outline: none;
}

.start-search-input:focus {
  border-bottom: 2px solid var(--accent);
}

.start-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-bottom: 8px;
}

.start-main {
  display: flex;
  flex-direction: column;
}

.start-results {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.start-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 4px 10px;
}

.start-section {
  font-weight: 600;
  font-size: 15px;
}

.start-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 13px;
}

.start-link .ico {
  width: 14px;
  height: 14px;
}

.start-link:hover {
  background: var(--subtle);
}

.start-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin-bottom: 20px;
}

.start-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 2px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  cursor: default;
}

.start-tile:hover {
  background: var(--subtle);
}

/* Start menu icons sit on the menu with no tile behind them */
.tile-ico {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: none;
}

.tile-ico.small {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.tile-ico .ico {
  width: 20px;
  height: 20px;
}

.tile-label {
  font-size: 12px;
  max-width: 90px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.start-rec {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.rec-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
  cursor: default;
}

.rec-row:hover {
  background: var(--subtle);
}

.rec-ico .ico {
  width: 28px;
  height: 28px;
  color: var(--accent);
  stroke-width: 1.3;
}

.rec-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rec-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
}

.rec-sub {
  color: var(--text-2);
  font-size: 12px;
}

.start-empty,
.result-empty {
  padding: 10px 6px;
  color: var(--text-2);
}

.start-all {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.start-allrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
  cursor: default;
}

.start-allrow:hover {
  background: var(--subtle);
}

.start-footer {
  flex: none;
  height: 56px;
  margin: 0 -20px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--flyout) 70%, transparent);
}

.start-account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  font-size: 13px;
}

.start-account:hover {
  background: var(--subtle);
}

.avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}

.power-btn .ico {
  width: 16px;
  height: 16px;
}

/* Search flyout */
.search-flyout {
  left: 50%;
  bottom: calc(var(--taskbar-h) + 8px);
  transform: translateX(-50%);
  width: min(600px, calc(100vw - 16px));
  height: min(620px, calc(100vh - var(--taskbar-h) - 40px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--stroke);
  border-bottom-color: var(--stroke-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  outline: none;
}

.search-input:focus {
  border-bottom: 2px solid var(--accent);
}

.search-section {
  padding: 6px 4px 0;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}

.search-results {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
  cursor: default;
}

.result:hover,
.result.selected {
  background: var(--subtle);
}

.result-ico .ico {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.result-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.result-label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.result-sub {
  color: var(--text-2);
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Quick settings */
.quick {
  right: 8px;
  bottom: calc(var(--taskbar-h) + 8px);
  width: 372px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.qtile {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 58px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow-card);
  cursor: default;
}

.qtile:hover:not(:disabled) {
  background: var(--card-hover);
}

.qtile:disabled {
  opacity: 0.5;
}

.qtile.on {
  background: var(--accent);
  color: var(--accent-text);
}

.qtile.on:hover:not(:disabled) {
  background: var(--accent-hover);
}

.qtile-ico {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--subtle);
}

.qtile.on .qtile-ico {
  background: rgba(255, 255, 255, 0.2);
}

.qtile-ico .ico {
  width: 16px;
  height: 16px;
}

.qtile-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.qtile-label {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.qtile-sub {
  font-size: 12px;
  opacity: 0.8;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.quick-sliders {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.quick-slider {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quick-slider .slider {
  flex: 1;
  width: auto;
}

.quick-slider-ico {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
}

.quick-mute:hover {
  background: var(--subtle);
}

.quick-slider-ico .ico {
  width: 18px;
  height: 18px;
}

.quick-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.quick-battery {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 12px;
}

.quick-battery .ico {
  width: 16px;
  height: 16px;
}

.quick-actions {
  display: flex;
  gap: 4px;
}

/* Notification center */
.center {
  right: 8px;
  bottom: calc(var(--taskbar-h) + 8px);
  width: 380px;
  max-height: calc(100vh - var(--taskbar-h) - 40px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  overflow: auto;
}

.cal {
  padding: 4px 4px 6px;
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cal-title {
  font-size: 14px;
  font-weight: 600;
}

.cal-nav {
  display: flex;
  gap: 2px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.cal-wd {
  height: 26px;
  line-height: 26px;
  color: var(--text-2);
  font-size: 12px;
}

.cal-cell {
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 13px;
}

.cal-cell:not(.cal-blank):hover {
  background: var(--subtle);
}

.cal-today {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}

.center-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.center-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.center-title {
  font-weight: 600;
  font-size: 14px;
}

.center-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 26px 0;
  color: var(--text-2);
}

.center-empty .ico {
  width: 28px;
  height: 28px;
}

.notif {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.notif.clickable {
  cursor: default;
}

.notif.clickable:hover {
  background: var(--card-hover);
}

.notif-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
}

.notif-ico .ico {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.notif-app {
  flex: 1;
}

.notif-close {
  width: 24px;
  height: 24px;
}

.notif-close .ico {
  width: 12px;
  height: 12px;
}

.notif-title {
  font-weight: 600;
}

.notif-body {
  color: var(--text);
  line-height: 1.4;
}
