/* ==========================================================================
   Sitemap module styling
   PATH: /portal/assets/css/sitemap.css
   ========================================================================== */

/* 01) Page shell */

body.page-sitemap {
  background:
    radial-gradient(140% 200% at top left, rgba(251, 146, 60, 0.16), transparent 55%),
    radial-gradient(140% 200% at bottom right, rgba(20, 184, 166, 0.18), transparent 60%),
    #020617;
  color: #e5e7eb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page-sitemap .sitemap-shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 16px 32px 16px;
}

/* 02) Top navigation, match home style feel */

body.page-sitemap .hl-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(90deg, #020617, #020617);
  border-bottom: 1px solid rgba(15, 23, 42, 0.96);
}

body.page-sitemap .hl-nav .nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.page-sitemap .hl-nav .nav-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

body.page-sitemap .hl-nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #f9fafb;
  font-weight: 600;
  font-size: 0.95rem;
}

body.page-sitemap .hl-nav .brand img {
  display: block;
}

body.page-sitemap .hl-nav .brand span small {
  font-weight: 400;
  color: #9ca3af;
}

body.page-sitemap .hl-nav .tabs {
  display: flex;
  gap: 10px;
}

body.page-sitemap .hl-nav .tabs a {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #9ca3af;
  text-decoration: none;
  padding-bottom: 2px;
}

body.page-sitemap .hl-nav .tabs a:hover {
  color: #f9fafb;
}

body.page-sitemap .hl-nav .nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.page-sitemap .hl-nav .nav-link,
body.page-sitemap .hl-nav .nav-dd-toggle {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #e5e7eb;
  text-decoration: none;
  cursor: pointer;
}

body.page-sitemap .hl-nav .nav-link.is-active,
body.page-sitemap .hl-nav .nav-dd-toggle.is-active {
  border-color: rgba(251, 146, 60, 0.9);
  background: linear-gradient(90deg, rgba(251, 146, 60, 0.22), rgba(20, 184, 166, 0.12));
}

body.page-sitemap .hl-nav .nav-dropdown {
  position: relative;
}

body.page-sitemap .hl-nav .nav-dd-menu {
  position: absolute;
  top: 100%;
  right: 0;
}

/* keep caret visible on dark bg */
body.page-sitemap .hl-nav .caret {
  font-size: 0.7rem;
}

/* 03) Hero */

.sitemap-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.sitemap-hero-text {
  max-width: 640px;
}

.sitemap-title {
  margin: 0 0 6px 0;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(120deg, #fed7aa, #fb923c, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sitemap-subtitle {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #9ca3af;
}

.sitemap-hero-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.sitemap-pill {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  padding: 4px 10px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.9);
}

.sitemap-pill-live {
  border-color: rgba(56, 189, 248, 0.9);
  color: #f9fafb;
  background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.22), rgba(15, 23, 42, 0.9));
}

.sitemap-pill-count {
  border-color: rgba(251, 146, 60, 0.9);
}

/* 04) Table container */

.sitemap-list {
  margin: 0;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.98));
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(15, 23, 42, 0.9);
}

/* keep everything sharp, no rounded corners */
.sitemap-list,
.sitemap-header-row,
.sitemap-item {
  border-radius: 0;
}

/* 05) Empty state */

.sitemap-empty {
  padding: 24px 20px 26px 20px;
}

.sitemap-empty h2 {
  margin: 0 0 6px 0;
  font-size: 1.08rem;
  font-weight: 600;
  color: #e5e7eb;
}

.sitemap-empty p {
  margin: 0;
  font-size: 0.9rem;
  color: #9ca3af;
}

/* 06) Header row */

.sitemap-header-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 10px 18px 9px 18px;
  border-bottom: 1px solid rgba(55, 65, 81, 0.9);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: #9ca3af;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.9));
}

.sitemap-header-col-path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 07) List rows */

.sitemap-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sitemap-item {
  border-bottom: 1px solid rgba(31, 41, 55, 0.9);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96));
  transition:
    background 0.18s ease-out,
    box-shadow 0.18s ease-out,
    transform 0.14s ease-out;
}

.sitemap-item:last-child {
  border-bottom: none;
}

.sitemap-item:hover {
  background: radial-gradient(circle at top left, rgba(251, 146, 60, 0.18), rgba(15, 23, 42, 0.98));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.9);
  transform: translateY(-1px);
}

/* 08) Link */

.sitemap-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 18px 10px 18px;
  text-decoration: none;
  color: #f9fafb;
  position: relative;
}

.sitemap-link-path {
  font-size: 0.9rem;
  font-weight: 500;
}

.sitemap-link-url {
  font-size: 0.8rem;
  color: #9ca3af;
}

/* animated underline */

.sitemap-link::after {
  content: "";
  position: absolute;
  left: 18px;
  right: calc(100% - 90px);
  bottom: 6px;
  height: 1px;
  background: linear-gradient(90deg, #f97316, #fb923c, #14b8a6);
  opacity: 0;
  transform: scaleX(0.5);
  transform-origin: left;
  transition:
    opacity 0.16s ease-out,
    transform 0.16s ease-out,
    right 0.16s ease-out;
}

.sitemap-item:hover .sitemap-link::after {
  opacity: 1;
  transform: scaleX(1);
  right: 18px;
}

/* 09) Responsive */

@media (max-width: 840px) {
  .sitemap-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .sitemap-hero-meta {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }

  .sitemap-header-row {
    display: none;
  }
}

@media (max-width: 520px) {
  .page-sitemap .sitemap-shell {
    padding-inline: 12px;
  }

  .sitemap-title {
    font-size: 1.5rem;
  }

  .sitemap-link-path {
    font-size: 0.88rem;
  }

  .sitemap-link-url {
    font-size: 0.78rem;
  }

  body.page-sitemap .hl-nav .nav-inner {
    padding-inline: 12px;
  }
}
