/**
 * Helm Charts Page
 * 
 * Styles for the Helm charts listing and detail pages.
 * Includes chart cards, version badges, search/filter UI,
 * and responsive grid layout for chart browsing.
 * 
 * Used by: /helm-charts/ section
 * Dependencies: variables.css (CSS custom properties)
 */

.helm-charts-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.helm-charts-page h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.helm-intro {
  background: rgba(0, 102, 204, 0.08);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border-left: 4px solid var(--MAIN-LINK-color);
}

.helm-link {
  line-height: normal !important;
}

.helm-intro a:hover {
  color: var(--MAIN-LINK-HOVER-color);
}

/* GitOps Catalog Callout */
.helm-catalog-callout {
  display: flex;
  gap: 1.25rem;
  background: linear-gradient(135deg, rgba(111, 66, 193, 0.12) 0%, rgba(32, 201, 151, 0.08) 100%);
  border: 1px solid rgba(111, 66, 193, 0.25);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  align-items: flex-start;
}

.helm-catalog-callout-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #6f42c1 0%, #20c997 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  box-shadow: 0 4px 12px rgba(111, 66, 193, 0.3);
}

.helm-catalog-callout-content h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.15rem;
  color: var(--MAIN-TITLES-TEXT-color, #fff);
}

.helm-catalog-callout-content p {
  margin: 0 0 1rem 0;
  color: var(--MAIN-TEXT-color, #dedede);
  line-height: 1.6;
}

.helm-catalog-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%);
  color: #fff !important;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(111, 66, 193, 0.3);
}

.helm-catalog-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(111, 66, 193, 0.4);
  color: #fff !important;
}

.helm-catalog-link i {
  transition: transform 0.2s ease;
}

.helm-catalog-link:hover i {
  transform: translateX(4px);
}

@media (max-width: 600px) {
  .helm-catalog-callout {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  
  .helm-catalog-callout-icon {
    margin-bottom: 0.5rem;
  }
}

.helm-search-container {
  margin-bottom: 1.5rem;
}

.helm-search-input {
  width: 100%;
  max-width: 500px;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: var(--MAIN-BG-color, #fff);
  color: #757575;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.helm-search-input:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.helm-chart-stats {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.helm-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@media (max-width: 500px) {
  .helm-charts-grid {
    grid-template-columns: 1fr;
  }
}

.helm-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
}

.helm-chart-card {
  background: var(--MENU-SECTIONS-BG-color, #fff);
  border: 1px solid #676869;
  border-radius: 5px;
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
  transition: var(--transition-default) box-shadow, var(--transition-default) transform;
  display: flex;
  flex-direction: column;
}

.helm-chart-card:hover {
  transform: scale(0.98);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.helm-chart-card.deprecated {
  opacity: 0.7;
  border-color: #ff6b6b;
}

.helm-chart-top {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.helm-chart-icon {
  width: 60px;
  height: 60px;
  min-width: 45px;
  min-height: 45px;
  border-radius: 8px;
  background-color: transparent !important;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.helm-chart-info {
  flex: 1;
  min-width: 0;
}

.helm-chart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.helm-chart-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.helm-chart-title a {
  color: var(--MAIN-LINK-color) !important;
  transition: color 0.2s ease;
}

.helm-chart-title a:hover {
  color: var(--MAIN-LINK-HOVER-color) !important;
}

.helm-chart-title a .external-link-icon {
  color: inherit !important;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.helm-chart-title a:hover .external-link-icon {
  color: inherit !important;
  opacity: 1;
}

.helm-chart-maintainer {
  font-size: 0.85rem;
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.helm-chart-maintainer svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}


.helm-chart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 6px 12px;
  font-size: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: var(--MAIN-BG-color, #fff);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
  color: inherit;
}

.helm-chart-btn:hover {
  background: var(--MENU-TAG-BG-color);
  border-color: var(--MENU-TAG-BG-color);
}

.helm-chart-btn svg {
  width: 16px;
  height: 16px;
}

.helm-chart-description {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
  opacity: 0.85;
}

.helm-chart-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  margin-bottom: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  opacity: 0.7;
}

.helm-chart-meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.helm-chart-meta-link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #4dabf7;
  text-decoration: none;
  transition: color 0.2s;
}

.helm-chart-meta-link:hover {
  color: #74c0fc;
  text-decoration: underline;
}

.helm-chart-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.helm-chart-tag {
  background: var(--MENU-TAG-BG-color);
  color: var(--WHITE);
  padding: 0 8px 0 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  font-size: 0.8em;
  font-weight: 500;
  line-height: 2em;
}

.helm-deprecated-badge {
  background: #ff6b6b;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.helm-charts-page h2 {
  margin-top: 2rem;
}

.helm-charts-page pre {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
}

.helm-charts-page code {
  font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
}

.helm-error {
  grid-column: 1 / -1;
  background: #fff5f5;
  border: 1px solid #ff6b6b;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  color: #c53030;
}

/* Deprecated Section Styles */
.deprecated-section {
  margin-top: 3rem;
  margin-bottom: 2rem;
}

.deprecated-details {
  border: 1px solid rgba(255, 152, 0, 0.3);
  border-radius: 8px;
  background: rgba(255, 152, 0, 0.05);
}

.deprecated-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  text-decoration: none;
}

.deprecated-summary::-webkit-details-marker {
  display: none;
}

.deprecated-summary:hover {
  background: rgba(255, 152, 0, 0.1);
}

.deprecated-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ff9800;
}

.deprecated-icon {
  width: 20px;
  height: 20px;
}

.deprecated-hint {
  font-size: 0.85rem;
  color: #888;
  font-weight: normal;
}

.deprecated-hint.collapse-hint {
  display: none;
}

.deprecated-details[open] .expand-hint {
  display: none;
}

.deprecated-details[open] .collapse-hint {
  display: inline;
}

.deprecated-details[open] .deprecated-summary {
  border-bottom: 1px solid rgba(255, 152, 0, 0.2);
}

.deprecated-grid {
  padding: 1.5rem;
}

.deprecated-grid .helm-chart-card {
  opacity: 0.85;
  border-color: rgba(255, 152, 0, 0.3);
}

.deprecated-grid .helm-chart-card:hover {
  opacity: 1;
}

/* License Footer Styles */
.helm-license-footer {
  margin-top: 3rem;
  padding: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  opacity: 0.7;
}

.helm-license-section {
  margin-bottom: 1.5rem;
}

.helm-copyright {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.helm-license-text {
  margin-bottom: 0.5rem;
}

.helm-license-text a {
  color: var(--MAIN-LINK-color, #4dabf7);
}

.helm-license-text a:hover {
  text-decoration: underline;
}

.helm-license-disclaimer {
  font-size: 0.8rem;
  opacity: 0.8;
  font-style: italic;
}

.helm-icons-section h4 {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.helm-icons-section a {
  color: var(--MAIN-LINK-color, #4dabf7);
}

.helm-icons-section a:hover {
  text-decoration: underline;
}

