/* Start menu — layout stile Windows 10 */
.start-menu {
  position: absolute;
  bottom: calc(var(--taskbar-h) + 6px);
  left: 8px;
  width: min(640px, calc(100vw - 16px));
  height: min(620px, calc(100dvh - var(--taskbar-h) - 20px));
  background: rgba(36, 36, 36, 0.96);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-window);
  display: none;
  z-index: 350;
  overflow: hidden;
}

.start-menu.open {
  display: flex;
}

/* Sidebar sinistra */
.start-sidebar {
  width: 48px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.22);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0 8px;
}

.start-sidebar-spacer {
  flex: 1;
}

.start-sidebar-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, color 0.1s;
  position: relative;
  margin: 2px 0;
}

.start-sidebar-btn:hover {
  background: var(--bg-hover);
  color: var(--text-1);
}

.start-sidebar-btn svg {
  width: 20px;
  height: 20px;
}

.start-sidebar-btn.has-badge::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  background: #e81123;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.3);
}

.start-sidebar-btn.is-busy {
  pointer-events: none;
  opacity: 0.65;
}

.start-sidebar-btn.is-busy svg {
  animation: start-sidebar-spin 0.85s linear infinite;
}

@keyframes start-sidebar-spin {
  to { transform: rotate(360deg); }
}

/* Area app a destra */
.start-apps {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.start-apps-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px 20px;
}

.start-apps-scroll::-webkit-scrollbar { width: 6px; }
.start-apps-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.start-section {
  margin-bottom: 20px;
}

.start-section:last-child {
  margin-bottom: 0;
  flex: 1;
}

.start-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

/* Griglia "Aggiunti di recente" (vuota per ora) */
.start-recent {
  min-height: 0;
}

.start-recent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

/* Lista alfabetica app / cartelle */
.start-apps-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.start-alpha-group {
  margin-bottom: 4px;
}

.start-alpha-letter {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  padding: 8px 4px 4px;
}

.start-alpha-items {
  list-style: none;
}

/* Voce singola (app o cartella) — pronta per il contenuto futuro */
.start-app-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 6px 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-1);
  font-size: 13px;
  text-align: left;
  transition: background 0.1s;
  cursor: pointer;
}

.start-app-item:hover {
  background: var(--bg-hover);
}

.start-app-item-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.start-app-item-icon svg,
.start-app-item-icon img {
  width: 24px;
  height: 24px;
}

.start-app-item-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.start-app-item-chevron {
  color: var(--text-3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.start-app-item-chevron svg {
  width: 12px;
  height: 12px;
}

.start-app-item.is-folder .start-app-item-chevron {
  visibility: visible;
}

.start-app-item:not(.is-folder) .start-app-item-chevron {
  visibility: hidden;
}
