/* CSS für Datensatz-Detailseiten - inherits from datasets.css styles */

/* Import the datasets page styles */
@import 'datasets.css';

/* Additional dataset-detail specific styles */

/* Simple description section */
.description-section {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.description-section h2 {
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.description-text {
  line-height: 1.7;
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Links in description */
.description-text a {
  color: #089289;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s ease;
}

.description-text a:hover {
  color: #067569;
  text-decoration: underline;
}

.description-text a:visited {
  color: #6b46c1;
}

/* Other HTML elements in description */
.description-text p {
  margin-bottom: 1rem;
}

.description-text p:last-child {
  margin-bottom: 0;
}

.description-text ul, 
.description-text ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.description-text li {
  margin-bottom: 0.5rem;
}

.description-text strong, 
.description-text b {
  font-weight: 600;
  color: var(--text-primary);
}

.description-text em, 
.description-text i {
  font-style: italic;
}

/* Compact metadata section */
.metadata-section {
  max-width: 1200px;
  margin: 1rem auto 2rem;
  padding: 0 2rem;
}

.metadata-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 1rem;
}

.metadata-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.metadata-label {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  font-size: 0.9rem;
}

.metadata-value {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Tags styling */
.tag-list-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-compact {
  display: inline-block;
  background: #f3f4f6;
  color: #6b7280 !important;
  border: 1px solid #d1d5db;
  padding: 0.3rem 0.7rem;
  border-radius: 12px;
  text-decoration: none !important;
  font-size: 0.75rem;
  font-weight: 400;
  transition: all 0.2s ease;
}

.tag-compact:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
  text-decoration: none !important;
  color: #4b5563 !important;
  transform: none;
}

/* Organization description with expand/collapse */
.org-row {
  flex-direction: column;
  gap: 0.5rem;
}

.org-description-item {
  flex-direction: column;
  align-items: flex-start;
}

.org-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.org-description-expandable {
  width: 100%;
}

.org-description-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.3s ease;
}

.org-description-text.expanded {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

/* Links in organization description */
.org-description-text a {
  color: #089289;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s ease;
}

.org-description-text a:hover {
  color: #067569;
}

.org-description-text a:visited {
  color: #6b46c1;
}

/* License badges */
.license-badge {
  display: inline-flex;
  align-items: center;
  background: #f3f4f6;
  color: #6b7280 !important;
  border: 1px solid #d1d5db;
  padding: 0.3rem 0.7rem;
  border-radius: 12px;
  text-decoration: none !important;
  font-size: 0.75rem;
  font-weight: 400;
  transition: all 0.2s ease;
}

.license-badge:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
  transform: none;
  text-decoration: none !important;
  color: #4b5563 !important;
}

.license-badge-static {
  display: inline-block;
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
  padding: 0.3rem 0.7rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 400;
}

/* Citation in metadata section */
.citation-row {
  flex-direction: column;
  gap: 0.5rem;
}

.citation-item {
  flex-direction: column;
  align-items: flex-start;
}

.citation-content {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.citation-text {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
  font-weight: 400;
  flex: 1;
}

.copy-citation-btn {
  background: #089289;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.copy-citation-btn:hover {
  background: #067569;
  transform: translateY(-1px);
}

/* Responsive adjustments for citation */
@media (max-width: 768px) {
  .citation-content {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .copy-citation-btn {
    align-self: flex-start;
  }
}

.expand-toggle {
  color: #089289;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 500;
  margin-top: 0.25rem;
  text-decoration: underline;
  display: none;
}

.expand-toggle:hover {
  color: #067569;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .metadata-row {
    flex-direction: column;
    gap: 1rem;
  }
  
  .metadata-item {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .metadata-label {
    white-space: normal;
  }
}

/* Content sections */
.dataset-meta {
  margin-bottom: 2rem;
}

/* Section headers */
.dataset-meta h2,
.dataset-resources h2,
.dataset-extras h2 {
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
}

/* Section spacing */
.dataset-description,
.dataset-tags,
.dataset-organization,
.dataset-license,
.dataset-resources,
.dataset-extras {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
}

.dataset-description {
  line-height: 1.6;
}

.dataset-resources {
  margin: 2rem 0;
}

.resource-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  justify-content: flex-start;
}

.resource-card {
  display: inline-block;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  margin: 0.5rem;
  padding: 0.5rem;
}

.resource-card:hover {
  text-decoration: none;
  color: inherit;
}

.file-icon-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 120px;
  min-height: 120px;
}

.file-icon {
  display: block;
  transition: transform 0.2s ease;
  margin-bottom: 0.5rem;
}

.file-icon svg {
  display: block;
}

/* Resource card title (in file icon layout) */
.file-icon-container .resource-title {
  font-size: 0.75rem;
  font-weight: 400;
  color: #374151;
  line-height: 1.3;
  word-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
}

/* Resource page title */
.resource-header .resource-title {
  margin: 0 0 0.5rem 0;
  color: #333;
  font-weight: 600;
  line-height: 1.2;
}



.resource-card:hover .file-icon {
  transform: translateY(-2px);
}

.resource-card:hover .file-icon svg {
  filter: drop-shadow(0 4px 8px rgba(8, 146, 137, 0.2));
}

.resource-card:hover .file-icon-container .resource-title {
  color: #089289 !important;
}

/* Force hover colors with high specificity */
.resource-card:hover .file-icon svg path.file-body {
  stroke: #089289 !important;
}

.resource-card:hover .file-icon svg path.file-corner {
  fill: #089289 !important;
  stroke: #089289 !important;
}

.resource-card:hover .file-icon svg text.file-text {
  fill: #089289 !important;
}

.resource-card:hover .file-icon svg g.download-icon path {
  stroke: #089289 !important;
}

.resource-card:hover .file-icon svg g.download-icon rect {
  fill: #089289 !important;
}



/* Responsive adjustments for resource grid */
@media (max-width: 768px) {
  .resource-card {
    margin: 0.3rem;
    padding: 0.3rem;
  }
  
  .file-icon-container {
    width: 100px;
  }
  
  .file-icon svg {
    width: 50px;
    height: 62px;
  }
}

.dataset-extras {
  margin: 2rem 0;
}

.extras-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1rem;
}

.extras-list dt {
  font-weight: bold;
  color: #555;
}

.dataset-original-link {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  text-align: center;
}

.dataset-original-link a {
  color: #07A299;
  text-decoration: none;
}

.dataset-original-link a:hover {
  text-decoration: underline;
}

.back-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background-color: #07A299;
  color: white !important;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.2s;
  font-weight: bold;
}

.back-link:hover {
  background-color: #058a82;
  text-decoration: none;
  color: white !important;
}



.api-note {
  margin: 1.5rem 0;
  padding: 0.8rem;
  background-color: #f8f9fa;
  border-left: 4px solid #07A299;
}

.api-note.error {
  background-color: #fff0f0;
  border-left: 4px solid #f44336;
}

/* Ressourcen-Detail Styling */
.resource-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.resource-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f0f0f0;
}

.resource-title-section {
  flex: 1;
}

.resource-subtitle {
  margin: 0;
  color: #666;
  font-size: 1.1rem;
  line-height: 1.4;
}

.resource-actions {
  flex-shrink: 0;
}

.btn-download {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #07A299, #059a91);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(7, 162, 153, 0.2);
}

.btn-download:hover {
  background: linear-gradient(135deg, #059a91, #047a74);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(7, 162, 153, 0.3);
  color: white;
  text-decoration: none;
}

.download-icon {
  font-size: 1.2rem;
}

.download-format {
  opacity: 0.8;
  font-weight: normal;
  font-size: 0.9rem;
}

.resource-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.resource-info h2,
.dataset-info h2 {
  margin: 0 0 1rem 0;
  color: #333;
  font-size: 1.3rem;
  font-weight: 600;
}

.info-grid {
  display: grid;
  gap: 0.75rem;
}

.info-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid #07A299;
}

.info-label {
  font-weight: 600;
  color: #555;
  min-width: 100px;
  margin-right: 1rem;
}

.info-value {
  color: #333;
  flex: 1;
}

.dataset-link-card {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.dataset-link-card:hover {
  border-color: #07A299;
  box-shadow: 0 2px 8px rgba(7, 162, 153, 0.1);
}

.dataset-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  text-decoration: none;
  color: #333;
}

.dataset-link:hover {
  text-decoration: none;
  color: #07A299;
}

.dataset-title {
  font-weight: 600;
  color: inherit;
}

.dataset-arrow {
  font-size: 1.2rem;
  color: #07A299;
  transition: transform 0.2s ease;
}

.dataset-link:hover .dataset-arrow {
  transform: translateX(4px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .resource-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .resource-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .btn-download {
    justify-content: center;
  }
}
