@import url('/shared/css/shared-styles.css');

/* ── App Launcher — Tile Grid ────────────────────
   Launcher-specific styles for the module picker grid.
   Not in shared-styles.css because only the frontend uses these.
   ─────────────────────────────────────────────── */

/* Override shared .view fixed positioning so launcher sits below the header */
#launcher-view {
  top: 52px;
  z-index: 50;
}

.app-launcher {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1150px;
  padding: 0 2rem 3rem;
}

.app-launcher-logo {
  margin-bottom: -0.5rem;
  opacity: 0;
  animation: launcherFadeIn 0.4s ease forwards;
}

.app-launcher-logo img {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 0 16px var(--accent-glow));
}

.app-launcher-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--text-primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: launcherFadeIn 0.4s ease forwards;
}

.app-launcher-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: launcherFadeIn 0.4s 0.1s ease forwards;
}

.app-launcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 140px);
  gap: 1.25rem;
  justify-content: center;
  width: 100%;
}

.app-launcher-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 140px;
  height: 140px;
  background: rgb(20, 20, 32, 0.8);
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: scale(0.9) translateY(10px);
  animation: launcherTileIn 0.3s ease forwards;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0;
  font-family: var(--font);
  color: var(--text-primary);
}

.app-launcher-tile:hover {
  transform: scale(1.05);
  border-color: var(--border-accent);
  box-shadow:
    0 0 30px var(--accent-dim),
    0 8px 24px rgb(0, 0, 0, 0.3);
  background: rgb(20, 20, 32, 0.95);
}

.app-launcher-tile:active {
  transform: scale(0.97);
  transition-duration: 0.1s;
}

.app-launcher-icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  flex-shrink: 0;
}

.app-launcher-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-launcher-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

/* ── Launcher Keyframes ─────────────────────────── */

@keyframes launcherFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes launcherTileIn {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
