/* --- 1. Globale Variablen & Basis-Styles --- */
:root {
  --nlc-primary-color: #c4153a;      /* Hauptfarbe Rot */
  --nlc-primary-hover: #a1112f;      /* Dunklere Version für Hover-Effekte */
  --nlc-text-color: #333;
  --nlc-border-color: #e0e0e0;
  --nlc-background-light: #f9f9f9;
  --nlc-white: #ffffff;
  --nlc-spacing-unit: 8px;
  --nlc-border-radius: 4px;
}

.nlc-va-root {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--nlc-text-color);
  text-align: left;
}


/* --- 2. Kartenansicht (Card) --- */
.nlc-va-card {
  background: var(--nlc-white);
  border: 1px solid var(--nlc-border-color);
  border-radius: var(--nlc-border-radius);
  margin-bottom: calc(var(--nlc-spacing-unit) * 2);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.nlc-va-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nlc-va-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(var(--nlc-spacing-unit) * 1.5) calc(var(--nlc-spacing-unit) * 2);
  background: var(--nlc-background-light);
  border-bottom: 1px solid var(--nlc-border-color);
}
.nlc-va-card .card-body {
  /* Diese Zeile fügt den wichtigen Innenabstand hinzu */
  padding: calc(var(--nlc-spacing-unit) * 2); /* Das sind 16px oben/unten/links/rechts */
}

/* Diese Regeln sind gut, um überflüssige Abstände von <p>-Tags zu entfernen */
.nlc-va-card .card-body p:first-child {
  margin-top: 0;
}
.nlc-va-card .card-body p:last-child {
  margin-bottom: 0;
}

.nlc-va-card-title {
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--nlc-primary-color);
  margin-right: var(--nlc-spacing-unit);
}

.nlc-va-card-body {
  padding: calc(var(--nlc-spacing-unit) * 2);
}

.nlc-va-card-body p:first-child {
  margin-top: 0;
}
.nlc-va-card-body p:last-child {
  margin-bottom: 0;
}


/* --- 3. Tabellenansicht (Table) --- */
.nlc-va-table-wrapper {
  overflow-x: auto; /* Macht die Tabelle auf kleinen Bildschirmen scrollbar */
  border: 1px solid var(--nlc-border-color);
  border-radius: var(--nlc-border-radius);
  background: var(--nlc-white);
}
/* Der Wrapper selbst behält seine Stile für das Scrolling. */
.nlc-va-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--nlc-border-color);
  border-radius: var(--nlc-border-radius);
  background: var(--nlc-white);
}

/* WICHTIG: Die Regel gilt jetzt nur für eine Tabelle INNERHALB unseres Wrappers. */
.nlc-va-table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  table-layout: fixed;
}

/* WICHTIG: Gilt nur für th und td INNERHALB unserer Plugin-Tabelle. */
.nlc-va-table-wrapper table th,
.nlc-va-table-wrapper table td {
  padding: calc(var(--nlc-spacing-unit) * 1.5);
  text-align: left;
  border-bottom: 1px solid var(--nlc-border-color);
  vertical-align: top;
}

/* WICHTIG: Die Spaltenbreiten werden nur für unsere Tabelle gesetzt. */
.nlc-va-table-wrapper table thead th:nth-child(1) { /* 1. Spalte: Titel */
  width: 25%;
}
.nlc-va-table-wrapper table thead th:nth-child(2) { /* 2. Spalte: Beschreibung */
  width: 60%;
}
.nlc-va-table-wrapper table thead th:nth-child(3) { /* 3. Spalte: Aktion */
  width: 15%;
}

/* Die restlichen Stile, ebenfalls sicher gemacht: */
.nlc-va-table-wrapper table tr:last-child td {
  border-bottom: 0;
}

.nlc-va-table-wrapper table thead {
  background-color: var(--nlc-background-light);
}

.nlc-va-table-wrapper table thead th {
  font-weight: bold;
  color: var(--nlc-text-color);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nlc-va-table-wrapper table tbody tr:nth-of-type(odd) {
  background-color: var(--nlc-background-light);
}

.nlc-va-table-wrapper table tbody td:last-child {
  text-align: right;
  white-space: nowrap;
}

.nlc-va-table-wrapper table tbody td
{
  overflow: hidden;
}


/* --- 5. Hilfsklasse für Textkürzung --- */
/* Diese Klasse ist bereits durch den `nlc-va-` Präfix recht einzigartig, aber
   wir können sie für die Tabelle noch spezifischer machen, um sicherzugehen. */
.nlc-va-table-description {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4; /* Beschränkt den Text auf 4 Zeilen */
}

.nlc-va-table-description > *:last-child {
  margin-bottom: 0;
}

/* --- 4. Button & Links --- */
a {
  color: var(--nlc-primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--nlc-primary-hover);
  text-decoration: underline;
}

.nlc-va-btn {
  display: inline-block;
  font-weight: 600;
  vertical-align: middle;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  border: 1px solid transparent;
  padding: calc(var(--nlc-spacing-unit) * 0.75) calc(var(--nlc-spacing-unit) * 1.5);
  font-size: 0.9rem;
  line-height: 1.5;
  border-radius: var(--nlc-border-radius);
  text-decoration: none !important; /* Verhindert unterstrichene Buttons */
  transition: all 0.2s ease-in-out;
  min-width: 90px;      /* Setzt eine Mindestbreite. Passe den Wert bei Bedarf an. */
  text-align: center;   /* Zentriert den Text, falls er kürzer als die Mindestbreite ist. */
}

.nlc-va-btn:hover {
  text-decoration: none !important;
}

.nlc-va-btn-primary {
  color: var(--nlc-white) !important; /* !important, um a-Tags sicher zu überschreiben */
  background-color: var(--nlc-primary-color);
  border-color: var(--nlc-primary-color);
}

.nlc-va-btn-primary:hover {
  color: var(--nlc-white) !important;
  background-color: var(--nlc-primary-hover);
  border-color: var(--nlc-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


/* --- 5. Hilfsklasse für Textkürzung --- */
.nlc-va-description-clamped {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  /* Die Eigenschaft '-webkit-line-clamp' wird dynamisch
     über den Inline-Style in der React-Komponente gesetzt. */
}

/* Verhindert unschöne Abstände am Ende des gekürzten Textes */
.nlc-va-description-clamped > *:last-child {
  margin-bottom: 0;
}

.nlc-va-card-title-collapsible {
  cursor: pointer;
  position: relative;
  padding-right: 25px; /* Make space for the indicator arrow */
}

/* Add a simple arrow indicator */
.nlc-va-card-title-collapsible::after {
  content: '▼'; /* Down arrow for collapsed state */
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8em;
  color: #555;
  transition: transform 0.2s ease-in-out;
}

/* Rotate the arrow when the item is expanded */
.nlc-va-card-title-collapsible.nlc-va-card-title-expanded::after {
  transform: translateY(-50%) rotate(180deg); /* Up arrow */
}

/* Optional: Add a smooth transition for the content appearing/disappearing */
.nlc-va-card-content-collapsible {
  overflow: hidden;
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
  max-height: 1000px; /* Set to a value larger than any card content */
  opacity: 1;
}
