/* =========================================================
   JAM (Jendela Aplikasi Madrasah) - Taskbar / Dock
   ========================================================= */

#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--taskbar-height);
  background: var(--surface-panel);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: var(--z-taskbar);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

/* Left Section: Launcher & Running Apps */
.taskbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
}

.launcher-toggle-btn {
  height: 38px;
  padding: 0 14px 0 6px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all var(--duration-fast) var(--ease-spring);
  position: relative;
  cursor: pointer;
  user-select: none;
}

.launcher-toggle-btn:hover {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.35), 0 2px 10px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

.launcher-toggle-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(56, 189, 248, 0.22));
  border-color: #10b981;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

.launcher-icon-wrapper {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-spring);
}

.launcher-toggle-btn:hover .launcher-icon-wrapper {
  transform: scale(1.08) rotate(4deg);
}

.launcher-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-full);
  display: block;
}

.launcher-btn-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--text-main);
  transition: color var(--duration-fast);
  text-transform: uppercase;
}

.launcher-toggle-btn:hover .launcher-btn-label {
  color: #34d399;
}

.launcher-toggle-btn.active .launcher-btn-label {
  color: #ffffff;
}

.taskbar-divider {
  width: 1px;
  height: 24px;
  background: var(--glass-border);
  margin: 0 4px;
}

/* Pinned & Running Taskbar Apps */
.taskbar-apps-container {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
}

.taskbar-app-item {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast);
}

.taskbar-app-item:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.taskbar-app-item:active {
  transform: scale(0.94);
}

.taskbar-app-item img, 
.taskbar-app-item svg {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Indicator dot for open apps */
.taskbar-app-item.running::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--text-dim);
  transition: all var(--duration-fast);
}

.taskbar-app-item.active {
  background: var(--surface-active);
  box-shadow: inset 0 0 0 1px var(--glass-border-light);
}

.taskbar-app-item.active::after {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

/* Right Section: System Tray & Clock */
.taskbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
}

.tray-icons-group {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
}

.tray-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--duration-fast);
  position: relative;
}

.tray-icon-btn:hover {
  background: var(--surface-hover);
  color: var(--text-main);
}

.tray-icon-btn.has-badge::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--accent-red);
  box-shadow: 0 0 6px var(--accent-red);
}

.tray-icon-btn svg {
  width: 17px;
  height: 17px;
}

/* Real-time Clock on Taskbar */
.taskbar-clock-widget {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--duration-fast);
  min-width: 90px;
}

.taskbar-clock-widget:hover {
  background: var(--surface-hover);
}

.clock-time {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.clock-date {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-dim);
  line-height: 1.2;
}

/* Show Desktop Peek */
.taskbar-show-desktop {
  width: 5px;
  height: 24px;
  border-left: 1px solid var(--glass-border);
  margin-left: 4px;
  cursor: pointer;
  transition: background var(--duration-fast);
}

.taskbar-show-desktop:hover {
  background: rgba(255, 255, 255, 0.25);
}
