/* ==========================================================================
   Dataset Detail Page Styles
   Individual catalog dataset page — linked from Icon Map Pro / Slicer 
   resource icons.
   ========================================================================== */

/* ---------- Page wrapper ---------- */
.dataset-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 48px;
  font-family: 'Segoe UI', wf_segoe-ui_normal, helvetica, arial, sans-serif;
  color: #323130;
}

/* ---------- Loading / Error ---------- */
.dataset-loading {
  text-align: center;
  padding: 80px 24px;
  font-size: 16px;
  color: #605e5c;
}
.dataset-loading__spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid #e1dfdd;
  border-top-color: #117865;
  border-radius: 50%;
  animation: dataset-spin 0.7s linear infinite;
  margin-bottom: 16px;
}
@keyframes dataset-spin { to { transform: rotate(360deg); } }

.dataset-error {
  text-align: center;
  padding: 80px 24px;
  font-size: 16px;
  color: #a4262c;
}
.dataset-error a {
  color: #0078d4;
  text-decoration: none;
}
.dataset-error a:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.dataset-hero {
  background: linear-gradient(135deg, #0c3b2e 0%, #117865 60%, #1a9b80 100%);
  color: #fff;
  text-align: center;
  padding: 44px 24px 36px;
  margin-bottom: 28px;
}
.dataset-hero h1 {
  font: 700 28px/1.25 'Segoe UI', wf_segoe-ui_normal, helvetica, arial, sans-serif;
  margin: 0;
  color: #fff;
}
.dataset-hero__region {
  font: 400 15px/1.5 'Segoe UI', wf_segoe-ui_normal, helvetica, arial, sans-serif;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Media section (map + optional video) ---------- */
.dataset-media {
  display: grid;
  gap: 20px;
  margin-bottom: 28px;
}
.dataset-media--map-only {
  grid-template-columns: 1fr;
}
.dataset-media--map-video {
  grid-template-columns: 1fr 1fr;
}

.dataset-map-container {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e1dfdd;
  min-height: 400px;
}
.dataset-map {
  width: 100%;
  height: 100%;
  min-height: 400px;
}

.dataset-video-container {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e1dfdd;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}
.dataset-video-container iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: none;
}

/* ---------- Badges ---------- */
.dataset-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}
.dataset-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
}

/* ---------- Resources ---------- */
.dataset-resources {
  margin-bottom: 28px;
}
.dataset-resources__title {
  font: 600 16px/1.4 'Segoe UI', wf_segoe-ui_normal, helvetica, arial, sans-serif;
  margin: 0 0 12px;
  color: #323130;
}
.dataset-resources__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dataset-resources__list li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dataset-resource {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #e1dfdd;
  border-radius: 8px;
  background: #faf9f8;
  text-decoration: none;
  color: #323130;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  font: inherit;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.dataset-resource:hover {
  background: #f3f2f1;
  border-color: #c8c6c4;
}
.dataset-resource__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.dataset-resource__icon img {
  width: 24px;
  height: 24px;
  display: block;
}
.dataset-resource__icon svg {
  width: 24px;
  height: 24px;
  display: block;
}
.dataset-resource__name {
  font-size: 14px;
  font-weight: 500;
  color: #0078d4;
}
.dataset-resource__type {
  font-size: 12px;
  color: #8a8886;
  text-transform: uppercase;
  margin-left: auto;
  font-weight: 600;
}

/* Copy URL button */
.dataset-resource__copy {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e1dfdd;
  border-radius: 6px;
  background: #fff;
  color: #605e5c;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  padding: 0;
}
.dataset-resource__copy:hover {
  background: #f3f2f1;
  border-color: #c8c6c4;
  color: #0078d4;
}
.dataset-resource__copy--ok {
  color: #107c10;
  border-color: #107c10;
}

/* Video resource item */
.dataset-resource--video .dataset-resource__name {
  color: #d13438;
}

/* ---------- Info section ---------- */
.dataset-info {
  margin-bottom: 28px;
}
.dataset-info__desc {
  font: 400 14px/1.65 'Segoe UI', wf_segoe-ui_normal, helvetica, arial, sans-serif;
  color: #323130;
  margin: 0 0 20px;
}
.dataset-info__field {
  font-size: 14px;
  color: #605e5c;
  margin: 0 0 8px;
  line-height: 1.5;
}
.dataset-info__field strong {
  color: #323130;
}
.dataset-info__field a {
  color: #0078d4;
  text-decoration: none;
}
.dataset-info__field a:hover {
  text-decoration: underline;
}

/* ---------- Tags ---------- */
.dataset-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.dataset-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  background: #f3f2f1;
  color: #605e5c;
  line-height: 20px;
}
.dataset-tags {
  margin-bottom: 28px;
}

/* ---------- CTA ---------- */
.dataset-cta {
  text-align: center;
  padding: 28px 24px;
  background: #faf9f8;
  border-radius: 8px;
  border: 1px solid #e1dfdd;
  margin-bottom: 48px;
}
.dataset-cta p {
  font: 400 14px/1.6 'Segoe UI', wf_segoe-ui_normal, helvetica, arial, sans-serif;
  margin: 0;
  color: #605e5c;
}
.dataset-cta a {
  color: #117865;
  font-weight: 600;
  text-decoration: none;
}
.dataset-cta a:hover { text-decoration: underline; }

/* ---------- Back link ---------- */
.dataset-back {
  margin-bottom: 20px;
}
.dataset-back a {
  font-size: 14px;
  color: #0078d4;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dataset-back a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .dataset-media--map-video {
    grid-template-columns: 1fr;
  }
  .dataset-map-container,
  .dataset-video-container {
    min-height: 280px;
  }
  .dataset-map {
    min-height: 280px;
  }
  .dataset-video-container iframe {
    min-height: 280px;
  }
  .dataset-hero h1 {
    font-size: 22px;
  }
}
