/* Catalog shell — Strata / themes.css tokens.
 * Inter/Space Grotesk/Material Symbols load from Google Fonts in index.html (optional).
 * Offline: system-ui applies; Material icons may show as text until the icon font loads or if blocked. */

* {
  box-sizing: border-box;
}

/* Match map page root scale (app.css uses 14px) + shell-header.css for bar */
html,
body.dc-body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  background: var(--dc-bg);
  color: var(--dc-text);
}

body.dc-body--catalog {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.dc-header__right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.dc-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--dc-muted);
  cursor: pointer;
}

.dc-icon-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.dc-icon-btn .material-symbols-outlined {
  font-size: 22px;
}

/* Match V11 shell + standard initials fallback avatar (see app.css). */
.dc-avatar {
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  margin: 0 0 0 4px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(59, 191, 250, 0.24);
  background: rgba(59, 191, 250, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font: inherit;
  color: #dfe9ff;
  line-height: 0;
}

.dc-avatar__icon {
  font-size: 19px;
  font-variation-settings: "FILL" 0, "wght" 350, "GRAD" 0, "opsz" 24;
}

.dc-avatar__initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
}

.dc-avatar__initials {
  display: none;
}

.dc-avatar.is-authenticated .dc-avatar__icon {
  display: none;
}

.dc-avatar.is-authenticated .dc-avatar__initials {
  display: inline-flex;
}

.dc-avatar:focus-visible {
  outline: 2px solid rgba(59, 191, 250, 0.65);
  outline-offset: 2px;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  line-height: 1;
}

.dc-main {
  flex: 1;
  width: 100%;
  padding: 96px 24px 48px;
  max-width: 80rem;
  margin: 0 auto;
}

.dc-hero {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: stretch;
}

@media (min-width: 900px) {
  .dc-hero {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
  }
}

.dc-hero__text {
  flex: 1;
  min-width: 0;
}

.dc-hero__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

@media (min-width: 900px) {
  .dc-hero__toolbar {
    justify-content: flex-end;
    max-width: min(100%, 440px);
  }
}

@media (min-width: 900px) {
  html[data-theme="light"] .dc-hero__toolbar {
    flex-direction: column;
    align-items: flex-end;
    align-self: flex-start;
  }
}

.dc-catalog-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: min(100%, 220px);
  max-width: 320px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--dc-border);
  border-radius: 10px;
}

.dc-catalog-search:focus-within {
  border-color: rgba(59, 191, 250, 0.45);
  box-shadow: 0 0 0 1px rgba(59, 191, 250, 0.15);
}

.dc-catalog-search__icon {
  font-size: 20px;
  color: var(--dc-muted);
  flex-shrink: 0;
}

.dc-catalog-search__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--dc-text);
  font-size: 0.875rem;
  outline: none;
}

.dc-catalog-search__input::placeholder {
  color: var(--dc-muted);
}

.dc-sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--dc-accent);
  background: rgba(59, 191, 250, 0.1);
  border: 1px solid rgba(59, 191, 250, 0.24);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dc-sort-btn:hover {
  background: rgba(59, 191, 250, 0.16);
  border-color: rgba(59, 191, 250, 0.5);
}

.dc-sort-btn__icon {
  font-size: 18px !important;
}

.dc-hero h1 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.dc-hero p {
  margin: 0;
  color: var(--dc-muted);
  max-width: 42rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.dc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 40px;
}

.dc-grid-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--dc-muted);
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .dc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .dc-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.dc-card {
  background: var(--dc-panel);
  backdrop-filter: blur(16px);
  border: 1px solid var(--dc-border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.dc-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 191, 250, 0.35);
}

.dc-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.35);
}

.dc-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dc-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dc-accent);
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(59, 191, 250, 0.24);
}

.dc-card-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dc-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dc-card__head .dc-card-title {
  flex: 1;
  min-width: 0;
}

.dc-card__menu {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--dc-muted);
  cursor: pointer;
}

.dc-card__menu:hover {
  color: var(--dc-text);
  background: rgba(255, 255, 255, 0.06);
}

.dc-card__loc {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.8rem;
  color: var(--dc-muted);
  line-height: 1.4;
}

.dc-card__pin {
  font-size: 16px !important;
  color: var(--dc-accent);
  flex-shrink: 0;
}

.dc-card-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
}

.dc-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 0.75rem;
}

.dc-meta span {
  color: var(--dc-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 4px;
}

.dc-meta strong {
  color: var(--dc-text);
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}

.dc-btn {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  background: linear-gradient(180deg, var(--dc-primary) 0%, var(--dc-primary-mid) 100%);
  color: var(--dc-on-primary);
  text-decoration: none;
}

.dc-btn:hover {
  opacity: 0.92;
}

.dc-btn__arrow,
.dc-btn__icon {
  font-size: 18px !important;
  vertical-align: middle;
  margin-left: 2px;
}

.dc-footer {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px 24px;
  align-items: start;
  padding: 20px 24px 22px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--dc-muted);
  background: rgba(6, 14, 32, 0.94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--dc-border);
}

@media (min-width: 768px) {
  .dc-footer {
    grid-template-columns: minmax(12rem, 1fr) auto minmax(10rem, 1fr);
    align-items: center;
  }
}

.dc-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dc-footer__name {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e2e8f0;
}

.dc-footer__name-link {
  color: inherit;
  text-decoration: none;
}

.dc-footer__name-link:hover {
  color: var(--dc-accent);
  text-decoration: underline;
}

.dc-footer__version {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.dc-footer__cols {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
}

.dc-footer__col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 8rem;
}

.dc-footer__label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.dc-footer__link {
  color: var(--dc-accent);
  text-decoration: none;
  font-weight: 500;
}

.dc-footer__link:hover {
  text-decoration: underline;
}

.dc-footer__muted {
  color: #94a3b8;
  cursor: default;
}

.dc-footer__legal {
  margin: 0;
  font-size: 10px;
  color: #94a3b8;
  max-width: 28rem;
}

@media (min-width: 768px) {
  .dc-footer__legal {
    justify-self: end;
    text-align: right;
  }
}

#dc-file-wall {
  display: none;
  padding: 48px 24px;
  max-width: 40rem;
  margin: 0 auto;
}

#dc-file-wall.visible {
  display: block;
}

#dc-catalog-error {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 113, 108, 0.12);
  color: #ffa8a3;
  font-size: 0.875rem;
}

/* Strata Light — catalog (mock: white chrome, black wordmark, cyan pills, light footer) */
html[data-theme="light"] body.dc-body--catalog {
  border-top: 3px solid #6366f1;
}

html[data-theme="light"] .dc-catalog-search {
  background: var(--dc-map-search-idle-bg);
  border-color: var(--dc-map-search-idle-border);
}

html[data-theme="light"] .dc-card {
  box-shadow: var(--dc-shadow-float);
}

html[data-theme="light"] .dc-card__badge {
  color: #ffffff;
  background: linear-gradient(180deg, var(--dc-primary) 0%, var(--dc-primary-mid) 100%);
  border: none;
  border-radius: 999px;
  padding: 5px 12px;
}

html[data-theme="light"] .dc-card:hover {
  border-color: rgba(56, 189, 248, 0.45);
}

html[data-theme="light"] .dc-btn {
  color: var(--dc-on-primary);
  letter-spacing: 0.06em;
  font-size: 0.8rem;
}

html[data-theme="light"] .dc-body--catalog .dc-avatar {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.12);
  color: var(--dc-text);
}

html[data-theme="light"] .dc-footer {
  background: #e8ecf1;
  color: #475569;
  border-top-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .dc-footer__name {
  color: #0f172a;
}

html[data-theme="light"] .dc-footer__name-link:hover {
  color: var(--dc-accent);
}

html[data-theme="light"] .dc-footer__version {
  color: #64748b;
}

html[data-theme="light"] .dc-footer__label {
  color: #64748b;
}

html[data-theme="light"] .dc-footer__legal {
  color: #64748b;
}

html[data-theme="light"] .dc-footer__muted {
  color: #94a3b8;
}

html[data-theme="light"] #dc-catalog-error {
  background: rgba(234, 88, 12, 0.12);
  color: #9a3412;
}
