/* -----------------------------------------------------------
   LAYOUT
----------------------------------------------------------- */
.richtlijnen-wrapper {
  display: flex;
  gap: 20px;
}

.richtlijnen-left {
  flex: 0 0 20%;
  padding: 20px;
}

.richtlijnen-right {
  flex: 1;
}


/* -----------------------------------------------------------
   TABS
----------------------------------------------------------- */
.sweco-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #ddd;
  margin: 10px 0 15px;
  padding-bottom: 4px;
  overflow-x: auto;
  flex-wrap: wrap;
}

.sweco-tab {
  appearance: none;
  border: 1px solid transparent;
  border-bottom: none;
  background: #f5f5f5;
  padding: 10px 16px;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}

.sweco-tab:hover {
  background: #eee;
}

.sweco-tab.active {
  background: rgba(var(--main-color));
  border-color: rgba(var(--main-color));
  color: #fff;
}


.sweco-tab:focus-visible {
  background: rgba(var(--tegels2-color));
  color: white;
}


.sweco-tab-content {
  display: none;
  border: 1px solid #ddd;
  background: #fff;
  padding: 10px;
  border-radius: 0 6px 6px 6px;
}

.sweco-tab-content.active {
  display: block;
}


/* -----------------------------------------------------------
   TREE & CATEGORIES
----------------------------------------------------------- */
.sweco-tree {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.caret {
  display: inline-block;
  font-weight: 600;
  margin: 6px 0;
  color: rgba(var(--main-color));
  width: 100%;
  background: none;
  text-align: left;
}

.caret::before {
  content: "▶ ";
  display: inline-block;
  width: 16px;
}

.caret[aria-expanded="true"]::before {
  content: "▼ ";
}

.regel-title::before {
  content: "+ ";
  display: inline-block;
  width: 16px;
}

.regel-title[aria-expanded="true"]::before {
  content: "- ";
}

.caret:hover {
  color: rgba(var(--tegels2-color));
  background: none;
}

.nested {
  margin-left: 18px;
  padding-left: 8px;
  list-style-type: none;
}

.nested[hidden] {
  display: none;
}

.omschrijving-richtlijn-short {
  margin-left: 22px;
}


/* -----------------------------------------------------------
   REGELS
----------------------------------------------------------- */
.regel-item {
  margin: 6px 0;
  border: 1px solid #ddd;
  padding-left: 10px;
}

.regel-title {
  cursor: pointer;
  font-weight: 600;
  color: #222;
  background: none;
  border: none;
  padding: 6px 4px;
  width: 100%;
  text-align: left;
}

.regel-title:hover {
  color: rgba(var(--tegels2-color));
  background: none;
}

.regel-title:focus-visible,
.caret:focus-visible {
  outline: 3px solid rgba(var(--main-color));
  outline-offset: 3px;
}

/* + / − indicator on regel titles */
.regel-title {
  display: flex;
  align-items: center;
}

.regel-toggle-indicator {
  margin-left: auto;       /* push to far right */
  font-size: 1.2em;
  font-weight: 700;
  padding-left: 12px;
  padding-right: 25px;
}

/* open state */
.regel-title[aria-expanded="true"] .regel-toggle-indicator {
  content: "−";
}

.regel-description {
  margin-top: 4px;
  margin-left: 16px;
  padding: 10px 10px;
  /* border-left: 2px solid #ccc; */
  background: #fafafa;
  border-radius: 2px;
}

.regel-description[hidden] {
  display: none;
}

.pre-description {
  font-weight: 600;
}


/* -----------------------------------------------------------
   FILTERS
----------------------------------------------------------- */
.richtlijnen-filters {
  display: flex;
  flex-direction: column;
}

.filter-label {
  font-weight: 600;
  margin-top: 10px;
}

.sysid-wrapper {
  display: inline-flex;
  align-items: center;
}

.sysid-prefix {
  background: #f0f2f5;
  padding: 6.4px 10px;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
  font-weight: 600;
  border: 1px solid #e5e7eb;
}

#search_id_number {
  border-radius: 0px;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

.richtlijnen-filters input[type="number"] {
  max-width: none;
}

.filter-group {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  margin: 7px 0;
}

.filter-toggle {
  width: 100%;
  text-align: left;
  background: #f8f9fb;
  border: none;
  padding: 10px 12px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
}

.filter-toggle:focus-visible {
  outline: 2px solid rgba(var(--tegels2-color));
  outline-offset: 2px;
}

.filter-toggle:hover .filter-title,
.filter-toggle:hover .selected-count {
  color: white;
}

.filter-panel {
  padding: 10px 12px;
}

.checkbox-list {
  display: grid;
  gap: 6px;
  max-height: 240px;
  overflow: auto;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
}


.checkbox-item input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(var(--main-color));   /* visible keyboard focus */
  outline-offset: 2px;
}


/* -----------------------------------------------------------
   ACTIONS
----------------------------------------------------------- */
.filter-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-actions button[type="submit"] {
  border-radius: 6px;
}

.reset-filters-btn {
  color: #6b7280;
  text-decoration: underline;
}

.reset-filters-btn:hover {
  color: #111827;
}

.richtlijn-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.history-btn {
  background-color: rgba(var(--main-color));
  padding: 2px 5px;
  color: white;
  text-decoration: none !important;
}

.history-btn:hover {
  background-color: #07838f;
  color: white;
} 

.share-btn {
  color: white;
}

.share-btn:focus-visible {
  outline: 2px solid rgba(var(--main-color));
  outline-offset: 2px;
}


/* -----------------------------------------------------------
   REGEL LAYOUT (70/30)
----------------------------------------------------------- */
.regel-other-container {
  display: flex;
  gap: 20px;
}

.omschrijving-richtlijn {
  margin-bottom: 20px;
}

.other-info-left {
  flex: 1;
  padding-left: 5px;
}

.other-info-right {
  flex: 0 0 30%;
}

.other-info-right h4 {
  margin-bottom: 0px;
}

.afbeeldingen-carousel img {
  max-height: 200px;
}

/* Mobile */
@media (max-width: 768px) {
  .regel-other-container {
      flex-direction: column;
  }
  .other-info-right,
  .other-info-left {
      flex: 100%;
  }
}