.keyword-flat-report {
  gap: 12px;
}

.keyword-flat-report .keyword-data-notice,
.keyword-flat-report .research-scope-card {
  margin: 0;
}

.keyword-flat-report .research-table-card {
  min-width: 0;
  overflow: hidden;
}

.keyword-flat-report .research-toolbar {
  align-items: flex-start;
  gap: 12px;
}

.keyword-table-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.keyword-table-scope span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  line-height: 1.3;
}

.keyword-table-scope span.is-advertising {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.keyword-wide-table-scroll {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: 72vh;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border-top: 1px solid #e2e8f0;
  outline: none;
}

.keyword-wide-table-scroll:focus-visible {
  box-shadow: inset 0 0 0 2px #8b5cf6;
}

.keyword-flat-report .keyword-wide-data-table {
  width: max-content;
  min-width: 3260px;
  table-layout: fixed;
}

.keyword-flat-report .keyword-wide-data-table th,
.keyword-flat-report .keyword-wide-data-table td {
  width: 112px;
  min-width: 112px;
  height: auto;
  padding: 12px 10px;
  vertical-align: middle;
  white-space: nowrap;
}

.keyword-flat-report .keyword-wide-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f8fafc;
  box-shadow: inset 0 -1px #dbe3ee;
}

.keyword-flat-report .keyword-wide-data-table th:first-child,
.keyword-flat-report .keyword-wide-data-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 5;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  text-align: center;
  background: #fff;
}

.keyword-flat-report .keyword-wide-data-table th:nth-child(2),
.keyword-flat-report .keyword-wide-data-table td:nth-child(2) {
  position: sticky;
  left: 48px;
  z-index: 5;
  width: 270px;
  min-width: 270px;
  max-width: 270px;
  background: #fff;
  box-shadow: 8px 0 14px -12px rgba(15, 23, 42, .65);
}

.keyword-flat-report .keyword-wide-data-table thead th:first-child,
.keyword-flat-report .keyword-wide-data-table thead th:nth-child(2) {
  z-index: 7;
  background: #f8fafc;
}

.keyword-flat-report .keyword-wide-data-table tbody tr:hover td,
.keyword-flat-report .keyword-wide-data-table tbody tr:hover td:first-child,
.keyword-flat-report .keyword-wide-data-table tbody tr:hover td:nth-child(2) {
  background: #faf8ff;
}

.keyword-flat-report .keyword-wide-data-table th:nth-child(15),
.keyword-flat-report .keyword-wide-data-table td:nth-child(15),
.keyword-flat-report .keyword-wide-data-table th:nth-child(23),
.keyword-flat-report .keyword-wide-data-table td:nth-child(23),
.keyword-flat-report .keyword-wide-data-table th:nth-child(26),
.keyword-flat-report .keyword-wide-data-table td:nth-child(26) {
  width: 190px;
  min-width: 190px;
  white-space: normal;
}

.keyword-flat-report .keyword-wide-data-table th:nth-child(24),
.keyword-flat-report .keyword-wide-data-table td:nth-child(24) {
  width: 180px;
  min-width: 180px;
}

.keyword-flat-report .keyword-flow-row > td {
  height: auto;
}

.keyword-flat-report .research-keyword-cell {
  min-width: 0;
}

.keyword-flat-report .research-keyword-cell > strong {
  white-space: normal;
  overflow-wrap: anywhere;
}

.keyword-ad-data-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 180px;
  white-space: normal;
  line-height: 1.45;
}

.keyword-ad-data-state.is-complete {
  color: #16845b;
}

.keyword-ad-data-state.is-missing {
  color: #b45309;
}

.keyword-ad-data-state::before {
  content: '';
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

@media (max-width: 760px) {
  .keyword-flat-report .research-toolbar-controls {
    width: 100%;
  }

  .keyword-wide-table-scroll {
    max-height: 68vh;
  }
}
