
/* override.css — kocmoc UI polish & layout tweaks */

/* Keep primary color consistent with palette */
:root {
  --primary: #7C3AED;
}

/* ===== Base buttons ===== */
button,
.btn,
.button {
  background: linear-gradient(135deg, #7C3AED, #8B5CF6) !important;
  color: #ffffff !important;
  border: none !important;
  padding: 10px 18px !important;
  border-radius: 999px !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.35);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.2s ease,
    opacity 0.2s ease !important;
  border-width: 0 !important;
}

button i,
.btn i {
  font-size: 14px;
}

button:hover,
.btn:hover,
.button:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 14px 30px rgba(124, 58, 237, 0.4) !important;
}

button:active,
.btn:active,
.button:active {
  transform: translateY(0) !important;
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.3) !important;
}

button:disabled,
.btn:disabled,
.button:disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

/* Ghost / icon buttons (like switch account, small icons) */
.icon-btn,
.switch-account-btn,
.mobile-header-btn,
.chat-header-btn {
  background: rgba(124, 58, 237, 0.08) !important;
  border-radius: 999px !important;
  padding: 8px 10px !important;
  box-shadow: none !important;
  border: 1px solid rgba(124, 58, 237, 0.16) !important;
  color: #4c1d95 !important;
}

.icon-btn:hover,
.switch-account-btn:hover,
.mobile-header-btn:hover,
.chat-header-btn:hover {
  background: rgba(124, 58, 237, 0.15) !important;
  transform: translateY(-1px) !important;
}

/* Auth tabs & main action */
.auth-tab {
  background: transparent !important;
  border-radius: 999px !important;
  padding: 8px 14px !important;
  box-shadow: none !important;
  font-weight: 600 !important;
  color: var(--light-text) !important;
}

.auth-tab.active {
  background: rgba(124, 58, 237, 0.08) !important;
  color: #4c1d95 !important;
}

/* Primary CTA on auth screen */
.auth-submit-btn,
#loginSubmitBtn,
#registerSubmitBtn {
  width: 100%;
  justify-content: center;
}

/* ===== Message input bar ===== */
.message-input-container {
  background: #f9fafb;
  border-radius: 16px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.35);
  margin: 8px 16px 16px;
}

.message-input-wrapper {
  flex: 1;
  border-radius: 12px;
  overflow: hidden;
}

.message-input {
  border-radius: 12px;
  border: none;
  background: transparent;
  padding: 10px 0;
  resize: none;
}

/* Emoji / attach / mic / send buttons */
.emoji-btn,
.attachment-btn,
.send-btn,
.voice-message-btn {
  font-size: 18px;
  cursor: pointer;
  border-radius: 999px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: transparent;
  color: var(--primary-color);
  transition:
    background 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.emoji-btn:hover,
.attachment-btn:hover {
  background: rgba(148, 163, 184, 0.16);
  transform: translateY(-1px);
}

.send-btn {
  background: linear-gradient(135deg, #7C3AED, #8B5CF6);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.45);
}

.send-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(124, 58, 237, 0.55);
}

.send-btn:disabled {
  background: rgba(148, 163, 184, 0.6);
  box-shadow: none;
}

/* Mic button idle state */
.voice-message-btn {
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: #ffffff;
  color: #4b5563;
}

.voice-message-btn:hover {
  background: rgba(248, 250, 252, 1);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(148, 163, 184, 0.35);
}

/* Mic button while recording */
.voice-message-btn.recording {
  background: #fee2e2;
  color: #b91c1c;
  border-color: rgba(248, 113, 113, 0.9);
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.45);
  animation: pulse 1.1s ease-in-out infinite;
}

/* Hide "dot" pseudo-element from base CSS so иконка не дублируется */
.voice-message-btn.recording::before {
  content: '';
}

/* Emoji panel */
.emoji-panel {
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  border-radius: 18px;
}

/* ===== Chat list & layout polish ===== */
.chat-item {
  border-radius: 16px;
  padding: 12px 12px;
  margin-bottom: 6px;
}

.chat-item:hover {
  transform: translateY(-1px);
}

.chat-item.active {
  background: rgba(124, 58, 237, 0.10);
  border: 1px solid rgba(124, 58, 237, 0.18);
}

.chat-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

/* Chat header actions */
.chat-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-actions button {
  background: rgba(248, 250, 252, 1) !important;
  color: #4b5563 !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  border: 1px solid rgba(148, 163, 184, 0.6) !important;
}

.chat-actions button:hover {
  background: rgba(209, 213, 219, 0.45) !important;
}

/* Message bubbles spacing tweak */
.message {
  margin-bottom: 6px;
}

/* ===== Voice recorder bar ===== */
.voice-recorder {
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(18px);
}

.voice-recorder-content {
  border-radius: 20px;
  padding: 14px 18px;
}

.voice-recorder-actions button {
  min-width: 120px;
}

/* Cancel / send buttons in recorder */
.voice-recorder-cancel {
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(148, 163, 184, 0.7) !important;
  box-shadow: none !important;
}

.voice-recorder-cancel:hover {
  background: rgba(31, 41, 55, 1) !important;
}

.voice-recorder-send {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.55) !important;
}

/* ===== Mobile bottom nav ===== */
.mobile-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 -8px 25px rgba(15, 23, 42, 0.16);
}

.mobile-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 10px;
}

.mobile-nav-item {
  flex: 1;
  text-align: center;
  padding: 6px 0;
  border-radius: 999px;
  margin: 0 4px;
  color: #6b7280;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.mobile-nav-item.active {
  background: rgba(124, 58, 237, 0.12);
  color: #4c1d95;
  transform: translateY(-1px);
}

/* ===== Inputs & focus ===== */
input,
textarea,
select {
  background: #f9fafb;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 8px 10px;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(124, 58, 237, 0.4);
  outline-offset: 1px;
  border-color: rgba(124, 58, 237, 0.7);
}

/* Quick-login card slight polish */
.quick-login-container {
  backdrop-filter: blur(18px);
}

/* Small utility: hide scrollbar for textarea in most browsers */
.message-input::-webkit-scrollbar {
  display: none;
}
.message-input {
  -ms-overflow-style: none;
  scrollbar-width: none;
}


/* Remove legacy pseudo-element icons to avoid "двойных" эмодзи и значков */
.emoji-btn::before,
.emoji-btn::after,
.attachment-btn::before,
.attachment-btn::after,
.voice-message-btn::before,
.voice-message-btn::after,
.send-btn::before,
.send-btn::after {
  content: none !important;
}

/* На всякий случай убираем спец‑эмодзи "in-progress" */
.emoji-btn.in-progress::before,
.emoji-btn.in-progress::after {
  content: none !important;
}


/* --- Message reactions bar & context menu (Telegram-like, in Kocmoc palette) --- */

.message-content {
  position: relative;
}

.message-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.8;
}

.message-reactions-bar {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
}

.message:hover .message-reactions-bar,
.message.my-message:hover .message-reactions-bar,
.message:focus-within .message-reactions-bar {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.message-reaction-btn {
  border: none;
  background: rgba(15, 23, 42, 0.88);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.75);
}

.message-reaction-btn.active {
  background: radial-gradient(circle at 30% 0, #f97316, #7C3AED);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.7);
}

/* Контекстное меню сообщения */

.message-context-menu {
  position: fixed;
  z-index: 9999;
  min-width: 210px;
  max-width: 240px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(14px);
  transform: scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.message-context-menu.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.message-context-item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 14px;
  padding: 7px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.message-context-item:hover {
  background: rgba(55, 65, 81, 0.8);
}

/* Чуть больше “захвата” для свайпов на мобильных */
@media (max-width: 768px) {
  .message {
    touch-action: pan-y;
  }
}
