/* Chat-only enhancements for the stable build. */

.cbk-chat-window {
  width: min(620px, calc(100vw - 1.5rem)) !important;
  height: min(700px, calc(100vh - 5rem)) !important;
  max-height: calc(100vh - 5rem) !important;
  border-radius: 18px !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  box-shadow:
    0 28px 70px rgba(15, 23, 42, 0.24),
    0 12px 24px rgba(8, 102, 255, 0.08) !important;
}

.cbk-chat-sidebar {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.92) 100%) !important;
}

.cbk-chat-thread {
  border: 1px solid transparent !important;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease !important;
}

.cbk-chat-thread:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(8, 102, 255, 0.12) !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06) !important;
}

.cbk-chat-thread-active {
  box-shadow: 0 12px 28px rgba(8, 102, 255, 0.15) !important;
}

.cbk-chat-avatar {
  position: relative !important;
  overflow: visible !important;
}

.cbk-chat-status-dot {
  position: absolute !important;
  right: -2px !important;
  bottom: -2px !important;
  width: 12px !important;
  height: 12px !important;
  border-radius: 999px !important;
  border: 2px solid #fff !important;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06) !important;
}

.cbk-chat-status-dot-head {
  width: 13px !important;
  height: 13px !important;
}

.cbk-chat-status-online {
  background: #22c55e !important;
  box-shadow:
    0 0 0 4px rgba(34, 197, 94, 0.14),
    0 0 16px rgba(34, 197, 94, 0.35) !important;
}

.cbk-chat-status-offline {
  background: #ef4444 !important;
  box-shadow:
    0 0 0 4px rgba(239, 68, 68, 0.1),
    0 0 14px rgba(239, 68, 68, 0.22) !important;
}

.cbk-chat-status-online-text {
  color: #16a34a !important;
  font-weight: 700 !important;
}

.cbk-chat-status-offline-text {
  color: #dc2626 !important;
  font-weight: 700 !important;
}

.cbk-chat-header {
  backdrop-filter: blur(10px) !important;
}

.cbk-chat-messages {
  background:
    radial-gradient(circle at top right, rgba(8, 102, 255, 0.06), transparent 25%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 100%) !important;
}

.cbk-chat-bubble {
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07) !important;
}

.cbk-chat-time {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
}

.cbk-chat-time-label {
  display: inline-block !important;
}

.cbk-chat-ticks {
  display: inline-flex !important;
  align-items: center !important;
  gap: 1px !important;
  letter-spacing: -1px !important;
  font-weight: 800 !important;
  font-size: 11px !important;
  line-height: 1 !important;
  opacity: 0.92 !important;
}

.cbk-chat-ticks-single {
  color: rgba(226, 232, 240, 0.92) !important;
}

.cbk-chat-ticks-double {
  color: #38bdf8 !important;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.18) !important;
}

.cbk-chat-composer {
  position: relative !important;
  padding: 12px !important;
  border-top: 1px solid rgba(148, 163, 184, 0.12) !important;
}

.cbk-chat-composer-row {
  align-items: flex-end !important;
  gap: 10px !important;
}

.cbk-chat-input {
  min-height: 76px !important;
  padding: 12px 14px !important;
  border-radius: 16px !important;
  line-height: 1.45 !important;
  resize: none !important;
  font-size: 14px !important;
}

.cbk-chat-emoji,
.cbk-chat-attach,
.cbk-chat-send {
  height: 42px !important;
  min-width: 42px !important;
  border-radius: 999px !important;
  padding: 0 11px !important;
}

.cbk-chat-emoji,
.cbk-chat-attach {
  background: #f8fafc !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
}

.cbk-chat-emoji:hover,
.cbk-chat-attach:hover {
  background: #eef6ff !important;
  border-color: rgba(8, 102, 255, 0.18) !important;
}

.cbk-chat-send {
  box-shadow: 0 12px 24px rgba(8, 102, 255, 0.24) !important;
}

.cbk-emoji-panel {
  position: absolute !important;
  left: 10px !important;
  bottom: 58px !important;
  z-index: 20 !important;
  width: min(320px, calc(100% - 20px)) !important;
  max-height: 210px !important;
  overflow-y: auto !important;
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 10px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow:
    0 22px 48px rgba(15, 23, 42, 0.18),
    0 8px 18px rgba(8, 102, 255, 0.08) !important;
  backdrop-filter: blur(10px) !important;
}

.cbk-emoji-button {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  font-size: 20px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  transition:
    transform 0.14s ease,
    background 0.14s ease,
    box-shadow 0.14s ease !important;
}

.cbk-emoji-button:hover {
  background: #e0f2fe !important;
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.12) !important;
  transform: translateY(-1px) scale(1.04) !important;
}

.cbk-chat-fab {
  box-shadow:
    0 18px 40px rgba(8, 102, 255, 0.28),
    0 0 0 8px rgba(8, 102, 255, 0.06) !important;
}

@media (max-width: 640px) {
  .cbk-chat-window {
    width: min(100vw - 0.75rem, 100%) !important;
    height: min(82vh, calc(100vh - 3rem)) !important;
  }

  .cbk-chat-input {
    min-height: 64px !important;
  }

  .cbk-emoji-panel {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}
