.table_view {
  margin: 12px;
  border-radius:18px;
}

.table_view .nothing_this_week_wrapper {
  border-bottom:0;
}

@media (min-width: 900px) {
  .table_view {
    margin: 32px;
  }
}

a.table_row {
  text-decoration: none;
  color: var(--soft-black);
  border: 1px solid var(--gridline);
  transition: background-color 100ms;
  overflow: hidden;
  margin-bottom:-1px;
  transition: margin 0.15s, border-radius 0.35s, transform 0.45s, box-shadow 0.15s, background-color 0.45s;
  padding: 14px 16px;
  display: flex;
  align-items: stretch;
  gap: 12px;
  justify-content: space-between;
  background-color:var(--paper);
}

a.table_row.approval_yes, a.table_row.approval_yes:hover {
  background-color:var(--forest);
  color:var(--paper);
}

a.table_row.approval_yes .table_row_summary, a.table_row.approval_yes .table_row_date {
  color:var(--paper);
}
@media (hover: hover) {
  a.table_row:hover {
    background-color:var(--gentle-grey);
    transform:scale(1.01);
    transition: transform 0.15s, background-color 0.15s, border-radius 0.15s;
    border-radius:16px !important;
  }
}

a.table_row.approval_no {
  opacity:0.5;
}

a.table_row span.card_brand {
  background-color:var(--magic);
  color:#fff;
  padding:4px 6px;
  font-size:12px;
  font-family:"Matter SemiMono", monospace;
  border-radius:4px;
}

a.table_row.approval_yes span.card_brand {
  background-color:var(--forest);
  border:1px solid var(--paper);
}

.pr_campaigns_table .table_row_sources {
  gap:3px;
}

/* First visible row: visible AND not preceded by another visible row */
a.table_row:not([style*="max-height: 0px"]):not(a.table_row:not([style*="max-height: 0px"]) ~ a.table_row:not([style*="max-height: 0px"])) {
  border-radius: 16px 16px 0 0;
}

/* Last visible row: visible AND not followed by another visible row */
a.table_row:not([style*="max-height: 0px"]):not(:has(~ a.table_row:not([style*="max-height: 0px"]))) {
  border-radius: 0 0 16px 16px;
}

/* Only visible row: both first AND last (extra :not() gives higher specificity, wins cascade) */
a.table_row:not([style*="max-height: 0px"]):not(a.table_row:not([style*="max-height: 0px"]) ~ a.table_row:not([style*="max-height: 0px"])):not(:has(~ a.table_row:not([style*="max-height: 0px"]))) {
  border-radius: 16px;
}

.table_row_title {
  display:flex;
  align-items:center;
  gap:8px;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  min-width: 0;
  flex: 1;
  margin-bottom:10px;
}

.table_row_title::first-letter {
  text-transform: uppercase;
}

.table_row_summary {
  color: var(--hard-grey);
  font-family: "Matter SemiMono", monospace;
  font-size: 14px;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-width:600px;
}

.table_row_sources {
  display:flex;
  align-items: center;
  padding-top:12px;
}

.table_row_sources img.source_favicon {
  width:20px;
  height:20px;
  margin-right:-7px;
}

.table_row_date {
  font-family: "Matter SemiMono", -apple-system, sans-serif;
  font-size: 13px;
  color: var(--soft-grey);
  white-space: nowrap;
}

.table_row_bookmarks {
  display:flex;
}

.table_row_bookmarks .bookmark_icon {
  margin-left:-7px;
}

.table_row_bookmarks svg.bookmark {
  width:14px;
  height:auto;
  border:1px solid var(--dusk-rose);
  border-radius:50%;
  padding:7px;
  background-color:var(--deep-rose);
  stroke:var(--paper);
}

.table_row_right {
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  align-items:flex-end;
}

/* Week groups */

.table_week_group {
  margin-bottom: 24px;
}

.table_week_label {
  font-size: 13px;
  padding-bottom:10px;
  padding-left:10px;
  padding-right:10px;
  color: var(--hard-grey);
  font-family:"Matter SemiMono", monospace;
}

/* Filter bar */

.filter_bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0;
}

.filter_bar_item {
  position: relative;
}

.filter_bar_item > label {
  font-family: "Matter SemiMono", monospace;
  font-size: 12px;
  color: var(--soft-grey);
  margin-bottom: 4px;
  display: block;
}

.filter_select {
  font-family: "Matter SemiMono", monospace;
  font-size: 12px;
  color: var(--soft-grey);
  border:none;
  padding: 4px 16px;
  background: #fff;
  cursor: pointer;
  outline: none;
  appearance:none;
  background-image: url("/assets/chevron-down-af4dffe4.svg");
  background-repeat: no-repeat;
  background-position: right 0px center;
  background-size: 12px;
  text-align: right;
  margin-bottom:0;
}

.filter_select:focus {
  border:none;
}

/* Search */

.search_bar_item {
  display: flex;
  align-items: center;
}

input[type="text"].search_input {
  height:auto;
  font-family: "Matter SemiMono", monospace;
  font-size: 12px;
  color: var(--soft-black);
  border: 1px solid var(--gridline);
  border-radius: 7px;
  padding: 8px 28px 8px 10px;
  outline: none;
  width: 180px;
  background: #fff;
  margin-bottom: 0;
}

.search_input::placeholder {
  color: var(--soft-grey);
}

.search_input:focus {
  border-color: var(--magic);
}

.search_clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 16px;
  color: var(--soft-grey);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.search_clear:hover {
  color: var(--soft-black);
}

.search_bar_item:focus-within ~ .filter_bar_item,
.search_bar_item:has(.search_input:not(:placeholder-shown)) ~ .filter_bar_item {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.filter_bar_item:not(.search_bar_item) {
  transition: opacity 0.2s;
}

/* Compact slider */

.compact_slider {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compact_slider_label {
  font-size: 12px;
  color: var(--soft-grey);
  font-family: "Matter SemiMono", monospace;
  white-space: nowrap;
  cursor: pointer;
}

.compact_slider_track {
  width: 80px;
  padding: 0 2px;
  margin-top:6px;
}

.compact_slider_track input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 40px;
  background: transparent;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  margin-bottom:0;
}

.compact_slider_track input[type="range"]::-webkit-slider-runnable-track {
  height:2px;
  background:var(--gridline);
}

.compact_slider_track input[type="range"]::-moz-range-track {
  height: 2px;
  background: var(--gridline);
  border-radius: 2px;
}

.compact_slider_track input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--magic);
  border-radius: 50px;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  margin-top: -7px;
}

.compact_slider_track input[type="range"]::-moz-range-thumb {
  width: 4px;
  height: 16px;
  background: var(--hard-grey);
  border-radius: 2px;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}


@media (max-width: 768px) {
  a.table_row {
    gap: 4px;
  }

  .table_row_summary {
    display: none;
  }

  .table_row_type {
    min-width: auto;
  }
}

span.regulation_label {
  display:inline-flex;
  align-items:center;
  gap:4px;
  font-family: "Matter SemiMono", monospace;
  font-size:11px;
  background-color:var(--soft-black);
  color:var(--paper);
  padding:6px 8px;
  border-radius:12px;
}

svg.regulation_icon {
  width:15px;
  height:auto;
}


.events_table .table_week_group {
  background:var(--gentle-white);
  padding:12px;
  border:1px solid var(--gridline);
  border-radius:9px;
}

.table_view_dashboard_wrapper {
  padding:12px;
}

@media (min-width:1200px) {
  .table_view_dashboard_wrapper {
    padding:24px;
  }
}

.table_views {
  display:flex;
  flex-direction:column;
  gap:24px;
}

.see_more_block {
  padding:10px 0;
}

.table_view_dashboard {
  width:100%;
  display:flex;
  flex-direction:column;
  justify-content: space-between;
}

.table_view_dashboard_wrapper .table_view {
  margin:0;
  padding:16px;
  border:1px solid var(--gridline);
  background-color:var(--gentle-white);
  box-sizing: border-box;
}

.table_view_dashboard_wrapper .events_table, .table_view_dashboard_wrapper .right_now_table {
  margin-bottom:14px;
}

.table_view .upper_block {
  padding:3px;
  margin-bottom:20px;
  padding-bottom:20px;
  border-bottom:1px solid var(--gridline);
  display:flex;
  justify-content: space-between;
  align-items:center;
}

.table_view_dashboard_wrapper .label {
  font-family: "Inter";
  font-weight:700;
  font-size:21px;
  color:var(--soft-black);
}

@media (min-width:1200px) {
  .table_views {
    flex-direction:row;
    gap:18px;
  }
  .see_more_block {
    padding:0;
    padding-bottom:10px;
  }
}

.table_view_dashboard_wrapper .label_explainer {
  font-family: "Matter SemiMono", monospace;
  font-size:14px;
  color:var(--soft-grey);
  line-height:1.2;
  display:none;
}

@media (min-width:600px) {
  .table_view_dashboard_wrapper .label_explainer {
    display:block;
  }
}

.table_view_dashboard .heading_wrapper {
  display:flex;
  flex-direction:column;
  gap:1px;
}

.table_view_dashboard_wrapper .table_row_title {
  display: -webkit-box;
  overflow:hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; 
  text-overflow:ellipsis;
}

.table_view_dashboard_wrapper span.regulation_label {
  display:none;
}

.table_view_dashboard_wrapper .is_analysing_block {
  margin:0;
  padding:15px;
  margin-bottom:40px;
  border-radius:40px;
}

@media (min-width:1200px) {
 .table_view_dashboard_wrapper .is_analysing_block {
    margin-bottom:40px;
  }
  .table_view_dashboard_wrapper .table_row_title {
    -webkit-line-clamp:1;
  }
}

.pr_table_row_sources {
  display:flex;
  align-items:center;
  justify-content:space-between;
}