/* modules.css - The Horizontal Ribbon */

/* --- 1. THE SCROLLING TRACK --- */
.mobile-grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;

  /* This is the secret to making it feel native. It forces the scroll to "snap" to icons */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;

  gap: 24px;
  padding: 20px 30px; /* Leaves space on the edges so the first icon isn't flush against the screen */
  margin-bottom: 10px;

  /* Hides the ugly scrollbar on mobile browsers */
  scrollbar-width: none;
}

.mobile-grid::-webkit-scrollbar {
  display: none;
}

/* --- 2. THE APP ICONS --- */
.link-item {
  flex: 0 0 auto; /* Prevents icons from squishing together */
  width: 75px;
  scroll-snap-align: center; /* Tells the track to snap right to the middle of the icon */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.link-icon-circle {
  width: 70px;
  height: 70px;
  border-radius: 22px; /* Squarcle shape */

  /* Glassmorphism for the icons too! */
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);

  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

/* Simulates actual pressing physics on mobile */
.link-item:active .link-icon-circle {
  transform: scale(0.9);
}

.link-name {
  font-size: 0.85rem;
  color: var(--text);
  text-align: center;
  width: 100%;

  /* Truncates long names with "..." so it never breaks to a second line */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}
