/* Digiknack Analytics admin module */

.analytics-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(227, 219, 204, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  overflow: visible;
}

.analytics-filters__period {
  flex: 0 0 auto;
  margin: 0;
}

.analytics-filters__site-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.analytics-filters .contact-input,
.analytics-filters select.contact-input,
.analytics-filters input[type='date'] {
  background: transparent;
  background-color: transparent;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(227, 219, 204, 0.28);
  box-shadow: none;
  padding: 6px 4px 7px 0;
  font-weight: 400;
  color-scheme: dark;
}

.analytics-filters select.contact-input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f2133c' stroke-width='2.25'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  background-size: 12px;
}

.analytics-filters .contact-input:focus,
.analytics-filters .contact-input:focus-visible,
.analytics-filters select.contact-input:focus,
.analytics-filters select.contact-input:focus-visible,
.analytics-filters input[type='date']:focus,
.analytics-filters input[type='date']:focus-visible {
  outline: none;
  box-shadow: none;
  border-bottom-color: var(--cal-accent, #f2133c);
}

.analytics-filters input[type='date']::-webkit-calendar-picker-indicator {
  opacity: 0.55;
  cursor: pointer;
  filter: invert(0.92) sepia(0.2);
}

.analytics-filters__period-select {
  min-width: 7.5rem;
  padding-right: 22px;
  font-size: 0.82rem;
}

.analytics-filters__domains {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 220px;
  min-width: 0;
  margin-left: auto;
}

.analytics-filters__domains-field {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.analytics-filters__domains-input {
  width: 100%;
  font-size: 0.82rem;
}

.analytics-filters__domains-input[readonly] {
  opacity: 0.72;
  cursor: default;
}

.analytics-filters__menu {
  flex: 0 0 auto;
  z-index: 40;
}

.analytics-filters__menu .crm-row-menu {
  z-index: 40;
}

.analytics-filters__custom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.analytics-filters__date .contact-input {
  width: auto;
  min-width: 9.5rem;
  font-size: 0.82rem;
}

.analytics-filters__sep {
  color: var(--cal-muted);
  font-size: 0.85rem;
}

.analytics-filters__apply.dk-btn {
  padding: 0;
}

.analytics-action.dk-btn,
.analytics-card__head .dk-btn:not(.analytics-session-card__chat),
.analytics-form-actions .dk-btn,
.analytics-filters__domains .dk-btn,
.analytics-replay__embed-row .dk-btn,
.analytics-chat-compose__actions .dk-btn {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 400;
  color: rgba(232, 228, 220, 0.72);
  gap: 6px;
}

.analytics-action.dk-btn .dk-btn__icon,
.analytics-card__head .dk-btn:not(.analytics-session-card__chat) .dk-btn__icon,
.analytics-form-actions .dk-btn .dk-btn__icon,
.analytics-filters__domains .dk-btn .dk-btn__icon,
.analytics-replay__embed-row .dk-btn .dk-btn__icon,
.analytics-chat-compose__actions .dk-btn .dk-btn__icon {
  width: 14px;
  height: 14px;
  color: var(--cal-accent, #f2133c);
  stroke: var(--cal-accent, #f2133c);
  transform: none;
}

.analytics-action.dk-btn:hover,
.analytics-card__head .dk-btn:not(.analytics-session-card__chat):hover,
.analytics-form-actions .dk-btn:hover,
.analytics-filters__domains .dk-btn:hover,
.analytics-replay__embed-row .dk-btn:hover,
.analytics-chat-compose__actions .dk-btn:hover {
  color: var(--cal-text, #e8e4dc);
}

.analytics-action.dk-btn:hover .dk-btn__icon,
.analytics-card__head .dk-btn:not(.analytics-session-card__chat):hover .dk-btn__icon,
.analytics-form-actions .dk-btn:hover .dk-btn__icon,
.analytics-filters__domains .dk-btn:hover .dk-btn__icon,
.analytics-replay__embed-row .dk-btn:hover .dk-btn__icon,
.analytics-chat-compose__actions .dk-btn:hover .dk-btn__icon {
  transform: none;
}

.analytics-filters__site {
  flex: 0 0 auto;
  margin: 0;
}

.analytics-filters__site-select {
  min-width: min(220px, 42vw);
  max-width: 280px;
  font-size: 0.82rem;
}

.analytics-filters__site-select:disabled {
  opacity: 0.55;
}

.analytics-tabs {
  margin: 8px 0 0;
}

.analytics-tabpanels {
  padding-top: 16px;
}

.analytics-site-theme-card .analytics-card__head {
  justify-content: flex-end;
}

.analytics-chat-history-card {
  margin-bottom: 14px;
}

.analytics-chat-history-head__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.analytics-chat-history-status {
  min-width: 108px;
  background: transparent;
  background-color: transparent;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(227, 219, 204, 0.28);
  box-shadow: none;
  padding: 6px 22px 7px 0;
  font-size: 0.82rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f2133c' stroke-width='2.25'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  background-size: 12px;
}

.analytics-chat-history-hint {
  margin: 0;
  padding: 0 12px 10px;
  font-size: 0.78rem;
  color: var(--cal-muted);
}

.analytics-chat-history-table-wrap {
  overflow: auto;
  max-height: min(640px, 62vh);
}

.analytics-chat-history-table {
  margin: 0;
}

.analytics-chat-history-table th,
.analytics-chat-history-table td {
  font-size: 0.82rem;
  padding: 8px 12px;
  vertical-align: middle;
}

.analytics-chat-history-empty {
  color: var(--cal-muted);
  text-align: center;
  padding: 28px 12px;
}

.analytics-chat-history-visitor {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.analytics-chat-history-unread {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
}

.analytics-chat-history-contact,
.analytics-chat-history-preview {
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--cal-muted);
}

.analytics-chat-history-status-pill {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: capitalize;
  color: var(--cal-muted);
}

.analytics-chat-history-status-pill.is-open {
  color: #86efac;
}

.analytics-chat-history-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.analytics-add-form-card {
  margin-bottom: 12px;
  padding: 12px 14px;
}

.analytics-site-theme-card {
  margin-bottom: 14px;
}

.analytics-site-theme-hint {
  margin: 0;
  padding: 0 12px 10px;
  font-size: 0.78rem;
  color: var(--cal-muted);
}

.analytics-site-theme-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.analytics-site-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px 14px;
  padding: 0 12px 12px;
}

.analytics-site-theme-field {
  display: grid;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--cal-muted);
}

.analytics-site-theme-field__inputs {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  align-items: center;
}

.analytics-site-theme-field input[type='color'] {
  width: 44px;
  height: 36px;
  padding: 2px;
  border: 1px solid rgba(227, 219, 204, 0.14);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  overflow: hidden;
}

.analytics-site-theme-hex {
  font-size: 0.82rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(227, 219, 204, 0.28);
  background: transparent;
  padding: 6px 4px 7px 0;
}

.analytics-site-theme-hex:focus,
.analytics-site-theme-hex:focus-visible {
  outline: none;
  box-shadow: none;
  border-bottom-color: var(--cal-accent, #f2133c);
}

.analytics-site-theme-preview {
  margin: 0 12px 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(227, 219, 204, 0.1);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
  min-height: 120px;
  --preview-accent: #3b82f6;
  --preview-accent-dark: #2563eb;
  --preview-panel-bg: #111827;
  --preview-header-bg: #0f172a;
  --preview-text: #e8ecf4;
  --preview-visitor-bubble: #2563eb;
  --preview-visitor-bubble-text: #ffffff;
  --preview-admin-bubble: #1f2937;
  --preview-admin-bubble-text: #e8ecf4;
  --preview-launcher-icon: #ffffff;
  --preview-placeholder: #94a3b8;
}

.analytics-site-theme-preview__bubble {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, var(--preview-accent), var(--preview-accent-dark));
  color: var(--preview-launcher-icon);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.analytics-site-theme-preview__bubble svg {
  display: block;
  stroke: currentColor;
}

.analytics-site-theme-preview__panel {
  width: min(220px, 100%);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--preview-panel-bg);
  color: var(--preview-text);
}

.analytics-site-theme-preview__head {
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--preview-header-bg);
  color: var(--preview-text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.analytics-site-theme-preview__msg {
  margin: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 0.72rem;
  max-width: 85%;
}

.analytics-site-theme-preview__msg--admin {
  background: var(--preview-admin-bubble);
  color: var(--preview-admin-bubble-text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.analytics-site-theme-preview__msg--visitor {
  margin-left: auto;
  background: var(--preview-visitor-bubble);
  color: var(--preview-visitor-bubble-text);
  text-align: right;
}

.analytics-site-theme-preview__compose {
  margin: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--preview-panel-bg);
}

.analytics-site-theme-preview__placeholder {
  font-size: 0.72rem;
  color: var(--preview-placeholder);
}

.analytics-daily-card {
  margin-bottom: 14px;
}

.analytics-daily-table-wrap {
  overflow: auto;
  max-height: 220px;
}

.analytics-daily-table {
  margin: 0;
}

.analytics-daily-table th,
.analytics-daily-table td {
  font-size: 0.82rem;
  padding: 8px 12px;
}

.analytics-daily-table__source,
.analytics-daily-table__ip,
.analytics-daily-table__location {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analytics-layout {
  display: block;
  width: 100%;
}

.analytics-main {
  min-width: 0;
  width: 100%;
}

.analytics-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

@media (max-width: 720px) {
  .analytics-stats {
    grid-template-columns: 1fr;
  }
}

.analytics-stat {
  border: 1px solid rgba(227, 219, 204, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
}

.analytics-stat__label {
  font-size: 0.78rem;
  color: var(--cal-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.analytics-stat__value {
  margin-top: 4px;
  font-size: 1.35rem;
  font-weight: 700;
}

.analytics-panels {
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.analytics-sessions-head__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.analytics-chat-thread-select-wrap {
  display: grid;
  gap: 4px;
}

.admin-analytics-chat-panel__main {
  overflow: hidden;
}

.admin-analytics-chat-panel .analytics-chat-messages {
  flex: 1 1 auto;
  min-height: 240px;
}

.analytics-chat-unread-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
}

.analytics-chat-threads {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 140px;
  overflow: auto;
  border-bottom: 1px solid rgba(227, 219, 204, 0.08);
}

.analytics-chat-thread-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 8px 12px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  border-bottom: 1px solid rgba(227, 219, 204, 0.05);
}

.analytics-chat-thread-btn.is-active,
.analytics-chat-thread-btn:hover {
  background: rgba(59, 130, 246, 0.12);
}

.analytics-chat-thread-btn__title {
  font-size: 0.84rem;
  font-weight: 600;
  grid-column: 1;
}

.analytics-chat-thread-btn__badge {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.analytics-chat-thread-btn__meta {
  grid-column: 1;
  font-size: 0.72rem;
  color: var(--cal-muted);
}

.analytics-chat-thread-meta {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(227, 219, 204, 0.08);
  font-size: 0.78rem;
}

.analytics-chat-thread-meta__row {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.analytics-chat-thread-meta__row label {
  display: grid;
  gap: 2px;
}

.analytics-chat-thread-meta__row input {
  width: 100%;
  border: 1px solid rgba(227, 219, 204, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
  padding: 6px 8px;
  font: inherit;
}

.analytics-chat-thread-meta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.analytics-chat-messages {
  flex: 1;
  min-height: 120px;
  overflow: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.analytics-chat-msg {
  max-width: 92%;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.82rem;
}

.analytics-chat-msg--visitor {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(227, 219, 204, 0.1);
}

.analytics-chat-msg--admin {
  align-self: flex-end;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.analytics-chat-msg__time {
  margin-top: 4px;
  font-size: 0.68rem;
  color: var(--cal-muted);
}

.analytics-chat-msg__tag {
  margin-left: 6px;
  font-size: 0.68rem;
  color: var(--cal-muted);
}

.analytics-chat-empty {
  color: var(--cal-muted);
  font-size: 0.8rem;
  padding: 12px;
  text-align: center;
}

.analytics-chat-compose {
  border-top: 1px solid rgba(227, 219, 204, 0.08);
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}

.analytics-chat-canned,
.analytics-chat-input {
  width: 100%;
  border: 1px solid rgba(227, 219, 204, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
  padding: 8px 10px;
  font: inherit;
}

.analytics-chat-compose__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.analytics-session-card-wrap {
  border: 1px solid rgba(227, 219, 204, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.analytics-session-card-wrap:hover,
.analytics-session-card-wrap.is-active {
  border-color: rgba(242, 19, 60, 0.38);
  background: rgba(242, 19, 60, 0.07);
}

.analytics-session-card-wrap.is-active {
  box-shadow: 0 0 0 1px rgba(242, 19, 60, 0.12);
}

.analytics-session-card-wrap .analytics-list__btn {
  width: 100%;
}

.analytics-session-card__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid rgba(227, 219, 204, 0.08);
  padding: 7px 10px;
  background: rgba(0, 0, 0, 0.12);
  transition: background 0.12s ease, border-color 0.12s ease;
}

.analytics-session-card-wrap:hover .analytics-session-card__footer,
.analytics-session-card-wrap.is-active .analytics-session-card__footer {
  border-top-color: rgba(242, 19, 60, 0.14);
  background: rgba(0, 0, 0, 0.18);
}

.analytics-session-card__chat.dk-btn {
  width: 100%;
  justify-content: center;
  font-size: 0.76rem;
  padding: 0;
  color: rgba(227, 219, 204, 0.88);
}

.analytics-session-card__chat.dk-btn .dk-btn__icon {
  width: 14px;
  height: 14px;
}

.analytics-session-card__footer:hover {
  background: rgba(242, 19, 60, 0.08);
}

.analytics-session-card__footer:hover .analytics-session-card__chat {
  color: rgba(227, 219, 204, 0.98);
}

.analytics-card--replay {
  display: flex;
  flex-direction: column;
  min-height: min(82vh, 900px);
  border: none;
  background: transparent;
  overflow: visible;
  min-width: 0;
}

.analytics-card--replay .analytics-replay {
  height: 100%;
}

.analytics-card--sessions {
  max-height: min(82vh, 900px);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.analytics-side-details {
  border-top: 1px solid rgba(227, 219, 204, 0.08);
}

.analytics-side-details__summary {
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cal-muted);
  cursor: pointer;
  list-style: none;
}

.analytics-side-details__summary::-webkit-details-marker {
  display: none;
}

.analytics-side-details[open] .analytics-side-details__summary {
  color: rgba(227, 219, 204, 0.92);
}

.analytics-side-details .analytics-chip-row {
  padding-top: 0;
}

@media (max-width: 1300px) {
  .analytics-panels {
    grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr);
  }

  .analytics-card--replay {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1100px) {
  .analytics-panels {
    grid-template-columns: 1fr;
  }
}

.analytics-card {
  border: 1px solid rgba(227, 219, 204, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.analytics-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(227, 219, 204, 0.08);
}

.analytics-card__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.analytics-sessions-scroll {
  flex: 1 1 auto;
  min-height: 220px;
  max-height: min(480px, 46vh);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-bottom: 1px solid rgba(227, 219, 204, 0.08);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(227, 219, 204, 0.28) transparent;
}

.analytics-sessions-scroll::-webkit-scrollbar {
  width: 4px;
}

.analytics-sessions-scroll::-webkit-scrollbar-thumb {
  min-height: 150px;
  background: rgba(227, 219, 204, 0.24);
  border-radius: 4px;
}

.analytics-sessions-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(242, 19, 60, 0.45);
}

.analytics-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.analytics-list__item {
  border-bottom: none;
}

.analytics-list__btn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
}

.analytics-session-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 10px 10px 8px 8px;
  transition: none;
}

.analytics-session-card:hover,
.analytics-session-card.is-active {
  border-color: transparent;
  background: transparent;
}

.analytics-session-card__path-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  margin-bottom: 6px;
}

.analytics-session-card__duration {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(227, 219, 204, 0.72);
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.analytics-session-card__line {
  font-size: 0.74rem;
  line-height: 1.4;
  color: rgba(227, 219, 204, 0.78);
  word-break: break-word;
}

.analytics-session-card__line + .analytics-session-card__line {
  margin-top: 3px;
}

.analytics-session-card__line--source {
  color: rgba(160, 210, 255, 0.88);
  font-weight: 500;
}

.analytics-list__btn-body {
  flex: 1;
  min-width: 0;
}

.analytics-live-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: #3ecf6e;
  box-shadow: 0 0 0 0 rgba(62, 207, 110, 0.55);
  animation: analytics-live-pulse 1.8s ease-out infinite;
}

.analytics-live-dot--lg {
  width: 7px;
  height: 7px;
  margin-top: 0;
  display: inline-block;
  vertical-align: middle;
}

.analytics-live-dot--placeholder {
  visibility: hidden;
  animation: none;
  box-shadow: none;
}

@keyframes analytics-live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(62, 207, 110, 0.55);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(62, 207, 110, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(62, 207, 110, 0);
  }
}

.analytics-list__btn:hover,
.analytics-list__btn.is-active {
  background: transparent;
}

.analytics-list__path {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.35;
  word-break: break-word;
}

.analytics-list__live-tag {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #3ecf6e;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(62, 207, 110, 0.45);
  background: rgba(62, 207, 110, 0.12);
}


.analytics-replay-play.dk-btn {
  flex-shrink: 0;
}

.analytics-replay-play.is-playing .analytics-replay-play__label {
  color: rgba(227, 219, 204, 0.72);
}

.analytics-replay {
  padding: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 8px;
}

.analytics-replay__chrome {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: min(76vh, 820px);
  border: 1px solid rgba(227, 219, 204, 0.12);
  border-radius: 12px;
  overflow: hidden;
  background: #101010;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.analytics-replay__chrome.is-idle {
  border-color: rgba(227, 219, 204, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.analytics-replay__chrome.is-active .analytics-replay__stage {
  background: #080808;
}

.analytics-replay__chrome.is-playing-rec {
  border-color: rgba(242, 19, 60, 0.28);
  box-shadow: 0 0 0 1px rgba(242, 19, 60, 0.12), 0 8px 32px rgba(0, 0, 0, 0.4);
}

.analytics-replay__chrome.has-player .analytics-replay__toolbar,
.analytics-replay__chrome.is-live .analytics-replay__toolbar {
  display: none !important;
}

.analytics-replay__chrome.has-player.has-rrweb:not(.is-live) .analytics-replay__toolbar:not([hidden]) {
  display: flex !important;
}

.analytics-replay__browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #2a2a2a 0%, #1f1f1f 100%);
  font-size: 0.78rem;
  color: var(--cal-muted);
  flex-shrink: 0;
}

.analytics-replay__browser-dots {
  display: inline-flex;
  gap: 5px;
  flex-shrink: 0;
}

.analytics-replay__browser-dots i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.analytics-replay__browser-dots i:nth-child(1) {
  background: #ff5f57;
}

.analytics-replay__browser-dots i:nth-child(2) {
  background: #febc2e;
}

.analytics-replay__browser-dots i:nth-child(3) {
  background: #28c840;
}

.analytics-replay__url {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(227, 219, 204, 0.92);
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
}

.analytics-replay__time {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  min-width: 2.5rem;
  text-align: right;
  color: rgba(227, 219, 204, 0.75);
}

.analytics-replay__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #080808;
  overflow: hidden;
}

.analytics-replay__stage.is-idle {
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
  background-color: #0a0a0a;
}

.analytics-replay__player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  z-index: 2;
}

.analytics-replay__player[hidden] {
  display: none !important;
}

.analytics-replay__stage.is-idle .analytics-replay__player {
  display: none !important;
}

.analytics-replay__player .rr-player {
  display: none;
}

.analytics-replay__player .replayer-wrapper {
  background: #fff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.analytics-replay__player .replayer-wrapper iframe {
  border: 0;
  display: block;
}

.analytics-replay__preview {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(227, 219, 204, 0.55);
  text-align: center;
  background: #0a0a0a;
  z-index: 1;
}

.analytics-replay__preview[hidden] {
  display: none !important;
}

.analytics-replay__preview-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(227, 219, 204, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: rgba(242, 19, 60, 0.85);
}

.analytics-replay__toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #1a1a1a;
  flex-shrink: 0;
}

.analytics-replay__toolbar[hidden] {
  display: none !important;
}

.analytics-replay__tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(227, 219, 204, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(227, 219, 204, 0.9);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
}

.analytics-replay__tool-btn:hover {
  border-color: rgba(242, 19, 60, 0.45);
  background: rgba(242, 19, 60, 0.08);
}

.analytics-replay__tool-btn.is-playing {
  border-color: rgba(242, 19, 60, 0.35);
  background: rgba(242, 19, 60, 0.12);
}

.analytics-replay__tool-btn:focus {
  outline: none;
}

.analytics-replay__tool-btn:focus-visible {
  outline: 2px solid rgba(242, 19, 60, 0.5);
  outline-offset: 2px;
}

.analytics-replay__tool-icon {
  width: 14px;
  height: 14px;
  color: #f2133c;
}

.analytics-replay__scrub {
  flex: 1;
  accent-color: #f2133c;
}

.analytics-replay__details {
  margin-top: 8px;
  border: 1px solid rgba(227, 219, 204, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.analytics-replay__details summary {
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cal-muted);
  cursor: pointer;
  list-style: none;
}

.analytics-replay__details summary::-webkit-details-marker {
  display: none;
}

.analytics-replay__embed-row {
  padding: 0 12px 8px;
}

.analytics-replay__meta {
  margin: 0;
  padding: 0 12px 12px;
  font-size: 0.78rem;
  color: var(--cal-muted);
  line-height: 1.45;
  white-space: pre-wrap;
}

.analytics-replay__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #3ecf6e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.analytics-rec-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #f2133c;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.analytics-rec-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f2133c;
  animation: analytics-rec-blink 1s step-end infinite;
}

@keyframes analytics-rec-blink {
  50% {
    opacity: 0.25;
  }
}

.analytics-replay__cursor {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  border: 2px solid #f2133c;
  background: rgba(242, 19, 60, 0.25);
  pointer-events: none;
  transition: left 0.08s linear, top 0.08s linear;
  z-index: 2;
}

.analytics-replay__pulse {
  position: absolute;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  border: 2px solid rgba(242, 19, 60, 0.8);
  animation: analytics-pulse 0.55s ease-out forwards;
  pointer-events: none;
  z-index: 3;
}

@keyframes analytics-pulse {
  from {
    transform: scale(0.4);
    opacity: 1;
  }
  to {
    transform: scale(1.4);
    opacity: 0;
  }
}

.analytics-snippet {
  margin: 0;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
  color: rgba(227, 219, 204, 0.92);
  background: rgba(0, 0, 0, 0.25);
}

.analytics-empty {
  padding: 16px 12px;
  color: var(--cal-muted);
  font-size: 0.88rem;
}

.analytics-form-grid {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.analytics-form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.analytics-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px 12px;
}

.analytics-chip {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(227, 219, 204, 0.18);
  color: rgba(227, 219, 204, 0.88);
}
