html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.notification-send-form {
  max-width: 1040px;
}

.notification-target-option {
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  height: 100%;
  padding: 14px;
}

.notification-target-option strong,
.notification-target-option small {
  display: block;
}

.notification-target-option small {
  color: #6c757d;
  margin-top: 2px;
}

.notification-target-danger {
  border-color: #f0ad4e;
}

.live-metric-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.live-metric,
.live-status,
.live-funnel-step,
.live-alert,
.live-empty-panel {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
}

.live-metric {
  border-left-width: 4px;
  display: grid;
  gap: 4px;
  min-height: 96px;
  padding: 12px;
}

.live-metric span,
.live-status span,
.live-funnel-step span {
  color: #6c757d;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.live-metric strong {
  font-size: 1.8rem;
  line-height: 1;
}

.live-metric small,
.live-funnel-step small {
  color: #6c757d;
}

.live-funnel,
.live-status-grid,
.live-columns {
  display: grid;
  gap: 12px;
}

.live-funnel {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.live-funnel-step {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 12px;
}

.live-funnel-step strong {
  font-size: 1.5rem;
}

.live-status-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.live-status {
  display: grid;
  gap: 3px;
  padding: 12px;
}

.live-status strong {
  font-size: 1.05rem;
}

.live-alert-list {
  display: grid;
  gap: 8px;
}

.live-alert {
  border-left-width: 4px;
  display: grid;
  gap: 2px;
  padding: 10px 12px;
}

.live-alert span {
  color: #6c757d;
}

.live-columns {
  grid-template-columns: minmax(260px, .85fr) minmax(0, 1.5fr);
}

.live-empty,
.live-empty-panel {
  color: #6c757d;
  text-align: center;
}

.live-empty-panel {
  padding: 24px;
}

.live-event-list {
  display: grid;
  gap: 8px;
}

.live-event {
  align-items: start;
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  padding: 10px 12px;
}

.live-event strong,
.live-event span {
  display: block;
}

.live-event span:not(.live-event-dot) {
  color: #6c757d;
}

.live-event time {
  color: #6c757d;
  font-size: .82rem;
  white-space: nowrap;
}

.live-event-dot {
  border-radius: 999px;
  height: 10px;
  margin-top: 7px;
  width: 10px;
}

.live-tone-success {
  border-color: #198754;
}

.live-event-dot.live-tone-success {
  background: #198754;
}

.live-tone-warning {
  border-color: #ffc107;
}

.live-event-dot.live-tone-warning {
  background: #ffc107;
}

.live-tone-danger {
  border-color: #dc3545;
}

.live-event-dot.live-tone-danger {
  background: #dc3545;
}

.live-tone-primary {
  border-color: #0d6efd;
}

.live-event-dot.live-tone-primary {
  background: #0d6efd;
}

.live-tone-muted {
  border-color: #adb5bd;
}

.live-event-dot.live-tone-muted {
  background: #adb5bd;
}

.support-shell {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, .9fr) minmax(0, 1.5fr);
}

.support-list,
.support-detail {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  min-height: 520px;
  padding: 16px;
}

.support-list {
  align-content: start;
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 190px);
  overflow-y: auto;
}

.support-row {
  border: 1px solid #e6ebf0;
  border-radius: 8px;
  color: #343a40;
  display: grid;
  gap: 4px;
  padding: 12px;
  text-decoration: none;
}

.support-row:hover,
.support-row.selected {
  background: #f8f9fa;
  border-color: #8bb9fe;
  color: #212529;
}

.support-row-top {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.support-row-top em,
.support-status {
  background: #e7f1ff;
  border-radius: 999px;
  color: #0d6efd;
  font-size: .76rem;
  font-style: normal;
  font-weight: 700;
  padding: 3px 8px;
}

.support-row small,
.support-row p {
  color: #6c757d;
}

.support-row p {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
}

.support-detail {
  display: grid;
  gap: 16px;
  grid-template-rows: auto minmax(260px, 1fr) auto;
}

.support-detail-head {
  align-items: flex-start;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding-bottom: 14px;
}

.support-detail-head h2 {
  font-size: 1.25rem;
  margin: 0;
}

.support-detail-head span:not(.support-status) {
  color: #6c757d;
}

.support-messages {
  align-content: start;
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 390px);
  overflow-y: auto;
}

.support-message {
  border: 1px solid #e6ebf0;
  border-radius: 8px;
  justify-self: start;
  max-width: 86%;
  padding: 10px 12px;
}

.support-message-user {
  background: #f8f9fa;
}

.support-message-bot,
.support-message-system {
  background: #fffdf7;
}

.support-message-admin {
  background: #e7f1ff;
  justify-self: end;
}

.support-message strong,
.support-message small {
  display: block;
}

.support-message p {
  margin: 4px 0;
  white-space: pre-wrap;
}

.support-message small {
  color: #6c757d;
  font-size: .78rem;
}

.support-reply {
  border-top: 1px solid #e9ecef;
  display: grid;
  gap: 10px;
  padding-top: 14px;
}

.support-empty {
  align-self: center;
  color: #6c757d;
  justify-self: center;
  max-width: 420px;
  text-align: center;
}

@media (max-width: 991.98px) {
  .live-columns {
    grid-template-columns: 1fr;
  }

  .live-event {
    grid-template-columns: 12px minmax(0, 1fr);
  }

  .live-event time {
    grid-column: 2;
  }

  .support-shell {
    grid-template-columns: 1fr;
  }

  .support-list,
  .support-messages {
    max-height: none;
  }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
