* {
  box-sizing: border-box;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  letter-spacing: 0.2px;
  line-height: 1.6;
  margin: 0;
}

.wrapper {
  width: 100%;
  max-width: none;
  margin: 0;
}

.form header,
.users header .title,
.chat-area header .details span {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.2px;
}

.form form .error-text {
  display: none;
}

.form .field i {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  cursor: pointer;
}

.form .field i.active::before {
  color: #0f172a;
  content: "\f070";
}

.users-list,
.chat-box {
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.25) transparent;
}

.users-list::-webkit-scrollbar,
.chat-box::-webkit-scrollbar {
  width: 6px;
}

.users-list::-webkit-scrollbar-thumb,
.chat-box::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.2);
  border-radius: 999px;
}

.users-list a {
  display: block;
  border-radius: 18px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.users-list a:hover {
  transform: translateY(-1px);
  border-color: #cbd5f5;
  box-shadow: 0 10px 25px -20px rgba(15, 23, 42, 0.35);
}

.users-list a .status-dot {
  font-size: 10px;
  color: #12b981;
}

.users-list a .status-dot.offline {
  color: #cbd5e1;
}

.users-list {
  max-height: 520px;
  overflow-y: auto;
}

.users .search button.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.users .search button.active i::before {
  content: "\f00d";
}

.chat-box {
  min-height: 50vh;
  max-height: 60vh;
  overflow-y: auto;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 18px;
}

.chat-box .text {
  text-align: center;
  color: #64748b;
  padding: 18px;
}

.chat-box .chat {
  margin: 14px 0;
  display: flex;
}

.chat-box .outgoing {
  justify-content: flex-end;
}

.chat-box .incoming {
  justify-content: flex-start;
  align-items: flex-end;
  gap: 8px;
}

.chat-box .chat .details {
  max-width: 75%;
}

.chat-box .chat .bubble {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-box .outgoing .bubble {
  flex-direction: row-reverse;
}

.chat-box .chat p {
  word-wrap: break-word;
  padding: 12px 14px;
  border-radius: 18px;
  box-shadow: 0 14px 30px -24px rgba(15, 23, 42, 0.6);
  line-height: 1.5;
}

.outgoing .details p {
  background: #0f766e;
  color: #ffffff;
  border-radius: 18px 18px 6px 18px;
}

.incoming .details p {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 18px 18px 18px 6px;
}

.chat .delete-btn {
  border: none;
  background: transparent;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background 0.2s ease;
}

.chat .delete-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.chat .seen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 12px;
  transition: color 0.2s ease, background 0.2s ease;
}

.chat .seen-off {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.15);
}

.chat .seen-on {
  color: #0f766e;
  background: rgba(45, 212, 191, 0.18);
}

.chat-box .incoming img.profile-img {
  height: 36px;
  width: 36px;
  border-radius: 999px;
  border: 2px solid #e2e8f0;
}

.chat .chat-image {
  max-width: 260px;
  max-height: 260px;
  border-radius: 14px;
  display: block;
  margin-top: 8px;
  border: 1px solid #e2e8f0;
}

.chat-file {
  display: inline-block;
  margin-top: 8px;
  color: #0f766e;
  font-weight: 600;
  text-decoration: none;
}

.chat-file:hover {
  text-decoration: underline;
}

.chat-audio {
  display: block;
  margin-top: 8px;
  max-width: 260px;
  width: 100%;
}

.chat-video {
  display: block;
  margin-top: 8px;
  max-width: 260px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}

.time {
  font-size: 0.75rem;
  color: #94a3b8;
  display: block;
  text-align: right;
  margin-top: 6px;
}

.attach-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  color: #64748b;
  background: #ffffff;
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.attach-icon:hover {
  transform: translateY(-1px);
  color: #0f766e;
  border-color: #99f6e4;
}

.voice-btn.recording {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}

.emoji-panel .emoji {
  border: none;
  background: transparent;
  font-size: 1.1rem;
  line-height: 1;
  padding: 6px;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.emoji-panel .emoji:hover {
  background: rgba(15, 23, 42, 0.08);
}

.typing-area button {
  opacity: 0.6;
  pointer-events: none;
}

.typing-area button.active {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 768px) {
  .chat-box {
    min-height: 55vh;
    max-height: 65vh;
  }
}
