/* Product demo blocks — styles aligned with customer-app dark theme */

.demo-product {
  font-family: Inter, sans-serif;
  font-size: 14px;
}

.demo-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}

.demo-filter-chip {
  display: flex;
  align-items: center;
  margin: 4px 12px 4px 0;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  color: #ededed;
  background: #222338;
}

.demo-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 8px;
  color: #ededed;
}

.demo-checkbox-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.demo-checkbox-box {
  position: relative;
  min-width: 20px;
  min-height: 20px;
  border-radius: 4px;
  border: 1px solid #9a9da5;
  flex-shrink: 0;
}

.demo-checkbox-box.checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.demo-chip-remove {
  margin-left: 8px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: #ededed;
  opacity: 0.7;
  line-height: 1;
}

.demo-filter-btn-wrap {
  position: relative;
  margin: 4px 0;
  flex-shrink: 0;
}

.demo-filter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #6f6c90;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  color: #ededed;
}

.demo-filter-dropdown {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  margin-top: 0;
  max-height: min(200px, calc(100vh - 120px));
  overflow: auto;
  border-radius: 6px;
  background: #000020;
  box-shadow: rgba(0, 0, 0, 0.25) 0 2px 5px;
  padding: 8px 12px;
  min-width: min(220px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
}

.demo-filter-dropdown ul {
  margin: 0;
  padding: 0;
}

.demo-filter-dropdown li {
  display: flex;
  padding: 8px;
  list-style: none;
  border-radius: 4px;
}

.demo-filter-dropdown li:hover {
  background: rgba(34, 35, 56, 0.5);
}

.demo-labels-report {
  overflow-x: auto;
  width: 100%;
}

.demo-labels-report table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 480px;
}

.demo-labels-report thead th {
  padding: 8px;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  color: #ededed;
  border-bottom: 1px solid #222338;
  font-weight: 600;
}

.demo-labels-report tbody tr {
  border-bottom: 1px solid #222338;
  background: #10162b;
}

.demo-labels-report td {
  padding: 8px;
  color: #ededed;
  font-size: 13px;
  vertical-align: middle;
}

.demo-label-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  background: #b1d4e0;
  color: #10162b;
}

.demo-position-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.demo-position-pill.up {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.demo-position-pill.down {
  background: rgba(244, 67, 54, 0.2);
  color: #ff8a80;
}

.demo-chevron {
  width: 20px;
  height: 20px;
  cursor: pointer;
  color: #6f6c90;
  transition: transform 0.15s linear;
  flex-shrink: 0;
}

.demo-chevron.open {
  transform: rotate(90deg);
}

.demo-competitor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #222338;
  color: #ededed;
  gap: 12px;
}

.demo-competitor-row span:first-child {
  flex: 1;
}

.demo-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #6f6c90;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.demo-toggle.on {
  background: #0062ff;
}

.demo-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #6f6c90;
}

.demo-toggle.on .demo-toggle-knob {
  transform: translateX(20px);
  color: #0062ff;
}

.demo-link-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  white-space: nowrap;
}

.demo-link-btn.add {
  color: #3b93ec;
}

.demo-link-btn.delete {
  color: #f57c73;
}

.demo-semantic-table {
  width: 100%;
  border: 1px solid #222338;
  border-radius: 6px;
  overflow: hidden;
}

.demo-semantic-table thead {
  position: relative;
  z-index: 2;
  background: #161e31;
}

.demo-semantic-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  color: #ededed;
  font-weight: 600;
}

.demo-semantic-table td {
  padding: 10px 12px;
  border-top: 1px solid #222338;
  color: #ededed;
  font-size: 13px;
}

.demo-semantic-table td.keyword {
  color: #3b93ec;
  text-decoration: underline;
}

.demo-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  border-radius: 50%;
  border: 1px solid #6f6c90;
  font-size: 10px;
  cursor: help;
  position: relative;
  font-style: normal;
}

.demo-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #10162b;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  white-space: normal;
  max-width: 220px;
  z-index: 30;
  font-weight: 400;
  text-transform: none;
  text-align: left;
}

.demo-info-icon:hover .demo-tooltip {
  display: block;
}

/* Comp tooltip sits in thead; table overflow:hidden clips upward popovers */
.demo-semantic-table .demo-info-icon .demo-tooltip {
  bottom: auto;
  top: calc(100% + 8px);
  z-index: 30;
}

.demo-minus-panel {
  border: 1px solid #0062ff;
  border-radius: 6px;
  background: #10162b;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.demo-minus-panel-body {
  flex: 1;
  min-height: 225px;
}

.demo-minus-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #222338;
}

.demo-minus-header-title {
  color: #ededed;
  font-size: 14px;
}

.demo-minus-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.demo-minus-clear {
  color: #f57c73;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
}

.demo-minus-list {
  padding: 12px 16px;
  list-style: none;
  margin: 0;
}

.demo-minus-list li {
  padding: 6px 0;
  color: #ededed;
  font-size: 14px;
  line-height: 1.5;
}

.demo-minus-list .struck {
  color: #f57c73;
  text-decoration: line-through;
}

.demo-minus-list li.interactive span {
  cursor: pointer;
}

.demo-minus-empty {
  padding: 8px 0;
  color: #6f6c90;
  font-size: 14px;
  font-style: italic;
  border-bottom: none !important;
}

.demo-minus-result-list {
  padding: 12px 16px;
  margin: 0;
  list-style: none;
}

.demo-minus-result-list li {
  padding: 8px 0;
  color: #b1d4e0;
  font-size: 14px;
  border-bottom: 1px solid #222338;
}

.demo-minus-result-list li:last-child {
  border-bottom: none;
}

.demo-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* SERM feature cards (home + service page) */
.serm-features-grid {
  display: grid;
  width: 100%;
  grid-auto-flow: column;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(3, auto);
  gap: 16px;
}

@media (min-width: 768px) {
  .serm-features-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto;
    gap: 24px;
  }
}

.serm-feature-card {
  border-radius: 6px;
  padding: 2px;
  background: linear-gradient(to right, #ab78ff, #0062ff);
  height: 100%;
  box-sizing: border-box;
}

.serm-feature-card-inner {
  box-sizing: border-box;
  height: 100%;
  min-height: 100%;
  padding: 24px;
  border-radius: 4px;
  background-color: #10162b;
}

/* SERM monitor demo */
.demo-serm-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .demo-serm-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.demo-serm-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  border-radius: 6px;
  background: #161e31;
  border: 1px solid #222338;
  text-align: center;
}

.demo-serm-card-value {
  font-size: 20px;
  font-weight: 600;
  color: #ededed;
  line-height: 1.2;
}

.demo-serm-card-label {
  font-size: 11px;
  color: #9a9da5;
  margin-top: 4px;
}

.demo-serm-card.pos .demo-serm-card-value {
  color: #4caf50;
}

.demo-serm-card.neu .demo-serm-card-value {
  color: #b1d4e0;
}

.demo-serm-card.neg .demo-serm-card-value {
  color: #f44336;
}

.demo-serm-card.own .demo-serm-card-value {
  color: #3b93ec;
}

.demo-serm-card.vol .demo-serm-card-value {
  color: #febf29;
  font-size: 16px;
}

.demo-serm-chart-wrap {
  margin-bottom: 16px;
}

.demo-serm-chart-title {
  font-size: 13px;
  color: #9a9da5;
  margin-bottom: 4px;
}

.demo-serm-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.demo-serm-pill {
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid #6f6c90;
  background: transparent;
  color: #ededed;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.demo-serm-pill.active {
  background: #0062ff;
  border-color: #0062ff;
  color: #fff;
}

.demo-serm-depth {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.demo-serm-depth-btn {
  padding: 6px 16px;
  border-radius: 6px;
  border: 1px solid #6f6c90;
  background: transparent;
  color: #ededed;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.demo-serm-depth-btn.active {
  background: #222338;
  border-color: #0062ff;
  color: #fff;
}

.demo-serm-table-wrap {
  overflow-x: auto;
  width: 100%;
}

.demo-serm-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

.demo-serm-table thead th {
  padding: 8px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  color: #9a9da5;
  border-bottom: 1px solid #222338;
  font-weight: 600;
}

.demo-serm-table tbody tr {
  border-bottom: 1px solid #222338;
}

.demo-serm-table tbody tr.own-row {
  background: rgba(59, 147, 236, 0.08);
}

.demo-serm-table td {
  padding: 8px;
  font-size: 13px;
  color: #ededed;
  vertical-align: middle;
}

.demo-serm-rank {
  color: #9a9da5;
  font-weight: 600;
}

.demo-serm-domain {
  color: #3b93ec;
  font-weight: 500;
}

.demo-serm-own-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  background: rgba(59, 147, 236, 0.2);
  color: #3b93ec;
}

.demo-serm-url {
  display: block;
  color: #9a99b5;
  font-size: 12px;
}

.demo-tone {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.demo-tone.pos {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.demo-tone.neu {
  background: rgba(154, 157, 165, 0.2);
  color: #b1d4e0;
}

.demo-tone.neg {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
}

.demo-serm-pos {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.demo-serm-pos.top {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.demo-serm-pos.mid {
  background: rgba(254, 191, 41, 0.2);
  color: #febf29;
}

.demo-serm-pos.low {
  background: rgba(154, 157, 165, 0.2);
  color: #9a9da5;
}

.demo-serm-delta {
  font-size: 11px;
}

[x-cloak] {
  display: none !important;
}
