/* Holm loads this file before its own CSS, so every override needs !important. */

/* Give larger icons and readable labels enough room between grid rows.
   Narrower side margins let the tiles grow in narrow grid columns. */
.widget-surface.grid-stack {
  --gs-cell-height: 128px !important;
  --gs-item-margin-left: 4px !important;
  --gs-item-margin-right: 4px !important;
}

/* GridStack still sizes the grid for Holm's built-in 92px rows, so taller rows
   spill over whatever follows the grid. Size it for the 128px rows instead. */
.widget-surface.grid-stack[gs-current-row="1"] { height: 128px !important; }
.widget-surface.grid-stack[gs-current-row="2"] { height: 256px !important; }
.widget-surface.grid-stack[gs-current-row="3"] { height: 384px !important; }
.widget-surface.grid-stack[gs-current-row="4"] { height: 512px !important; }
.widget-surface.grid-stack[gs-current-row="5"] { height: 640px !important; }
.widget-surface.grid-stack[gs-current-row="6"] { height: 768px !important; }
.widget-surface.grid-stack[gs-current-row="7"] { height: 896px !important; }
.widget-surface.grid-stack[gs-current-row="8"] { height: 1024px !important; }
.widget-surface.grid-stack[gs-current-row="9"] { height: 1152px !important; }
.widget-surface.grid-stack[gs-current-row="10"] { height: 1280px !important; }
.widget-surface.grid-stack[gs-current-row="11"] { height: 1408px !important; }
.widget-surface.grid-stack[gs-current-row="12"] { height: 1536px !important; }

.widget-surface .app-tile-link {
  padding: 0 !important;
  gap: 8px !important;
}

/* 80px tiles, shrinking to the column width on narrow screens instead of clipping. */
.widget-surface .app-tile-icon {
  width: min(80px, 100%) !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
  border-radius: 18px !important;
}

.widget-surface .app-tile-icon > img,
.widget-surface .app-tile-icon > span {
  width: 90% !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.widget-surface .app-tile-name {
  font-size: 14px !important;
  line-height: 1.25 !important;
}

/* Holm 0.10's launcher slides in with a transform animation that stays in
   effect (fill-mode both), so browsers trap fixed-position children (the Edit
   chip and the add-app picker) inside it. Keep the fade, drop the 10px slide. */
.launcher-host {
  animation-name: fade-in !important;
}

/* Move the Edit layout chip away from the tiles: next to the account button
   (top right) on desktop, and into the free top-right corner on phones, where
   the account button sits bottom right. */
.surface-footer {
  position: fixed !important;
  z-index: 60;
  top: 24px;
  right: 72px;
  height: 36px;
  align-items: center;
  margin: 0 !important;
}

@media (max-width: 767px) {
  .surface-footer {
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    right: 12px;
  }
}
