.mentions-suggest {
  position: absolute;
  z-index: 10000;
  min-width: 280px;
  max-width: 360px;
  max-height: 320px;
  overflow: hidden;
  direction: rtl;
  background: #12253a;
  border: 1px solid rgba(212, 167, 41, 0.7);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
  color: #fff;
  font: 13px Tahoma, Arial, sans-serif;
}

.mentions-suggest[hidden] {
  display: none;
}

.mentions-results {
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
}

.mentions-warning {
  padding: 10px 14px;
  background: rgba(212, 167, 41, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #f8dd8d;
  line-height: 1.6;
}

.mentions-user-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: right;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.mentions-user-button:hover,
.mentions-user-button.is-active {
  background: rgba(212, 167, 41, 0.2);
}

.mention-user-text {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mention-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mention-meta {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mention-avatar-wrap {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mention-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mention-group-badge {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #f8dd8d;
  background: linear-gradient(180deg, rgba(212, 167, 41, 0.16) 0%, rgba(212, 167, 41, 0.08) 100%);
}

.mentions-editor-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(212, 167, 41, 0.34);
  background: rgba(212, 167, 41, 0.12);
  color: #7a5614;
  font-family: Vazir, Tahoma, Arial, sans-serif;
  white-space: nowrap;
}

.mentions-empty {
  padding: 14px;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.mentions-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 11, 18, 0.74);
  backdrop-filter: blur(4px);
}

.mentions-modal[hidden] {
  display: none;
}

.mentions-modal-dialog {
  width: min(720px, 100%);
  max-height: min(84vh, 860px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  direction: rtl;
  color: #fff;
  font-family: Vazir, Tahoma, Arial, sans-serif;
  border-radius: 22px;
  border: 1px solid rgba(212, 167, 41, 0.35);
  background:
    radial-gradient(circle at top right, rgba(212, 167, 41, 0.14), transparent 28%),
    linear-gradient(180deg, #13283f 0%, #0b1624 100%);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

.mentions-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mentions-modal-heading {
  min-width: 0;
}

.mentions-modal-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
}

.mentions-modal-subtitle {
  margin-top: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

.mentions-modal-close {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.mentions-modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.mentions-modal-warning {
  margin: 16px 24px 0;
  border: 1px solid rgba(212, 167, 41, 0.2);
  border-radius: 12px;
}

.mentions-modal-tabs {
  display: flex;
  gap: 10px;
  padding: 16px 24px 0;
}

.mentions-modal-tab {
  min-width: 110px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  font: 14px Vazir, Tahoma, Arial, sans-serif;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.mentions-modal-tab:hover {
  border-color: rgba(212, 167, 41, 0.34);
  color: #fff;
}

.mentions-modal-tab.is-active {
  border-color: rgba(212, 167, 41, 0.62);
  background: rgba(212, 167, 41, 0.16);
  color: #f8dd8d;
}

.mentions-modal-search {
  padding: 16px 24px 18px;
}

.mentions-modal-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(212, 167, 41, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  outline: none;
  font: 15px Vazir, Tahoma, Arial, sans-serif;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.mentions-modal-input:focus {
  border-color: rgba(212, 167, 41, 0.82);
  box-shadow: 0 0 0 3px rgba(212, 167, 41, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.mentions-modal-input::placeholder {
  color: rgba(255, 255, 255, 0.54);
}

.mentions-modal-results {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 18px 20px;
}

.mentions-modal-item {
  margin: 0 0 10px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.mentions-modal-item:hover,
.mentions-modal-item.is-active {
  background: rgba(212, 167, 41, 0.16);
  border-color: rgba(212, 167, 41, 0.36);
  transform: translateY(-1px);
}

.mentions-modal-item .mention-avatar-wrap {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
}

.mentions-modal-item .mention-name {
  font-size: 16px;
}

.mentions-modal-item .mention-meta {
  font-size: 13px;
}

.mentions-modal-empty {
  margin: 10px 0 0;
  padding: 28px 18px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

a[href*="/modules/mentions/group.php"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(212, 167, 41, 0.34);
  background: rgba(212, 167, 41, 0.12);
  color: #f8dd8d;
  text-decoration: none;
  white-space: nowrap;
  font-family: Vazir, Tahoma, Arial, sans-serif;
}

a[href*="/modules/mentions/group.php"]:hover,
a[href*="/modules/mentions/group.php"]:focus {
  color: #fff1bf;
  border-color: rgba(212, 167, 41, 0.6);
  background: rgba(212, 167, 41, 0.2);
  text-decoration: none;
}

.mentions-group-modal {
  position: fixed;
  inset: 0;
  z-index: 11100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 12, 18, 0.56);
}

.mentions-group-modal[hidden] {
  display: none;
}

.mentions-group-modal__dialog {
  width: min(520px, 100%);
  max-height: min(78vh, 720px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: Vazir, Tahoma, Arial, sans-serif;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #12253a;
  color: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.mentions-group-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mentions-group-modal__heading {
  min-width: 0;
}

.mentions-group-modal__title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
  color: #f8dd8d;
}

.mentions-group-modal__meta {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.mentions-group-modal__close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.mentions-group-modal__body {
  overflow-y: auto;
  padding: 14px 18px 18px;
}

.mentions-group-modal__members {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.mentions-group-modal__member {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #fff;
  text-decoration: none;
}

.mentions-group-modal__member:hover,
.mentions-group-modal__member:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(212, 167, 41, 0.3);
  color: #fff;
  text-decoration: none;
}

.mentions-group-modal__member .mention-avatar-wrap {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
}

.mentions-group-modal__empty {
  margin-top: 0;
}

.mentions-editor-actions {
  display: flex;
  justify-content: flex-end;
  margin: 12px 0 0;
}

.mentions-editor-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 96px;
  padding: 8px 14px;
  font-weight: 700;
  line-height: 1.2;
  border-color: rgba(212, 167, 41, 0.55);
  background: linear-gradient(180deg, rgba(18, 37, 58, 0.96) 0%, rgba(11, 22, 36, 0.96) 100%);
  color: #f8dd8d;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.mentions-editor-button:hover,
.mentions-editor-button:focus {
  color: #fff1bf;
  border-color: rgba(212, 167, 41, 0.8);
  background: linear-gradient(180deg, rgba(28, 53, 80, 0.98) 0%, rgba(14, 28, 45, 0.98) 100%);
}

.mentions-editor-button .fa-at {
  font-size: 14px;
}

.mentions-editor-button-label {
  display: inline-block;
}

@media (max-width: 768px) {
  .mentions-modal {
    padding: 14px;
  }

  .mentions-modal-dialog {
    max-height: 88vh;
    border-radius: 18px;
  }

  .mentions-modal-header {
    padding: 18px 16px 14px;
  }

  .mentions-modal-title {
    font-size: 22px;
  }

  .mentions-modal-search {
    padding: 14px 16px 16px;
  }

  .mentions-modal-tabs {
    padding: 14px 16px 0;
    gap: 8px;
  }

  .mentions-modal-tab {
    flex: 1 1 0;
    min-width: 0;
  }

  .mentions-modal-results {
    padding: 0 12px 14px;
  }

  .mentions-modal-item {
    padding: 14px;
  }

  .mentions-group-modal {
    padding: 14px;
  }

  .mentions-group-modal__dialog {
    width: min(100%, 420px);
    max-height: 82vh;
  }

  .mentions-group-modal__header {
    padding: 14px 14px 10px;
  }

  .mentions-group-modal__body {
    padding: 12px 14px 14px;
  }

  .mentions-editor-actions {
    justify-content: stretch;
  }

  .mentions-editor-button {
    width: 100%;
    justify-content: center;
  }
}
