/* ============================================================
   Marketplace — Google Play-style layout
   ============================================================ */

/* --- Sidebar --- */
.mp-sidebar {
  width: 220px;
  height: calc(100vh - 56px);
  border-right: 1px solid var(--bs-border-color);
  background: #fff;
  position: sticky;
  top: 56px;
  overflow-y: auto;
  align-self: flex-start;
}

.mp-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 0 2rem 2rem 0;
  margin-right: 0.75rem;
  transition: background 0.15s, color 0.15s;
}

.mp-sidebar-link:hover {
  background: var(--bg-sunken);
  color: var(--text-primary);
}

.mp-sidebar-link.active {
  background: var(--brand-subtle);
  color: var(--brand-dark);
  font-weight: 600;
}

.mp-sidebar-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* --- Main area --- */
.mp-main {
  min-height: calc(100vh - 56px);
  min-width: 0;
  padding-top: 0.5rem;
  padding-bottom: 2rem;
  background: #fff;
}

/* --- Top bar extras --- */
.mp-badge {
  font-size: 0.7rem;
}

.mp-search-form {
  width: 100%;
  max-width: 480px;
}

.mp-search-form .input-group {
  border-radius: 2rem;
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  background: var(--bg);
}

.mp-search-form .input-group-text {
  border: none;
  padding-left: 1rem;
  background: transparent;
}

.mp-search-form .form-control {
  border: none;
  box-shadow: none;
  font-size: 0.875rem;
  background: transparent;
}

.mp-search-form .form-control:focus {
  box-shadow: none;
}

.mp-search-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

/* --- Avatar (Jira-style initials) --- */
.mp-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  border: 2px solid var(--brand-light);
  cursor: pointer;
  flex-shrink: 0;
}

/* --- Category pill tabs --- */
.mp-category-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem 0.75rem 1.5rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--bs-border-color);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.mp-category-bar::-webkit-scrollbar {
  display: none;
}

.mp-category-pill {
  display: inline-block;
  padding: 0.4rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 2rem;
  border: 1px solid var(--bs-border-color);
  background: #fff;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
}

.mp-category-pill:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.mp-category-pill.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* --- Horizontal scroll row --- */
.mp-scroll-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.mp-scroll-row::-webkit-scrollbar {
  display: none;
}

.mp-scroll-item {
  flex: 0 0 130px;
}

.mp-scroll-item-featured {
  flex: 0 0 300px;
}

/* --- App icon (large rounded square, Play Store style) --- */
.mp-app-icon-lg {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  display: block;
  margin: 0 auto 0.5rem;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.mp-app-icon-xl {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* --- App card (compact, Google Play-style) --- */
.mp-app-card {
  text-align: center;
  padding: 0.5rem;
  border-radius: 0.75rem;
  transition: background 0.15s;
  cursor: pointer;
}

.mp-app-card:hover {
  background: var(--bg);
}

.mp-app-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-app-name-lg {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.1rem;
}

.mp-app-publisher {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.mp-app-tagline {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Stars (text-based, no lucide) --- */
.mp-app-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: 0.7rem;
  line-height: 1;
}

.mp-star {
  font-style: normal;
}

.mp-star-full {
  color: #E8B931;
}

.mp-star-half {
  color: #E8B931;
  opacity: 0.5;
}

.mp-star-empty {
  color: #D1D5DB;
}

/* --- Featured card --- */
.mp-featured-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  height: 100%;
  transition: box-shadow 0.2s;
}

.mp-featured-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.mp-featured-right {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* --- Pricing badge --- */
.mp-pricing-badge {
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 2rem;
  background: var(--brand-subtle);
  color: var(--brand-dark);
}

/* --- Section headers --- */
.mp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.mp-section-header h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

/* --- Footer --- */
.mp-footer {
  margin-left: 0;
  background: var(--bg);
}

/* --- Responsive --- */
@media (min-width: 992px) {
  .mp-footer {
    margin-left: 220px;
  }

  .mp-main {
    padding-top: 0;
  }
}

/* --- Detail page --- */
.detail-icon {
  width: 72px;
  height: 72px;
  border-radius: 1rem;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.detail-meta dt { font-weight: 600; font-size: 0.8rem; color: var(--text-primary); }
.detail-meta dd { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 1rem; }

/* --- Install badges on app cards --- */
.mp-app-card-top {
  position: relative;
  display: flex;
  justify-content: center;
}

.mp-installed-badge,
.mp-requested-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mp-installed-badge {
  background: #d1fae5;
  color: #065f46;
}

.mp-requested-badge {
  background: #fef3c7;
  color: #92400e;
}

[data-theme="dark"] .mp-installed-badge {
  background: #064e3b;
  color: #6ee7b7;
}

[data-theme="dark"] .mp-requested-badge {
  background: #78350f;
  color: #fcd34d;
}

