.isk-chat-widget {
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 1200;
  font-family: inherit;
}

#footer-wrap .to-feedback {
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.isk-chat-launcher {
  align-items: center;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #d9e1ea;
  border-radius: 999px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
  color: #111827;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  padding: 12px 15px;
}

.isk-chat-launcher__dot {
  background: #10b981;
  border-radius: 999px;
  display: inline-block;
  height: 8px;
  width: 8px;
}

.isk-chat-launcher__label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.isk-chat-launcher__badge {
  align-items: center;
  background: #111827;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  height: 18px;
  justify-content: center;
  min-width: 18px;
  padding: 0 5px;
}

.isk-chat-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  bottom: 64px;
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-direction: column;
  height: min(84vh, 740px);
  max-height: min(84vh, 740px);
  overflow: hidden;
  position: absolute;
  right: 0;
  width: min(360px, calc(100vw - 24px));
}

.isk-chat-panel__header {
  align-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border-bottom: 1px solid #e8edf3;
  display: flex;
  justify-content: space-between;
  padding: 10px 12px 9px;
}

.isk-chat-panel__item {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.isk-chat-panel__item-image {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  display: block;
  flex-shrink: 0;
  height: 46px;
  object-fit: cover;
  width: 46px;
}

.isk-chat-panel__title-wrap {
  min-width: 0;
}

.isk-chat-panel__eyebrow {
  color: #94a3b8;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.isk-chat-panel__identity {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.isk-chat-panel__item-title {
  color: #111827;
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
  max-width: 100%;
}

.isk-chat-panel__agent-name {
  color: #475569;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.isk-chat-panel__presence {
  align-items: center;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  color: #166534;
  display: inline-flex;
  flex-shrink: 0;
  gap: 5px;
  line-height: 1;
  padding: 4px 9px;
}

.isk-chat-panel__presence-dot {
  background: #10b981;
  border-radius: 999px;
  display: inline-block;
  height: 7px;
  width: 7px;
}

.isk-chat-panel__presence-text {
  color: inherit;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
}

.isk-chat-close {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  flex-shrink: 0;
  gap: 6px;
  height: 32px;
  justify-content: center;
  line-height: 1;
  padding: 0 10px;
  white-space: nowrap;
}

.isk-chat-close__label {
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.isk-chat-close__icon {
  font-size: 14px;
  line-height: 1;
}

.isk-chat-messages {
  background:
    radial-gradient(circle at top right, rgba(241, 245, 249, 0.9), transparent 32%),
    linear-gradient(180deg, #fafcff 0%, #f6f9fc 100%);
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
}

.isk-chat-message {
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  line-height: 1.4;
  max-width: 82%;
  padding: 9px 11px;
  white-space: pre-wrap;
  word-break: break-word;
}

.isk-chat-message--visitor {
  align-self: flex-end;
  background: linear-gradient(180deg, #18212f 0%, #111827 100%);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.18);
  color: #fff;
}

.isk-chat-message--operator {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 20px rgba(148, 163, 184, 0.08);
  color: #111827;
}

.isk-chat-message__meta {
  display: block;
  font-size: 9px;
  line-height: 1.2;
  margin-top: 0;
  opacity: 0.68;
}

.isk-chat-form {
  background: #ffffff;
  border-top: 1px solid #e8edf3;
  padding: 9px 10px 10px;
}

.isk-chat-form__label {
  display: none;
}

.isk-chat-form textarea {
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  box-shadow: none;
  font-size: 11px;
  line-height: 1.45;
  min-height: 72px;
  padding: 9px 11px;
  resize: none;
  width: 100%;
}

.isk-chat-form__actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  margin-top: 6px;
}

.isk-chat-form__error {
  color: #b24128;
  flex: 1 1 auto;
  font-size: 10px;
  line-height: 1.4;
  min-width: 0;
}

#isk-chat-send.btn.btn-primary {
  align-items: center;
  background: #1f8a4c !important;
  background-color: #1f8a4c !important;
  border: 1px solid #18723f !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  color: #ffffff !important;
  display: inline-flex !important;
  flex: 0 0 auto;
  font-size: 14px !important;
  font-weight: 600 !important;
  justify-content: center;
  letter-spacing: 0.01em;
  min-width: auto;
  padding: 0.82rem 1.48rem !important;
  white-space: nowrap;
  width: auto !important;
}

#isk-chat-send.btn.btn-primary:hover,
#isk-chat-send.btn.btn-primary:focus {
  background: #18723f !important;
  background-color: #18723f !important;
  border-color: #146136 !important;
  color: #ffffff !important;
}

#isk-chat-send.btn.btn-primary::before {
  content: none !important;
  display: none !important;
}

.isk-chat-empty {
  color: #64748b;
  font-size: 11px;
  line-height: 1.6;
  margin: auto 0;
  max-width: 240px;
}

.isk-chat-admin {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: grid;
  gap: 0;
  grid-template-columns: 300px 1fr;
  min-height: 640px;
  overflow: hidden;
}

.isk-chat-admin__sidebar {
  background: #fafbfc;
  border-right: 1px solid #e5e7eb;
  color: #111827;
  display: flex;
  flex-direction: column;
}

.isk-chat-admin__header,
.isk-chat-admin__thread-header,
.isk-chat-admin__composer {
  padding: 14px 16px;
}

.isk-chat-admin__header {
  border-bottom: 1px solid #e5e7eb;
}

.isk-chat-admin__eyebrow {
  color: #6b7280;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.isk-chat-admin__title {
  color: #111827;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.isk-chat-admin__header p {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.45;
  margin: 6px 0 0;
}

.isk-chat-admin__header-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.isk-chat-admin__header .btn {
  background: #111827;
  border: 0;
  box-shadow: none;
  color: #fff;
  font-size: 11px;
  padding: 0.68rem 0.9rem;
}

.isk-chat-admin__header .btn.is-offline {
  background: #475569;
}

.isk-chat-admin__live-state {
  align-items: center;
  background: #dcfce7;
  border-radius: 999px;
  color: #166534;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 8px 12px;
}

.isk-chat-admin__live-state.is-offline {
  background: #e5e7eb;
  color: #475569;
}

.isk-chat-admin__controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.isk-chat-admin__search {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  color: #111827;
  font-size: 12px;
  padding: 9px 11px;
  width: 100%;
}

.isk-chat-admin__search::placeholder {
  color: #9ca3af;
}

.isk-chat-admin__filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.isk-chat-admin__filters button {
  background: #f3f4f6;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #4b5563;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 9px;
}

.isk-chat-admin__filters button.is-active {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
}

.isk-chat-admin__list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 12px;
}

.isk-chat-admin__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.isk-chat-admin__group-head {
  align-items: center;
  color: #6b7280;
  display: flex;
  font-size: 10px;
  font-weight: 700;
  justify-content: space-between;
  letter-spacing: 0.08em;
  padding: 0 2px;
  text-transform: uppercase;
}

.isk-chat-admin__group-head span {
  background: #f3f4f6;
  border-radius: 999px;
  color: #4b5563;
  display: inline-flex;
  font-size: 11px;
  letter-spacing: 0;
  min-width: 22px;
  padding: 3px 7px;
}

.isk-chat-admin__group-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.isk-chat-admin__item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  color: #111827;
  cursor: pointer;
  padding: 10px 11px;
  position: relative;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease;
}

.isk-chat-admin__item:hover {
  border-color: #cbd5e1;
}

.isk-chat-admin__item.is-unread::before,
.isk-chat-admin__item.is-online::before {
  border-radius: 999px;
  content: '';
  left: 6px;
  position: absolute;
  top: 11px;
}

.isk-chat-admin__item.is-unread::before {
  background: #111827;
  height: 8px;
  width: 8px;
}

.isk-chat-admin__item.is-online::before {
  background: #10b981;
  height: 6px;
  top: 12px;
  width: 6px;
}

.isk-chat-admin__item.is-unread.is-online::before {
  background: #111827;
  height: 8px;
  top: 11px;
  width: 8px;
}

.isk-chat-admin__item.is-active {
  background: #f8fafc;
  border-color: #94a3b8;
}

.isk-chat-admin__item-title {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding-left: 12px;
}

.isk-chat-admin__item strong,
.isk-chat-admin__thread-header strong {
  color: inherit;
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.isk-chat-admin__item-route {
  color: #6b7280;
  display: block;
  font-size: 10px;
  line-height: 1.4;
  margin-top: 3px;
  padding-left: 12px;
  word-break: break-word;
}

.isk-chat-admin__item small,
.isk-chat-admin__meta,
.isk-chat-admin__thread-meta {
  color: inherit;
  display: block;
  font-size: 12px;
  line-height: 1.45;
}

.isk-chat-admin__item-meta {
  color: #6b7280;
  font-size: 11px;
  margin-top: 5px;
  padding-left: 12px;
}

.isk-chat-admin__item-preview {
  color: #374151;
  font-size: 11px;
  line-height: 1.4;
  margin-top: 6px;
  padding-left: 12px;
}

.isk-chat-admin__item-footer {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-top: 8px;
  padding-left: 12px;
}

.isk-chat-admin__unread-badge {
  align-items: center;
  background: #111827;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 9px;
  font-weight: 700;
  height: 16px;
  justify-content: center;
  min-width: 16px;
  padding: 0 5px;
}

.isk-chat-admin__pill {
  background: #f3f4f6;
  border-radius: 999px;
  color: #374151;
  display: inline-flex;
  font-size: 9px;
  font-weight: 600;
  padding: 3px 6px;
}

.isk-chat-admin__pill.is-offline {
  background: #f8fafc;
  color: #6b7280;
}

.isk-chat-admin__main {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.isk-chat-admin__thread-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.isk-chat-admin__thread-topline {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.isk-chat-admin__thread-topline strong {
  color: #111827;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

.isk-chat-admin__thread-badge {
  align-items: center;
  background: #ecfdf5;
  border: 1px solid #d1fae5;
  border-radius: 999px;
  color: #065f46;
  display: inline-flex;
  font-size: 10px;
  font-weight: 600;
  padding: 5px 9px;
}

.isk-chat-admin__thread-badge.is-offline {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #6b7280;
}

.isk-chat-admin__context-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

.isk-chat-admin__context-card {
  background: #fbfbfc;
  border: 1px solid #eceff3;
  border-radius: 8px;
  padding: 8px 10px;
}

.isk-chat-admin__context-card span {
  color: #6b7280;
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.isk-chat-admin__context-card strong,
.isk-chat-admin__context-card a {
  color: #111827;
  display: block;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  word-break: break-word;
}

.isk-chat-admin__thread {
  background: #f8fafc;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 14px 16px;
}

.isk-chat-admin__thread .isk-chat-message {
  border-radius: 8px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  gap: 3px;
  line-height: 1.45;
  max-width: min(58%, 460px);
  padding: 6px 8px;
}

.isk-chat-admin__thread .isk-chat-message--operator {
  background: #111827;
  color: #ffffff;
}

.isk-chat-admin__thread .isk-chat-message--visitor {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #111827;
}

.isk-chat-admin__thread .isk-chat-message__meta {
  font-size: 11px;
  line-height: 1.2;
  margin-top: 0;
  opacity: 0.64;
}

.isk-chat-admin__composer {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  box-shadow: none;
}

.isk-chat-admin__composer-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.isk-chat-admin__composer-head strong {
  color: #111827;
  font-size: 13px;
  font-weight: 600;
}

.isk-chat-admin__composer-head span {
  color: #6b7280;
  font-size: 11px;
}

.isk-chat-admin__templates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.isk-chat-admin__templates button {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  color: #374151;
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  padding: 5px 8px;
  text-align: left;
  transition: background 140ms ease, border-color 140ms ease;
}

.isk-chat-admin__templates button:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  box-shadow: none;
  transform: none;
}

.isk-chat-admin__composer textarea {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  box-shadow: none;
  font-size: 12px;
  min-height: 78px;
  padding: 9px 11px;
  resize: vertical;
  width: 100%;
}

.isk-chat-admin__composer-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 8px;
}

.isk-chat-admin__composer .btn {
  background: #111827;
  border: 0;
  box-shadow: none;
  color: #fff;
  font-size: 11px;
  padding: 0.68rem 0.9rem;
}

.isk-chat-admin__status {
  color: #6b7280;
  font-size: 11px;
  line-height: 1.45;
}

.isk-chat-admin__empty {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.6;
  padding: 16px;
}

.hidden {
  display: none !important;
}

@media (min-width: 768px) {
  .isk-chat-widget {
    right: 22px;
  }

  .isk-chat-panel {
    border-radius: 20px;
    height: 80vh;
    max-height: 80vh;
    width: 448px;
  }

  .isk-chat-panel__header {
    flex-shrink: 0;
    align-items: flex-start;
    padding: 7px 8px 5px;
  }

  .isk-chat-panel__eyebrow {
    display: none;
  }

  .isk-chat-panel__item {
    align-items: flex-start;
    gap: 6px;
  }

  .isk-chat-panel__title-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
    justify-content: flex-start;
  }

  .isk-chat-panel__item-image {
    border-radius: 9px;
    height: 44px;
    width: 44px;
  }

  .isk-chat-panel__item-title {
    font-size: 14px;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .isk-chat-panel__identity {
    align-items: flex-start;
    gap: 5px;
    margin-top: 0;
  }

  .isk-chat-panel__agent-name {
    font-size: 10px;
    line-height: 1;
  }

  .isk-chat-panel__presence {
    gap: 3px;
    padding: 2px 6px;
  }

  .isk-chat-panel__presence-dot {
    height: 7px;
    width: 7px;
  }

  .isk-chat-panel__presence-text {
    font-size: 10px;
    line-height: 1;
  }

  .isk-chat-close {
    gap: 0;
    align-self: flex-start;
    height: 22px;
    min-width: 22px;
    margin-top: 1px;
    padding: 0;
  }

  .isk-chat-close__label {
    display: none;
  }

  .isk-chat-close__icon {
    font-size: 12px;
  }

  .isk-chat-messages {
    flex: 1 1 auto;
    gap: 10px;
    min-height: 0;
    padding: 12px 12px 10px;
  }

  .isk-chat-message {
    max-width: 74%;
    font-size: 12px;
    padding: 10px 12px;
  }

  .isk-chat-form {
    flex-shrink: 0;
    padding: 5px 8px 3px;
  }

  .isk-chat-form textarea {
    min-height: 88px;
    padding: 9px 11px;
  }

  .isk-chat-form__actions {
    gap: 8px;
    margin-top: 4px;
  }

  .isk-chat-form__error {
    font-size: 9px;
  }

  #isk-chat-send.btn.btn-primary {
    font-size: 13px !important;
    padding: 0.56rem 1.02rem !important;
  }
}

@media (max-width: 991px) {
  .isk-chat-admin {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .isk-chat-admin__sidebar {
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
    max-height: none;
  }

  .isk-chat-admin__context-grid {
    grid-template-columns: 1fr 1fr;
  }

  .isk-chat-admin__group-head {
    padding-top: 4px;
  }
}

@media (max-width: 767px) {
  body.isk-chat-open {
    overflow: hidden;
  }

  .isk-chat-widget {
    bottom: 0;
    left: 0;
    right: 0;
  }

  .isk-chat-launcher {
    display: none;
  }

  .isk-chat-panel {
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
    border-right: 0;
    bottom: 0;
    height: 100svh;
    left: 0;
    max-height: 100svh;
    position: fixed;
    right: 0;
    top: 0;
    width: 100vw;
    z-index: 1400;
  }

  .isk-chat-panel__item {
    gap: 10px;
  }

  .isk-chat-panel__item-image {
    height: 48px;
    width: 48px;
  }

  .isk-chat-panel__header {
    padding: 6px 14px 10px;
  }

  .isk-chat-messages {
    padding: 14px;
  }

  .isk-chat-form {
    padding: 10px 12px 12px;
  }

  .isk-chat-form textarea {
    min-height: 92px;
  }

  .isk-chat-admin__context-grid {
    grid-template-columns: 1fr;
  }

  .isk-chat-admin__thread-topline,
  .isk-chat-admin__composer-head,
  .isk-chat-admin__composer-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .isk-chat-admin__thread .isk-chat-message {
    max-width: 100%;
  }
}
