/* ============================================================
   Taskbar & Start Menu — Windows 7 Aero Style
   ============================================================ */

/* ===== AERO TASKBAR ===== */
#taskbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--taskbar-h);
  background: rgba(180, 210, 240, 0.45);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  display: flex; align-items: center;
  z-index: var(--z-taskbar);
  gap: 8px; padding: 0 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 -2px 10px rgba(0,0,0,0.3);
  opacity: 0; transition: opacity 0.6s ease;
}
#taskbar.visible { opacity: 1; }

/* Taskbar inner sheen (Windows 7 characteristic top-half glow) */
#taskbar::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
  pointer-events: none;
}

/* ===== WIN7 START ORB ===== */
#start-button {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: transparent;
  border: none;
  box-shadow: none;
  margin-left: -5px; margin-top: -4px; /* Pops out of taskbar slightly */
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; z-index: 2;
  transition: transform 100ms;
  padding: 0;
}

#start-button .start-orb-img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 50%;
  transition: all 150ms;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

#start-button:hover .start-orb-img {
  filter: drop-shadow(0 0 10px rgba(100, 180, 255, 0.8)) brightness(1.2);
}
#start-button:active {
  transform: scale(0.95);
}
#start-button:active .start-orb-img {
  filter: drop-shadow(0 0 5px rgba(100, 180, 255, 0.5)) brightness(0.9);
}

/* ===== QUICK LAUNCH ===== */
#quick-launch {
  display: flex; align-items: center; gap: 2px;
  height: 38px;
}
.ql-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 3px; cursor: pointer; font-size: 16px;
  transition: all 100ms; color: #333;
  position: relative;
}
.ql-btn:hover {
  background: rgba(255,255,255,0.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 0 5px rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.5);
}

/* ===== TASKBAR APPS ===== */
#taskbar-apps {
  flex: 1; display: flex; align-items: center; gap: 5px;
  overflow: hidden; min-width: 0;
}

.taskbar-app-btn {
  display: flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 10px;
  min-width: 120px; max-width: 180px;
  background: rgba(255,255,255,0.1);
  border: 1px solid transparent;
  border-radius: 4px;
  color: #111;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 12px; cursor: pointer;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  transition: all 150ms;
}
.taskbar-app-btn:hover {
  background: rgba(255,255,255,0.4);
  border-color: rgba(255,255,255,0.6);
  box-shadow: inset 0 0 10px rgba(255,255,255,0.5);
}
.taskbar-app-btn.active {
  background: rgba(255,255,255,0.5);
  border-color: rgba(255,255,255,0.8);
  box-shadow: inset 0 -2px 10px rgba(100, 180, 255, 0.4), inset 0 1px 2px rgba(255,255,255,0.9);
  color: #000;
}
.taskbar-app-btn .app-icon { font-size: 16px; flex-shrink: 0; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }
.taskbar-app-btn .app-title { overflow: hidden; text-overflow: ellipsis; font-weight: 500; text-shadow: 0 0 5px rgba(255,255,255,0.8); }

/* ===== SYSTEM TRAY ===== */
#system-tray {
  display: flex; align-items: center; gap: 8px;
  padding: 0 10px; height: 40px;
  flex-shrink: 0;
}

.tray-icon { font-size: 16px; cursor: pointer; opacity: 0.8; transition: opacity 100ms; filter: drop-shadow(0 1px 1px rgba(255,255,255,0.5)); }
.tray-icon:hover { opacity: 1; filter: drop-shadow(0 0 3px rgba(255,255,255,0.8)); }

#tray-live-indicator {
  display: flex; align-items: center; gap: 4px;
  font-family: 'Segoe UI', sans-serif; font-size: 10px;
  color: #000; cursor: pointer; font-weight: bold;
}

#tray-clock {
  font-family: 'Segoe UI', sans-serif; font-size: 12px;
  color: #111; text-align: center;
  line-height: 1.2; white-space: nowrap; cursor: default;
  text-shadow: 0 0 4px rgba(255,255,255,0.8);
}

/* ===== WIN7 START MENU ===== */
#start-menu {
  position: fixed; bottom: var(--taskbar-h); left: 0;
  width: 420px;
  border: 1px solid rgba(255,255,255,0.6);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -5px 25px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.4);
  z-index: var(--z-start-menu);
  font-family: 'Segoe UI', sans-serif;
  display: none; overflow: hidden;
  background: rgba(180, 210, 240, 0.45);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 6px;
}
#start-menu.open {
  display: block;
  animation: smOpen 0.2s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}
@keyframes smOpen {
  from { transform: translateY(15px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* SM user avatar overlap */
.sm-avatar {
  position: absolute;
  top: -24px; right: 24px;
  width: 48px; height: 48px; border-radius: 4px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  z-index: 10;
  background: #fff;
}
.sm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sm-username { display: none; } /* Hide in win7 */

.sm-header { display: none; } /* Hide old XP header */

/* SM two-column body */
.sm-body {
  display: flex;
  background: #fff;
  height: 380px;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 3px;
  overflow: hidden;
}
.sm-left {
  flex: 1; padding: 6px;
  background: #fff;
  display: flex; flex-direction: column;
}
.sm-right {
  width: 170px; padding: 6px;
  background: rgba(30, 60, 90, 0.05); /* Slight dark tint for right panel */
  border-left: 1px solid #d0d0d0;
  display: flex; flex-direction: column;
}

.sm-item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; cursor: pointer;
  border-radius: 3px;
  transition: background 100ms;
  color: #222; font-size: 12px;
}
.sm-right .sm-item {
  color: #1a406b; font-weight: 500;
}
.sm-item:hover {
  background: rgba(50, 150, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(50, 150, 255, 0.3);
}
.sm-icon { font-size: 24px; flex-shrink: 0; width: 28px; text-align: center; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2)); }
.sm-item-name { font-size: 12px; }
.sm-item-desc { font-size: 10px; color: #777; margin-top: 2px; }

.sm-separator {
  height: 1px; background: #e0e0e0;
  margin: 6px 8px;
}
.sm-right .sm-separator { background: #c0c0c0; }

.sm-all-programs {
  display: flex; align-items: center; justify-content: center;
  padding: 8px; cursor: pointer;
  color: #333; font-size: 12px; font-weight: bold;
  border-top: 1px solid #e0e0e0;
  margin-top: auto;
  border-radius: 3px;
}
.sm-all-programs:hover { background: rgba(50, 150, 255, 0.15); }

/* SM Footer (Search & Shutdown) */
.sm-footer {
  padding: 8px 4px 2px 4px;
  display: flex; justify-content: space-between; gap: 12px;
  align-items: center;
}
.sm-search {
  flex: 1; height: 26px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(0,0,0,0.3);
  border-radius: 13px; padding: 0 12px;
  font-family: 'Segoe UI', sans-serif; font-size: 12px; font-style: italic;
  display: flex; align-items: center; color: #666;
}
.sm-footer-btn {
  display: flex; align-items: center; gap: 6px;
  color: #111; font-size: 12px; font-weight: 500;
  font-family: 'Segoe UI', sans-serif; cursor: pointer;
  background: rgba(255,255,255,0.4); border: 1px solid rgba(255,255,255,0.6);
  padding: 4px 12px; border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.sm-footer-btn:hover { background: rgba(255,255,255,0.7); box-shadow: 0 0 5px rgba(255,255,255,0.8); }

@media (max-width: 480px) {
  #start-menu { width: 100vw; border-radius: 0; padding: 0; }
  .sm-body { flex-direction: column; height: auto; }
  .sm-avatar { display: none; }
}
