/* Ubuntu Web — App Center. All selectors scoped under .app-software. */

.app-software .window-content { flex-direction: row; }

/* ---------- nav rail ---------- */
.app-software .sw-rail {
  width: 96px; flex: none;
  background: var(--win-bg2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: stretch;
  gap: 4px;
  padding: 10px 8px;
  overflow-y: auto;
}
.app-software .sw-rail-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px 8px;
  border-radius: 8px;
  color: var(--fg-dim);
  font-size: 11.5px;
}
.app-software .sw-rail-btn:hover { background: var(--hover); color: var(--fg); }
.app-software .sw-rail-btn.active { background: rgba(var(--accent-rgb), 0.14); color: var(--accent); }
.app-software .sw-rail-icon { display: inline-flex; }
.app-software .sw-rail-icon svg { display: block; }

/* ---------- header search / back ---------- */
.app-software .sw-search { width: min(360px, 40vw); text-align: left; font-weight: 400; }
.app-software .sw-back { color: var(--fg); }

/* ---------- content ---------- */
.app-software .sw-content { flex: 1; min-width: 0; overflow-y: auto; background: var(--win-bg); }
.app-software .sw-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 22px 24px 48px;
  display: flex; flex-direction: column; gap: 16px;
}
.app-software .sw-section-title { font-weight: 700; font-size: 16px; margin-top: 4px; }

.app-software .sw-app-icon { display: inline-flex; flex: none; }
.app-software .sw-app-icon svg { width: 100%; height: 100%; display: block; }

/* ---------- hero ---------- */
.app-software .sw-hero {
  display: flex; align-items: center; gap: 20px;
  padding: 22px 24px;
  border-radius: 16px;
  background: linear-gradient(115deg, #24344d 0%, #40506e 55%, #f5792a 130%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}
.app-software .sw-hero-text { flex: 1; min-width: 0; }
.app-software .sw-hero-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; opacity: 0.75; }
.app-software .sw-hero-name { font-size: 24px; font-weight: 700; margin-top: 2px; }
.app-software .sw-hero-blurb { font-size: 13.5px; opacity: 0.85; margin-top: 2px; }
.app-software .sw-hero-action { flex: none; }
.app-software .sw-hero-action .btn { background: rgba(255,255,255,0.18); color: #fff; }
.app-software .sw-hero-action .btn:hover { background: rgba(255,255,255,0.28); }
.app-software .sw-hero-action .btn.suggested { background: #fff; color: #24344d; }
.app-software .sw-hero-action .btn.suggested:hover { background: #f0f0f0; }

/* ---------- chips ---------- */
.app-software .sw-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.app-software .sw-chip { font-size: 12.5px; padding: 5px 14px; }

/* ---------- card grid ---------- */
.app-software .sw-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.app-software .sw-card > * { min-width: 0; }
.app-software .sw-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: box-shadow 0.14s ease, transform 0.14s ease;
}
.app-software .sw-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,0.12); transform: translateY(-1px); }
.app-software .sw-card-text { flex: 1; min-width: 0; }
.app-software .sw-card-name { font-weight: 600; }
.app-software .sw-card-blurb {
  font-size: 12.5px; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app-software .sw-card-meta { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 12px; }
.app-software .sw-stars { color: #f5a623; display: inline-flex; }
.app-software .sw-stars svg { display: block; }
.app-software .sw-dot { margin: 0 -1px; }
.app-software .sw-card-action { flex: none; }

.app-software .sw-empty { text-align: center; padding: 48px 16px; }
.app-software .sw-empty-title { font-weight: 600; font-size: 15px; }
.app-software .sw-empty-sub { margin-top: 4px; font-size: 13px; }

/* ---------- install progress ---------- */
.app-software .sw-progress {
  width: 110px; height: 8px;
  border-radius: 99px;
  background: var(--btn-bg);
  overflow: hidden;
  flex: none;
}
.app-software .sw-progress-fill {
  height: 100%;
  width: 100%;
  border-radius: 99px;
  background: var(--accent);
  transform: translateX(-100%);
  animation-name: sw-progress-fill;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}
@keyframes sw-progress-fill {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

/* ---------- installed list ---------- */
.app-software .sw-row-size { font-size: 12.5px; flex: none; }
.app-software .sw-disabled-wrap { display: inline-flex; }

/* ---------- updates ---------- */
.app-software .sw-updates {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 46px 16px 16px;
  text-align: center;
}
.app-software .sw-upd-check { line-height: 0; }
.app-software .sw-upd-title { font-size: 17px; font-weight: 700; }
.app-software .sw-upd-btn { margin-top: 10px; }
.app-software .sw-upd-list { width: 100%; max-width: 520px; text-align: left; }
.app-software .sw-upd-badge {
  width: 36px; height: 36px; flex: none;
  border-radius: 10px;
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
}
.app-software .sw-upd-badge svg { display: block; }
.app-software .sw-spinner {
  width: 26px; height: 26px;
  border: 3px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: sw-spin 0.8s linear infinite;
}
@keyframes sw-spin { to { transform: rotate(360deg); } }

/* ---------- detail view ---------- */
.app-software .sw-detail-head { display: flex; align-items: center; gap: 18px; }
.app-software .sw-detail-meta { flex: 1; min-width: 0; }
.app-software .sw-detail-name { font-size: 24px; font-weight: 700; }
.app-software .sw-detail-dev { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 2px; }
.app-software .sw-verified { display: inline-flex; }
.app-software .sw-verified svg { display: block; }
.app-software .sw-detail-rating { display: flex; align-items: center; gap: 8px; margin-top: 7px; font-size: 12.5px; }
.app-software .sw-detail-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.app-software .sw-shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.app-software .sw-shot {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
}
.app-software .sw-shot-watermark {
  width: 96px; height: 96px;
  opacity: 0.35;
  filter: saturate(0.8);
}
.app-software .sw-shot-watermark svg { width: 100%; height: 100%; display: block; }

.app-software .sw-desc { line-height: 1.55; color: var(--fg); }
.app-software .sw-desc p + p { margin-top: 10px; }

.app-software .sw-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.app-software .sw-tile {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
}
.app-software .sw-tile-value { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-software .sw-tile-label { font-size: 11.5px; margin-top: 2px; }
