/* ==========================================================================
   Zeon OS - START MENU & APPLICATION LAUNCHER STYLING
   ========================================================================== */

#app-launcher {
  position: absolute;
  bottom: calc(var(--taskbar-height) + 12px);
  left: 12px;
  width: 540px;
  max-width: calc(100vw - 24px);
  height: 560px;
  max-height: calc(100vh - var(--taskbar-height) - 30px);
  border-radius: var(--style-corner-radius);
  background: var(--menu-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-launcher);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: launcherOpen 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#app-launcher.visible {
  display: flex;
}

@keyframes launcherOpen {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Launcher Search Area */
.launcher-search-box {
  padding: 18px 20px 12px;
  position: relative;
}

.launcher-search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.launcher-search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.launcher-search-input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 42px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.35);
  border: var(--glass-border);
  color: var(--text-primary);
  font-size: 13.5px;
}

[data-theme="light"] .launcher-search-input {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .launcher-app-icon,
[data-theme="dark"] .launcher-recent-icon {
  color: var(--text-primary);
}

/* Launcher Content Scroll Area */
.launcher-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.launcher-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.launcher-section {
  display: flex;
  flex-direction: column;
}

.launcher-section[hidden] {
  display: none;
}

.launcher-section-title {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
}

/* Pinned Apps Grid */
.launcher-apps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.launcher-app-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 6px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.launcher-app-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.launcher-app-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 8px;
}

.launcher-app-title {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Recent Files List */
.launcher-recent-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.launcher-recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.launcher-recent-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.launcher-recent-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.launcher-recent-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.launcher-recent-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.launcher-recent-path {
  font-size: 10.5px;
  color: var(--text-muted);
}

/* Launcher Footer / Power Bar */
.launcher-footer {
  height: 52px;
  padding: 0 20px;
  background: rgba(0, 0, 0, 0.2);
  border-top: var(--glass-border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.launcher-user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.launcher-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  color: #ffffff;
}

.launcher-user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.launcher-power-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.launcher-power-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.launcher-power-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* ======================================================================
   LIGHT THEME OVERRIDES FOR APP LAUNCHER
   ====================================================================== */
[data-theme="light"] .launcher-app-item:hover {
  background-color: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .launcher-recent-item:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .launcher-footer {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .launcher-power-btn:hover {
  background-color: rgba(0, 0, 0, 0.08);
}
