/* Messages — Figma node 217:2 */

.msg {
  min-width: 0;
  color: #061321;
  font-family: 'Manrope', 'Vazirmatn', Tahoma, sans-serif;
  padding: 8px 4px 12px;
}

.msg-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 12px 14px;
}

.msg-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: #d7a52a;
}

.msg-hero h1 {
  margin: 8px 0 0;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.05;
}

.msg-hero h1 + p {
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 500;
  color: rgba(6, 19, 33, 0.72);
}

.msg-progress {
  margin: 4px 0 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.msg-progress span,
.msg-progress strong {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.msg-progress strong { color: #d7a52a; }

.msg-board {
  display: grid;
  grid-template-columns: minmax(250px, 334px) minmax(0, 1fr) minmax(250px, 334px);
  gap: 14px;
  align-items: stretch;
  min-width: 0;
}

.msg-rail,
.msg-talk {
  min-height: 624px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(245, 242, 234, 0.55) 0%, #f5f2ea 100%);
}

.msg-talk {
  background: rgba(245, 242, 234, 0.76);
  border-radius: 20px;
  box-shadow: 0 16px 38px rgba(6, 19, 33, 0.12);
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px 16px 14px;
}

.msg-rail {
  padding: 18px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg-rail h2,
.msg-side h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 2.4px;
}

.msg-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid #061321;
  background: rgba(245, 242, 234, 0.42);
}

.msg-search .lx-icon { width: 16px; height: 16px; color: rgba(6, 19, 33, 0.7); }

.msg-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: 500 13px/1 'Manrope', sans-serif;
  color: #061321;
}

.msg-search input::placeholder { color: rgba(6, 19, 33, 0.48); }

.msg-person {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 86px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: #061321;
}

.msg-person.is-on { background: rgba(240, 194, 75, 0.5); }

.msg-person:not(.is-on) {
  background: rgba(245, 242, 234, 0.35);
  border-color: rgba(255, 255, 255, 0.55);
}

.msg-ava {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #f5f2ea;
  color: #061321;
}

.msg-ava img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.msg-ava.is-logo { background: #fff; }
.msg-ava.is-logo img { width: 28px; height: 40px; object-fit: contain; }
.msg-ava.is-globe { background: rgba(6, 19, 33, 0.9); color: #f0c24b; }
.msg-ava.is-globe .lx-icon { width: 24px; height: 24px; }
.msg-ava.is-me {
  width: 34px;
  height: 34px;
  background: #f0c24b;
  color: #061321;
  font-weight: 800;
  font-size: 14px;
}
.msg-ava--sm { width: 34px; height: 34px; }

.msg-person__copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.msg-person__copy strong { font-size: 13px; font-weight: 800; }
.msg-person__copy em {
  font-style: normal;
  font-size: 12px;
  color: rgba(6, 19, 33, 0.58);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-person__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  font-size: 11px;
  color: rgba(6, 19, 33, 0.48);
}

.msg-person__meta i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f0c24b;
}

.msg-empty { margin: 8px; font-size: 13px; color: rgba(6, 19, 33, 0.55); }

.msg-talk__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(6, 19, 33, 0.12);
}

.msg-talk__head .msg-ava { width: 44px; height: 44px; }
.msg-talk__head strong { display: block; font-size: 15px; }
.msg-talk__head em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 12px;
  color: rgba(6, 19, 33, 0.58);
}

.msg-live {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(6, 19, 33, 0.6);
}

.msg-live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f0c24b;
}

.msg-more {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #061321;
  cursor: pointer;
}

.msg-log {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 4px 8px;
}

.msg-bubble {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 100%;
}

.msg-bubble.is-me { align-self: flex-end; }

.msg-bubble p {
  margin: 0;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(6, 19, 33, 0.86);
}

.msg-bubble.is-me p {
  background: rgba(240, 194, 75, 0.28);
  border-top-right-radius: 16px;
  border-bottom-left-radius: 16px;
}

.msg-bubble.is-them p { border-top-left-radius: 16px; }

.msg-bubble time {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: rgba(6, 19, 33, 0.42);
}

.msg-bubble.is-me time { text-align: right; }

.msg-file {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(360px, 100%);
  min-height: 54px;
  margin-inline-start: 44px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(6, 19, 33, 0.14);
  background: rgba(245, 242, 234, 0.7);
}

.msg-file strong { display: block; font-size: 13px; }
.msg-file em { font-style: normal; font-size: 11px; color: rgba(6, 19, 33, 0.48); }
.msg-file > span:first-child .lx-icon { width: 18px; height: 18px; }
.msg-file button {
  margin-inline-start: auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  color: #061321;
}

.msg-compose {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 54px;
  margin-top: 8px;
  padding: 0 6px 0 12px;
  border-radius: 27px;
  border: 1px solid rgba(6, 19, 33, 0.14);
  background: rgba(245, 242, 234, 0.7);
}

.msg-compose input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: 600 14px/1 'Manrope', sans-serif;
  color: #061321;
}

.msg-compose input::placeholder { color: rgba(6, 19, 33, 0.42); }

.msg-compose button {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #061321;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.msg-send {
  border-radius: 50%;
  background: #061321 !important;
  color: #f5f2ea !important;
}

.msg-send .lx-icon,
.msg-compose .lx-icon { width: 18px; height: 18px; }

.msg-side {
  position: relative;
  min-height: 620px;
  padding: 22px 20px 16px;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(6, 19, 33, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 16px 38px rgba(6, 19, 33, 0.16);
  color: #f5f2ea;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.msg-side h2 {
  align-self: flex-start;
  width: 100%;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(245, 242, 234, 0.35);
  text-align: left;
  font-size: 13px;
  letter-spacing: 1.8px;
  font-weight: 600;
}

.msg-side__face,
.msg-side__mark {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 28%;
  box-shadow: 0 0 0 3px #d7a52a;
}

.msg-side__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 242, 234, 0.12);
}

.msg-side__mark img { width: 42px; height: 58px; object-fit: contain; }
.msg-side__mark .lx-icon { width: 42px; height: 42px; color: #f0c24b; }

.msg-side > strong {
  margin-top: 14px;
  font-size: 16px;
  letter-spacing: 0.4px;
}

.msg-side > em {
  margin-top: 6px;
  font-style: normal;
  font-size: 12px;
  color: rgba(245, 242, 234, 0.68);
}

.msg-side ul {
  list-style: none;
  width: 100%;
  margin: 18px 0 0;
  padding: 0;
  text-align: left;
}

.msg-side li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  border-top: 1px solid rgba(245, 242, 234, 0.22);
  font-size: 13px;
  color: rgba(245, 242, 234, 0.86);
}

.msg-side li .lx-icon { width: 18px; height: 18px; flex-shrink: 0; }

.msg-side li button {
  margin-inline-start: auto;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #f5f2ea;
  cursor: pointer;
}

.msg-book {
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  border-radius: 10px;
  border: 1px solid rgba(240, 194, 75, 0.75);
  background: transparent;
  color: #f5f2ea;
  font: 700 12px/1 'Manrope', sans-serif;
  letter-spacing: 0.8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.msg-book .lx-icon { width: 16px; height: 16px; }

.msg-side footer {
  position: relative;
  width: 100%;
  margin-top: auto;
  min-height: 120px;
  text-align: left;
}

.msg-side footer p {
  position: relative;
  z-index: 1;
  margin: 28px 0 0;
  max-width: 180px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 1.4px;
  line-height: 1.35;
  color: rgba(245, 242, 234, 0.7);
}

.msg-side footer img {
  position: absolute;
  right: -36px;
  bottom: -20px;
  width: 220px;
  height: 130px;
  object-fit: cover;
  object-position: 100% 45%;
  mix-blend-mode: screen;
  pointer-events: none;
}

@media (max-width: 1180px) {
  .msg-board { grid-template-columns: 280px minmax(0, 1fr); }
  .msg-side { grid-column: 1 / -1; min-height: 0; }
}

@media (max-width: 860px) {
  .msg-board { grid-template-columns: 1fr; }
  .msg-hero { flex-direction: column; }
  .msg-progress { text-align: left; }
  .msg-rail, .msg-talk { min-height: 0; }
  .msg-log { max-height: 420px; }
}
