/* Software catalog & per-app sub-site styles (Windows XP theme) */

/* --- Hub: app card grid --- */
.software-intro {
  margin-bottom: 16px;
}

.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.software-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(to bottom, #ffffff 0%, #f5f4ea 100%);
  border: 2px outset #ece9d8;
  box-shadow: 1px 1px 0 #fff inset, -1px -1px 0 #c0c0c0 inset;
  padding: 12px;
  min-height: 180px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.software-card:hover {
  border-color: #316ac5;
  box-shadow: 0 0 0 1px #316ac5, 1px 1px 0 #fff inset;
}

.software-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #c0c0c0;
}

.software-card-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: linear-gradient(to bottom, #ffffff 0%, #ece9d8 100%);
  border: 2px inset #ece9d8;
  line-height: 1;
}

.software-card-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border: none;
  margin: 0;
}

.software-card-title {
  font-size: 13px;
  font-weight: bold;
  margin: 0;
  color: #000;
}

.software-card-title a {
  color: #0000ee;
  text-decoration: none;
}

.software-card-title a:hover {
  color: #ee0000;
  text-decoration: underline;
}

.software-card-meta {
  font-size: 10px;
  color: #555;
  margin: 2px 0 0 0;
}

.software-card-body {
  flex: 1;
  font-size: 11px;
  margin: 8px 0;
  color: #222;
}

.software-card-body p {
  margin: 0 0 6px 0;
}

.software-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #d4d0c8;
}

.software-badge {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  background: linear-gradient(to bottom, #ffffff 0%, #ece9d8 100%);
  border: 1px solid #c0c0c0;
  color: #333;
  margin-right: 4px;
}

.software-badge.status-stable {
  background: linear-gradient(to bottom, #e8f5e9 0%, #c8e6c9 100%);
  border-color: #81c784;
}

.software-badge.status-beta {
  background: linear-gradient(to bottom, #fff8e1 0%, #ffecb3 100%);
  border-color: #ffd54f;
}

.software-badge.status-wip {
  background: linear-gradient(to bottom, #e3f2fd 0%, #bbdefb 100%);
  border-color: #64b5f6;
}

.software-badge.status-planned {
  background: linear-gradient(to bottom, #f5f5f5 0%, #e0e0e0 100%);
  border-color: #bdbdbd;
  color: #666;
}

/* --- App sub-site layout helpers --- */
.app-hero {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 12px 0 18px 0;
  padding: 12px;
  background: linear-gradient(to bottom, #ffffff 0%, #f0efe6 100%);
  border: 2px inset #ece9d8;
}

.app-hero-icon {
  width: 64px;
  height: 64px;
  min-width: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: linear-gradient(to bottom, #ffffff 0%, #ece9d8 100%);
  border: 2px outset #ece9d8;
}

.app-hero-icon img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border: none;
  margin: 0;
}

.app-hero-text h1 {
  margin: 0 0 4px 0;
}

.app-hero-text p {
  margin: 4px 0;
}

.app-section {
  margin: 18px 0;
  padding: 10px 12px;
  background: #fafaf5;
  border: 1px solid #c0c0c0;
}

.app-section h2,
.app-section h3 {
  margin-top: 0;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.app-actions .xp-button {
  text-decoration: none;
  color: #000;
  display: inline-block;
}

.app-meta-table {
  width: 100%;
  max-width: 520px;
  margin: 10px 0;
}

.app-meta-table th {
  width: 140px;
  text-align: left;
}

/* Nested tree items for app list in hub sidebar */
.tree-view .tree-nested {
  margin-left: 12px;
  list-style: none;
  padding-left: 0;
}

.tree-view .tree-nested li {
  margin: 2px 0;
}

/* Breadcrumb strip under window title */
.app-breadcrumb {
  font-size: 11px;
  padding: 4px 8px;
  background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 100%);
  border-bottom: 1px solid #c0c0c0;
  color: #333;
}

.app-breadcrumb a {
  color: #0000ee;
}

.app-breadcrumb a:hover {
  color: #ee0000;
}

.app-breadcrumb .sep {
  margin: 0 6px;
  color: #666;
}

/* Empty / planned slot on hub */
.software-card.is-placeholder {
  opacity: 0.85;
  border-style: dashed;
}

.software-card.is-placeholder:hover {
  border-style: dashed;
}

/* Responsive */
@media (max-width: 768px) {
  .software-grid {
    grid-template-columns: 1fr;
  }

  .app-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .app-meta-table th {
    width: auto;
  }
}
