:root {
  --chat-bg: #fff8fa;
  --chat-card: #ffffff;
  --chat-soft: #fff0f4;
  --chat-primary: #d72f67;
  --chat-primary-dark: #b51f53;
  --chat-secondary: #8b5cf6;
  --chat-text: #26121a;
  --chat-muted: #765b65;
  --chat-border: #f1cbd8;
  --chat-danger: #b42318;
  --chat-danger-bg: #fff0ee;
  --chat-mine: linear-gradient(135deg, #d72f67, #e6497f);
  --chat-theirs: #ffffff;
  --chat-shadow: 0 18px 50px rgba(122, 35, 67, 0.11);
  --chat-radius-xl: 28px;
  --chat-radius-lg: 20px;
  --chat-radius-md: 14px;
  --chat-container: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Tajawal", Arial, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(255, 211, 225, 0.52), transparent 32%),
    radial-gradient(circle at bottom left, rgba(226, 214, 255, 0.48), transparent 30%),
    var(--chat-bg);
  color: var(--chat-text);
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.chat-container {
  width: min(calc(100% - 32px), var(--chat-container));
  margin-inline: auto;
}

/* التحميل */

.chat-loading {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(255, 248, 250, 0.97);
}

.chat-loading-card {
  width: min(100%, 360px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--chat-border);
  border-radius: var(--chat-radius-lg);
  background: var(--chat-card);
  box-shadow: var(--chat-shadow);
}

.chat-spinner {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 4px solid #f6ccd9;
  border-top-color: var(--chat-primary);
  border-radius: 50%;
  animation: chatSpin 0.8s linear infinite;
}

@keyframes chatSpin {
  to {
    transform: rotate(360deg);
  }
}

/* الهيدر */

.chat-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(215, 47, 103, 0.12);
  background: rgba(255, 248, 250, 0.93);
  backdrop-filter: blur(14px);
}

.chat-header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.chat-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.chat-brand-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffe0ea, #efe7ff);
  font-size: 24px;
}

.chat-brand > span:last-child {
  display: grid;
  gap: 2px;
}

.chat-brand strong {
  font-size: 20px;
  font-weight: 900;
}

.chat-brand small {
  color: var(--chat-muted);
  font-size: 13px;
  font-weight: 700;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* الأزرار */

.chat-btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.chat-btn:hover {
  transform: translateY(-2px);
}

.chat-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.chat-btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--chat-primary), #e7467d);
  box-shadow: 0 10px 24px rgba(215, 47, 103, 0.23);
}

.chat-btn-light {
  color: var(--chat-text);
  border-color: var(--chat-border);
  background: #ffffff;
}

.chat-btn-danger {
  color: var(--chat-danger);
  border-color: #ffd1ca;
  background: var(--chat-danger-bg);
}

/* الهيكل */

.chat-main {
  padding: 28px 0 50px;
}

.chat-shell {
  height: calc(100vh - 156px);
  min-height: 620px;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--chat-border);
  border-radius: var(--chat-radius-xl);
  background: var(--chat-card);
  box-shadow: var(--chat-shadow);
}

/* القائمة الجانبية */

.chat-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--chat-border);
  background: linear-gradient(180deg, #fffdfd, #fff6f8);
}

.chat-sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 22px 16px;
}

.chat-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--chat-primary);
  font-size: 13px;
  font-weight: 900;
}

.chat-sidebar-head h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
}

.chat-total-unread {
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding-inline: 8px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--chat-primary);
  font-size: 13px;
  font-weight: 900;
}

.chat-search-wrap {
  padding: 0 18px 16px;
}

.chat-search-wrap input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--chat-border);
  border-radius: 13px;
  outline: none;
  color: var(--chat-text);
  background: #ffffff;
  font-weight: 700;
}

.chat-search-wrap input:focus {
  border-color: var(--chat-primary);
  box-shadow: 0 0 0 4px rgba(215, 47, 103, 0.1);
}

.chat-conversations {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 10px 12px;
}

.chat-conversation-item {
  width: 100%;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 12px;
  border-radius: 16px;
  text-align: right;
  color: var(--chat-text);
  background: transparent;
  cursor: pointer;
  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

.chat-conversation-item:hover {
  background: #fff0f4;
}

.chat-conversation-item.active {
  background: linear-gradient(135deg, #ffe4ec, #f4ecff);
}

.chat-conversation-photo {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #ffffff;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffe0ea, #eee8ff);
  box-shadow: 0 6px 18px rgba(104, 38, 64, 0.1);
}

.chat-conversation-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-conversation-photo span {
  font-size: 24px;
}

.chat-conversation-meta {
  min-width: 0;
}

.chat-conversation-meta strong {
  display: block;
  overflow: hidden;
  margin-bottom: 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 900;
}

.chat-conversation-meta p {
  overflow: hidden;
  margin: 0;
  color: var(--chat-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.chat-conversation-side {
  min-width: 48px;
  display: grid;
  justify-items: end;
  gap: 7px;
}

.chat-conversation-time {
  color: #987682;
  font-size: 11px;
  font-weight: 700;
}

.chat-unread-badge {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  padding-inline: 6px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--chat-primary);
  font-size: 11px;
  font-weight: 900;
}

.chat-sidebar-empty {
  margin: auto;
  padding: 28px 22px;
  text-align: center;
}

.chat-sidebar-empty > span {
  display: block;
  margin-bottom: 10px;
  font-size: 48px;
}

.chat-sidebar-empty h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.chat-sidebar-empty p {
  margin: 0 0 18px;
  color: var(--chat-muted);
  line-height: 1.8;
}

/* لوحة المحادثة */

.chat-panel {
  min-width: 0;
  min-height: 0;
  position: relative;
  background:
    linear-gradient(rgba(255, 252, 253, 0.92), rgba(255, 252, 253, 0.92)),
    radial-gradient(circle at top right, #ffe9f0, transparent 36%);
}

.chat-placeholder {
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 30px;
  text-align: center;
}

.chat-placeholder > span {
  display: block;
  margin-bottom: 12px;
  font-size: 72px;
}

.chat-placeholder h2 {
  margin: 0 0 9px;
  font-size: 30px;
  font-weight: 900;
}

.chat-placeholder p {
  max-width: 480px;
  margin: 0;
  color: var(--chat-muted);
  line-height: 1.9;
}

.chat-active {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.chat-member-head {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--chat-border);
  background: rgba(255, 255, 255, 0.92);
}

.chat-back-mobile {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  color: var(--chat-text);
  background: #fff0f4;
  cursor: pointer;
  font-size: 22px;
  font-weight: 900;
}

.chat-member-photo {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 17px;
  background: linear-gradient(135deg, #ffe0ea, #eee8ff);
}

.chat-member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-member-photo span {
  font-size: 23px;
}

.chat-member-meta {
  min-width: 0;
  flex: 1;
}

.chat-member-meta strong {
  display: block;
  overflow: hidden;
  margin-bottom: 3px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 900;
}

.chat-member-meta small {
  display: block;
  overflow: hidden;
  color: var(--chat-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.chat-profile-link {
  flex: 0 0 auto;
}

.chat-messages {
  min-height: 0;
  overflow-y: auto;
  padding: 24px 22px;
}

.chat-message-row {
  display: flex;
  margin-bottom: 13px;
}

.chat-message-row.mine {
  justify-content: flex-start;
}

.chat-message-row.theirs {
  justify-content: flex-end;
}

.chat-message {
  max-width: min(74%, 620px);
  padding: 12px 15px 9px;
  border-radius: 18px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  line-height: 1.75;
  box-shadow: 0 7px 18px rgba(106, 40, 66, 0.08);
}

.chat-message-row.mine .chat-message {
  border-bottom-right-radius: 6px;
  color: #ffffff;
  background: var(--chat-mine);
}

.chat-message-row.theirs .chat-message {
  border: 1px solid var(--chat-border);
  border-bottom-left-radius: 6px;
  color: var(--chat-text);
  background: var(--chat-theirs);
}

.chat-message-text {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.chat-message-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 5px;
  opacity: 0.78;
  font-size: 10px;
  font-weight: 700;
}

.chat-messages-loading,
.chat-no-messages {
  position: absolute;
  inset: 82px 0 86px;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 24px;
  text-align: center;
}

.chat-no-messages > span {
  font-size: 50px;
}

.chat-no-messages h3 {
  margin: 10px 0 7px;
  font-size: 23px;
  font-weight: 900;
}

.chat-no-messages p {
  max-width: 400px;
  margin: 0;
  color: var(--chat-muted);
  line-height: 1.8;
}

/* إدخال الرسالة */

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px 16px 10px;
  border-top: 1px solid var(--chat-border);
  background: #ffffff;
}

.chat-composer textarea {
  width: 100%;
  min-height: 48px;
  max-height: 150px;
  resize: none;
  padding: 12px 14px;
  border: 1px solid var(--chat-border);
  border-radius: 15px;
  outline: none;
  color: var(--chat-text);
  background: #fffafb;
  line-height: 1.55;
  font-weight: 700;
}

.chat-composer textarea:focus {
  border-color: var(--chat-primary);
  box-shadow: 0 0 0 4px rgba(215, 47, 103, 0.1);
}

.chat-send-btn {
  min-width: 92px;
  min-height: 48px;
  align-self: end;
  padding: 11px 18px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--chat-primary), #e7467d);
  box-shadow: 0 10px 22px rgba(215, 47, 103, 0.23);
  cursor: pointer;
  font-weight: 900;
}

.chat-send-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.chat-composer-note {
  padding: 0 18px 11px;
  color: #8b6d78;
  background: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

/* الخطأ والتوست */

.chat-error {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.chat-error-card {
  width: min(100%, 500px);
  padding: 36px;
  border: 1px solid var(--chat-border);
  border-radius: var(--chat-radius-xl);
  text-align: center;
  background: #ffffff;
  box-shadow: var(--chat-shadow);
}

.chat-error-card > span {
  display: block;
  margin-bottom: 12px;
  font-size: 56px;
}

.chat-error-card h1 {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 900;
}

.chat-error-card p {
  margin: 0 0 22px;
  color: var(--chat-muted);
  line-height: 1.8;
}

.chat-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 500;
  max-width: min(420px, calc(100% - 44px));
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 18px;
  border: 1px solid var(--chat-border);
  border-radius: 15px;
  background: #ffffff;
  box-shadow: var(--chat-shadow);
}

.chat-toast p {
  margin: 0;
  font-weight: 800;
}

/* تابلت */

@media (max-width: 960px) {
  .chat-shell {
    grid-template-columns: 310px minmax(0, 1fr);
  }

  .chat-message {
    max-width: 82%;
  }
}

/* موبايل */

@media (max-width: 760px) {
  .chat-container {
    width: 100%;
  }

  .chat-header-inner {
    min-height: auto;
    padding: 12px;
  }

  .chat-header-actions .chat-btn {
    padding-inline: 11px;
    font-size: 13px;
  }

  .chat-main {
    padding: 0;
  }

  .chat-shell {
    height: calc(100vh - 72px);
    min-height: 0;
    grid-template-columns: 1fr;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .chat-sidebar {
    border-left: 0;
  }

  .chat-panel {
    display: none;
  }

  .chat-shell.mobile-chat-open .chat-sidebar {
    display: none;
  }

  .chat-shell.mobile-chat-open .chat-panel {
    display: block;
    height: 100%;
  }

  .chat-back-mobile {
    display: grid;
  }

  .chat-profile-link {
    padding-inline: 10px;
    font-size: 12px;
  }

  .chat-message {
    max-width: 88%;
  }

  .chat-composer {
    grid-template-columns: minmax(0, 1fr) 78px;
    padding-inline: 10px;
  }

  .chat-send-btn {
    min-width: 78px;
    padding-inline: 10px;
  }

  .chat-messages {
    padding: 18px 12px;
  }
}

@media (max-width: 460px) {
  .chat-brand-icon {
    width: 42px;
    height: 42px;
  }

  .chat-brand strong {
    font-size: 17px;
  }

  .chat-header-actions {
    gap: 6px;
  }

  .chat-btn {
    min-height: 42px;
  }

  .chat-member-head {
    padding-inline: 10px;
  }

  .chat-member-photo {
    width: 46px;
    height: 46px;
  }

  .chat-message {
    max-width: 93%;
  }
}

/* =========================================================
   ZAWAJ VIP — PREMIUM CHAT FINAL
   نفس هوية لوحة المستخدم والمفضلة والإشعارات
   ========================================================= */

body {
  color: #34202b !important;

  background:
    radial-gradient(
      circle at 92% 8%,
      rgba(222, 62, 124, 0.21),
      transparent 30%
    ),
    radial-gradient(
      circle at 7% 38%,
      rgba(104, 73, 201, 0.16),
      transparent 29%
    ),
    linear-gradient(
      135deg,
      #fff0f6 0%,
      #f5ecff 35%,
      #eaf9f7 69%,
      #fff3df 100%
    ) !important;

  font-family:
    "IBM Plex Sans Arabic",
    system-ui,
    sans-serif !important;
}

/* الهيدر */

.chat-header {
  background:
    linear-gradient(
      90deg,
      #ffe0ec,
      #eee7ff,
      #dcf5f1
    ) !important;

  border-bottom:
    2px solid rgba(163, 78, 116, 0.2) !important;
}

.chat-brand strong,
.chat-page-title,
.chat-sidebar h1,
.chat-sidebar h2 {
  color: #8f214d !important;
}

/* الهيكل */

.chat-shell {
  overflow: hidden !important;

  border:
    2px solid rgba(163, 78, 116, 0.21) !important;

  border-radius: 30px !important;

  background:
    linear-gradient(
      135deg,
      #ffe5ef,
      #eee8ff,
      #e0f7f3
    ) !important;

  box-shadow:
    0 24px 65px rgba(93, 34, 63, 0.17) !important;
}

.chat-sidebar {
  background:
    linear-gradient(
      180deg,
      #ffe4ee,
      #f1eaff,
      #e3f7f4
    ) !important;

  border-left:
    2px solid rgba(163, 78, 116, 0.18) !important;
}

.chat-main,
.chat-active {
  background:
    linear-gradient(
      150deg,
      #fff0f5,
      #f3edff,
      #e7f9f6
    ) !important;
}

/* قائمة المحادثات */

.chat-conversation-item {
  margin-bottom: 10px !important;

  border:
    2px solid rgba(151, 61, 101, 0.13) !important;

  border-radius: 19px !important;

  background:
    linear-gradient(
      135deg,
      #ffdce8,
      #eee7ff
    ) !important;

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease !important;
}

.chat-conversation-item:hover {
  transform: translateY(-2px);

  box-shadow:
    0 13px 29px rgba(93, 34, 63, 0.13) !important;
}

.chat-conversation-item.active {
  border-color:
    rgba(104, 73, 201, 0.33) !important;

  background:
    linear-gradient(
      135deg,
      #dcd2ff,
      #ffd9e6,
      #d9f5f0
    ) !important;

  box-shadow:
    0 15px 34px rgba(88, 59, 167, 0.18) !important;
}

.chat-conversation-meta strong {
  color: #8f214d !important;
  font-size: 17px !important;
}

.chat-conversation-meta p {
  color: #604754 !important;
  font-size: 14px !important;
}

.chat-unread-badge {
  color: #fff !important;

  background:
    linear-gradient(
      135deg,
      #8f214d,
      #df3c77
    ) !important;
}

/* رأس المحادثة */

.chat-member-head {
  min-height: 92px !important;
  padding: 15px 20px !important;

  background:
    linear-gradient(
      90deg,
      #ffe0ec,
      #eee7ff,
      #dff6f2
    ) !important;

  border-bottom:
    2px solid rgba(163, 78, 116, 0.18) !important;
}

.chat-member-meta strong {
  color: #8f214d !important;
  font-size: 21px !important;
}

.chat-member-meta small {
  color: #075e59 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.chat-profile-link {
  color: #49328f !important;
  background: #e2daff !important;

  border:
    2px solid rgba(104, 73, 201, 0.22) !important;
}

/* منطقة الرسائل */

.chat-messages {
  min-height: 360px !important;

  display: flex !important;
  flex-direction: column !important;
  gap: 13px !important;

  overflow-y: auto !important;

  padding: 24px !important;

  background:
    radial-gradient(
      circle at 90% 10%,
      rgba(232, 75, 131, 0.09),
      transparent 28%
    ),
    radial-gradient(
      circle at 8% 85%,
      rgba(104, 73, 201, 0.09),
      transparent 27%
    ),
    linear-gradient(
      145deg,
      #fff1f6,
      #f6f0ff,
      #ebfaf7
    ) !important;
}

/* الإصلاح النهائي لحجم الرسائل */

.chat-message-row {
  width: 100% !important;
  min-height: 0 !important;

  display: flex !important;
  align-items: flex-end !important;

  margin: 0 !important;
  padding: 0 !important;
}

.chat-message-row.mine {
  justify-content: flex-start !important;
}

.chat-message-row.theirs {
  justify-content: flex-end !important;
}

.chat-message {
  width: fit-content !important;
  min-width: 90px !important;
  max-width: min(65%, 680px) !important;

  height: auto !important;
  min-height: 0 !important;

  display: block !important;

  padding: 12px 16px 9px !important;

  border-radius: 20px !important;

  box-shadow:
    0 11px 25px rgba(75, 28, 49, 0.12) !important;
}

.chat-message-row.mine .chat-message {
  color: #fff !important;

  background:
    linear-gradient(
      135deg,
      #a72658,
      #df3975,
      #ed6598
    ) !important;

  border-bottom-right-radius: 7px !important;
}

.chat-message-row.theirs .chat-message {
  color: #39232e !important;

  background:
    linear-gradient(
      135deg,
      #ded6ff,
      #e9f8f5
    ) !important;

  border:
    1px solid rgba(104, 73, 201, 0.18) !important;

  border-bottom-left-radius: 7px !important;
}

.chat-message-text {
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;

  margin: 0 !important;

  color: inherit !important;

  font-size: 17px !important;
  font-weight: 600 !important;
  line-height: 1.75 !important;

  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.chat-message-meta {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;

  margin-top: 5px !important;

  color: inherit !important;
  opacity: 0.78 !important;

  font-size: 11px !important;
  line-height: 1.2 !important;
}

/* صندوق الكتابة */

.chat-composer {
  position: relative !important;

  display: grid !important;
  grid-template-columns:
    auto auto minmax(0, 1fr) auto !important;
  align-items: end !important;
  gap: 9px !important;

  padding: 14px 16px !important;

  background:
    linear-gradient(
      90deg,
      #ffe1eb,
      #eee7ff,
      #def6f2
    ) !important;

  border-top:
    2px solid rgba(163, 78, 116, 0.17) !important;
}

.chat-composer textarea {
  width: 100% !important;
  min-height: 54px !important;
  max-height: 150px !important;

  padding: 14px 17px !important;

  color: #34202b !important;
  background: #f7eaf3 !important;

  border:
    2px solid rgba(143, 33, 77, 0.2) !important;

  border-radius: 17px !important;

  font-size: 17px !important;
  font-weight: 600 !important;
}

.chat-composer textarea:focus {
  border-color: #6849c9 !important;

  box-shadow:
    0 0 0 5px rgba(104, 73, 201, 0.12) !important;
}

.chat-send-btn {
  min-width: 105px !important;
  min-height: 54px !important;

  color: #fff !important;

  background:
    linear-gradient(
      135deg,
      #8f214d,
      #df3975
    ) !important;

  border: 0 !important;
  border-radius: 16px !important;

  box-shadow:
    0 12px 28px rgba(174, 44, 96, 0.25) !important;

  font-size: 17px !important;
  font-weight: 700 !important;
}

.chat-composer-note {
  color: #715662 !important;
  background: #f5e8f1 !important;

  font-size: 13px !important;
  font-weight: 600 !important;
}

/* أدوات الشات */

.chat-premium-action {
  width: 50px;
  height: 50px;

  display: grid;
  place-items: center;

  padding: 0;

  border:
    2px solid rgba(104, 73, 201, 0.2);
  border-radius: 15px;

  color: #49328f;
  background: #e4ddff;

  font-size: 23px;
}

.chat-premium-action.is-active {
  color: #fff;
  background:
    linear-gradient(135deg, #49328f, #856de0);
}

.chat-emoji-panel {
  position: absolute;
  right: 15px;
  bottom: calc(100% + 10px);
  z-index: 100;

  width: min(390px, calc(100vw - 40px));
  max-height: 290px;

  overflow-y: auto;

  display: grid;
  grid-template-columns:
    repeat(8, minmax(0, 1fr));
  gap: 7px;

  padding: 14px;

  border:
    2px solid rgba(163, 78, 116, 0.2);
  border-radius: 22px;

  background:
    linear-gradient(
      145deg,
      #ffe2ec,
      #eee7ff,
      #def6f2
    );

  box-shadow:
    0 25px 65px rgba(69, 22, 42, 0.24);
}

.chat-emoji-panel button {
  width: 39px;
  height: 39px;

  display: grid;
  place-items: center;

  border: 0;
  border-radius: 11px;

  background: rgba(255,255,255,0.42);

  font-size: 23px;
}

.chat-emoji-panel button:hover {
  transform: scale(1.12);
  background: #ffd8e6;
}

.chat-header-actions-premium {
  display: flex;
  align-items: center;
  gap: 7px;

  margin-inline-start: auto;
}

.chat-pin-button,
.chat-block-button,
.chat-dashboard-button {
  min-height: 46px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  padding: 9px 13px;

  border-radius: 14px;

  font-size: 14px;
  font-weight: 700;
}

.chat-dashboard-button {
  color: #075e59;
  background: #d9f4ef;

  border:
    2px solid rgba(8, 127, 119, 0.2);
}

.chat-pin-button {
  color: #49328f;
  background: #e4ddff;

  border:
    2px solid rgba(104, 73, 201, 0.2);
}

.chat-pin-button.is-pinned {
  color: #74490b;
  background: #ffe7aa;

  border-color:
    rgba(195, 138, 39, 0.27);
}

.chat-block-button {
  color: #922b41;
  background: #ffd8df;

  border:
    2px solid rgba(202, 55, 81, 0.2);
}

@media (max-width: 800px) {
  .chat-message {
    max-width: 84% !important;
  }

  .chat-messages {
    padding: 15px !important;
  }

  .chat-composer {
    grid-template-columns:
      auto auto minmax(0, 1fr) !important;
  }

  .chat-send-btn {
    grid-column: 1 / -1;
    width: 100% !important;
  }

  .chat-member-head {
    flex-wrap: wrap !important;
  }

  .chat-header-actions-premium {
    width: 100%;
    margin: 8px 0 0;
  }
}
