/**
 * QuickSuite Launchpad - Enterprise Smartphone / Tablet Style App Grid
 * Clean, stable enterprise micro-interactions (NO vertical jumping / lifting).
 */

/* ==========================================================================
   LAUNCHPAD CONTAINER
   ========================================================================== */
.qs-launchpad-section {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 24px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Header & Search */
.qs-launchpad-header {
  text-align: center;
  margin-bottom: 36px;
  width: 100%;
}

.qs-launchpad-greeting {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--p-border-subtle);
  padding: 4px 12px;
  border-radius: var(--p-border-radius-full);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--p-color-text-subdued);
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.qs-launchpad-title {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.6px;
  color: var(--p-color-text);
  margin-bottom: 6px;
}

.qs-launchpad-subtitle {
  font-size: 13.5px;
  color: var(--p-color-text-subdued);
  max-width: 500px;
  margin: 0 auto 20px;
  line-height: 1.45;
}

/* Spotlight Search Bar */
.qs-launchpad-search-box {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

.qs-launchpad-search-input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 40px;
  border-radius: 20px;
  border: 1px solid var(--p-border-default);
  background: #ffffff;
  font-size: 13px;
  font-family: inherit;
  color: var(--p-color-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.qs-launchpad-search-input:focus {
  border-color: #008060;
  box-shadow: 0 0 0 3px rgba(0, 128, 96, 0.12);
}

.qs-launchpad-search-icon {
  position: absolute;
  top: 11px;
  left: 14px;
  color: #8c9196;
  pointer-events: none;
}

/* Category Filter Chips */
.qs-launchpad-categories {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.qs-cat-chip {
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 550;
  color: var(--p-color-text-subdued);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.qs-cat-chip:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--p-color-text);
}

.qs-cat-chip.active {
  background: #202223;
  color: #ffffff;
}

/* ==========================================================================
   APP ICON GRID (Completely Grounded - NO Vertical Lifting)
   ========================================================================== */
.qs-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 20px 16px;
  width: 100%;
  max-width: 860px;
  margin-top: 16px;
  justify-items: center;
}

@media (min-width: 768px) {
  .qs-icon-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 24px 16px;
  }
}

/* Individual App Icon Item */
.qs-app-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 10px 8px;
  border-radius: 16px;
  width: 100%;
  max-width: 116px;
  text-decoration: none;
  outline: none;
  user-select: none;
  transition: background-color 0.15s ease;
  position: relative;
  /* Strictly NO transform / NO translateY */
  transform: none !important;
}

/* On hover: clean, grounded tile background highlight (like macOS / Google) */
.qs-app-icon-item:hover {
  background-color: rgba(0, 0, 0, 0.035);
}

.qs-app-icon-item:active {
  background-color: rgba(0, 0, 0, 0.07);
}

/* Reusable Icon Container wrapping Squircle and Floating Badge */
.qs-icon-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(0);
}

/* Gentle 2.5px micro-lift on hover: moves the entire icon container (squircle + badge) */
.qs-app-icon-item:hover .qs-icon-container {
  transform: translateY(-2.5px);
}

.qs-app-icon-item:active .qs-icon-container {
  transform: translateY(0);
}

/* Refined Squircle Icon */
.qs-squircle-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;
  overflow: hidden;
}

/* Subtle 1px inner border overlay */
.qs-squircle-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.qs-app-icon-item:hover .qs-squircle-icon {
  filter: brightness(1.04);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* Reusable Floating Notification Badge: Positioned cleanly OVER and OUTSIDE top-right corner */
.qs-icon-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 750;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  z-index: 10;
  pointer-events: none;
  line-height: 1;
}

/* Precision optical vertical centering: shifts number up by 1px to balance font descender gap */
.qs-icon-badge .qs-badge-val {
  display: inline-block;
  line-height: 1;
  transform: translateY(-1px);
}

/* App Title underneath */
.qs-app-icon-title {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--p-color-text);
  line-height: 1.25;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.qs-app-icon-item:hover .qs-app-icon-title {
  color: #000000;
}

.qs-app-icon-tag {
  font-size: 11px;
  color: var(--p-color-text-subdued);
  margin-top: 2px;
  white-space: nowrap;
  font-weight: 450;
}

/* Add New Module / App Store Tile */
.qs-app-icon-add .qs-squircle-icon {
  background: #ffffff;
  border: 1.5px dashed var(--p-border-default);
  color: var(--p-color-text-subdued);
  box-shadow: none;
}

.qs-app-icon-add:hover .qs-squircle-icon {
  border-color: #008060;
  color: #008060;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
