/* --- Progress bars --- */
.progress-bars {
  margin: 1.5rem 0;
}

.progress-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.8rem;
}

.progress-row .label {
  width: 180px;
  font-weight: bold;
}

.progress-row .bar {
  display: flex;
  gap: 4px;
}

.bar-segment {
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 0.85rem;
  color: #fff;
}

/* Colors for statuses */
.on-track .bar-segment { background-color: #5cb85c; }
.acceleration-needed .bar-segment { background-color: #f0ad4e; }
.not-progressing .bar-segment { background-color: #d9534f; }
.no-data .bar-segment { background-color: #ccc; color: #333; }

/* Distinguish binding/proposal/communication */
.bar-segment.binding { border: 2px solid #333; }
.bar-segment.proposal { background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.4),
    rgba(255,255,255,0.4) 6px,
    transparent 6px,
    transparent 12px
  ); }
.bar-segment.communication { opacity: 0.8; }

.egd-progress-header .progressing {
  font-weight: bold;
  color: #004494;
}
.egd-progress-header .on-track {
  font-weight: bold;
  color: #92D050;
}
/* --- Legend --- */
.legend {
  font-size: 0.85rem;
  margin-top: 1rem;
  display: flex;
  gap: 1.5rem;
}

.legend span::before {
  content: "■ ";
  font-size: 1rem;
}

/* --- Filters --- */
.filters {
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #f9f9f9;
}

.filters select,
.filters input[type="search"] {
  padding: 0.4rem;
  margin-right: 0.5rem;
  border: 1px solid #bbb;
  border-radius: 4px;
}

.filters button {
  padding: 0.4rem 0.8rem;
  border: none;
  background: #0074d9;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.filters button:hover {
  background: #005fa3;
}

/* --- Legend icons --- */
.legend-icons {
  font-size: 0.85rem;
  margin: 1rem 0;
  display: grid;
  gap: 0.4rem;
}

.legend-icons span {
  display: block;
}

/* --- Table --- */
.targets {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.targets .target-row {
  border-top: 1px solid #ddd;
}

.targets th {
  border: 1px solid #ddd;
  padding: 0.6rem;
  font-size: 0.9rem;
  text-align: left;
}

.targets td {
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  padding: 0.6rem;
  font-size: 0.9rem;
  text-align: left;
}

.targets th {
  background: #f0f0f0;
}

.targets tr:nth-child(even) {
  background: #fafafa;
}

.targets td.assessment {
  /* font-size: 1.2rem;
  text-align: center;
  font-weight: bold; */
}

.targets td.assessment.on-track { color: #5cb85c; }
.targets td.assessment.not-progressing { color: #d9534f; }

.targets td a {
  color: #0074d9;
  text-decoration: none;
}

.targets td a:hover {
  text-decoration: underline;
}
.targets .expand-toggle {
  font-size: 200%;
  cursor: n-resize;
}

.targets td:nth-child(1),
.targets th:nth-child(1) {
  max-width: 600px;
}

.targets td:nth-child(6),
.targets th:nth-child(6) {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Notes --- */
.note {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  font-style: italic;
}

.target-title {
  position: relative;
  bottom: 5px;
}
.target-detail {
  /* display: none; */
}
/* All sortable headers */
.targets th {
  position: relative;
  cursor: pointer;
  padding-right: 20px; /* space for icon */
}

/* Default unsorted state (⇅) */
.targets th::after {
  content: '⇅';
  position: absolute;
  right: 5px;
  color: #888;
  font-size: 0.8em;
}

/* Ascending (▲) */
.targets th.sort-asc::after {
  content: '▲';
  color: #333;
}

/* Descending (▼) */
.targets th.sort-desc::after {
  content: '▼';
  color: #333;
}

.table-toggle {
  margin-top: 10px;
}
.table-toggle a {
  cursor: pointer;
  text-decoration: underline;
  color: #007bff;
}

/* Target details page */
.target-details {
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 16px;
  margin: 8px 0;
  border-radius: 8px;
  font-family: Arial, sans-serif;
  color: #333;
}

.target-details .thematic-name {
  font-weight: bold;
  margin-bottom: 8px;
  color: #555;
}

.target-details .target-title {
  font-size: 1.3em;
  margin-bottom: 12px;
  color: #222;
}

.target-details .target-description {
  margin-bottom: 12px;
  line-height: 1.5;
}

.target-details .keywords {
  margin-top: 8px;
  color: #666;
  font-style: italic;
  font-size: 0.9em;
}

.target-details .assessment-block,
.target-details .indicator-block {
  background: #fff;
  border: 1px solid #eee;
  padding: 8px 12px;
  margin-bottom: 12px;
  border-radius: 6px;
}

.target-details .assessment-block h5,
.target-details .indicator-block h5 {
  margin: 0 0 6px 0;
  font-size: 1em;
  color: #444;
}

.target-details .assessment-description,
.target-details .indicator-description {
  font-size: 0.95em;
  color: #333;
}

.target-details .target-document a {
  display: inline-block;
  margin-top: 8px;
  color: #1a73e8;
  text-decoration: none;
}

.target-details .target-document a:hover {
  text-decoration: underline;
}

.expand-toggle {
  display: inline-block;
  transition: transform 1s ease; /* rotate smoothly */
}

.reset-btn {
  margin-left: 8px;
    padding: 0px 15px;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid #dadada;
    font-size: 130%;
}
.series-selector {
  padding: 6px;
}
