/*
 * =====================================================================
 *  MESAJLAŞMA MODULU — STİLLƏR
 *  Yer: /modules/messages/assets/msg.css   (bütün səhifələrdə yüklənir:
 *       başlıq ikonu + nişan; mesajlar səhifəsinin özü)
 *  Bütün siniflər "lfm-msg-" ilə başlayır — tema / başqa modullarla
 *  toqquşmur, modul bağlananda heç nə qırılmır.
 *  Bölmələr: 1) başlıq ikonu + nişanlar  2) səhifə çərçivəsi  3) siyahı
 *            4) yazışma başlığı + elan  5) mesaj balonları  6) yazma sahəsi
 *            7) pəncərələr  8) mobil (tətbiq kimi tam ekran)
 * =====================================================================
 */

/* ---------- 1) Başlıq ikonu + nişanlar ---------- */
.lfm-msg-hbtn { display: none; align-items: center; color: #374151; }
@media (min-width: 1300px) { .lfm-msg-hbtn { display: inline-flex; } } /* dar ekranda axtarışa yer qalsın — mesajlar menyuda nişanla var */
.lfm-msg-hic { position: relative; width: 40px; height: 40px; border-radius: 999px; background: #f3f4f6; display: inline-flex; align-items: center; justify-content: center; transition: background .15s; }
.lfm-msg-hbtn:hover .lfm-msg-hic { background: var(--lf-brand-50, #f0fdf4); color: var(--lf-brand-700, #15803d); }
.lfm-msg-hsvg { width: 21px; height: 21px; }
.lfm-msg-badge { position: absolute; top: -4px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #f43f5e; color: #fff; font-size: 10.5px; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; line-height: 1; }
.lfm-msg-badge[hidden], .lfm-msg-nbadge[hidden], .lfm-msg-total[hidden] { display: none !important; }
.lfm-msg-nbadge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #f43f5e; color: #fff; font-size: 11px; font-weight: 900; font-style: normal; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.lfm-msg-pop { animation: lfm-msg-pop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes lfm-msg-pop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }

/* ---------- 2) Səhifə çərçivəsi (masaüstü: 2 panel) ---------- */
.lfm-msg { display: grid; grid-template-columns: minmax(0, 1fr); background: #fff; border: 1px solid #eef0f3; border-radius: 24px; overflow: hidden; box-shadow: 0 10px 40px -24px rgba(15, 23, 42, .25); height: calc(100vh - 190px); height: calc(100dvh - 190px); min-height: 540px; }
@media (min-width: 1024px) { .lfm-msg { grid-template-columns: 370px minmax(0, 1fr); } }
.lfm-msg button { cursor: pointer; }
.lfm-msg-ibtn { width: 40px; height: 40px; flex-shrink: 0; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: #4b5563; transition: background .15s, color .15s; cursor: pointer; }
.lfm-msg-ibtn:hover { background: #f3f4f6; color: #111827; }
.lfm-msg-ibtn[hidden] { display: none; }

/* ---------- 3) Siyahı ---------- */
.lfm-msg-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid #f1f5f9; background: #fff; }
.lfm-msg-lhead { padding: 18px 16px 10px; border-bottom: 1px solid #f1f5f9; }
.lfm-msg-lhead h1 { font-size: 22px; font-weight: 900; color: #111827; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.lfm-msg-total { min-width: 24px; height: 24px; padding: 0 8px; border-radius: 999px; background: #f43f5e; color: #fff; font-size: 12px; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; }
.lfm-msg-search { margin-top: 12px; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 14px; background: #f3f4f6; color: #9ca3af; border: 1px solid transparent; transition: all .15s; }
.lfm-msg-search:focus-within { background: #fff; border-color: var(--lf-brand-500, #22c55e); box-shadow: 0 0 0 4px rgba(34, 197, 94, .12); }
.lfm-msg-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 14px; color: #111827; }
.lfm-msg-filters { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.lfm-msg-filters::-webkit-scrollbar { display: none; }
.lfm-msg-filters button { flex-shrink: 0; padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #4b5563; background: #f3f4f6; transition: all .15s; }
.lfm-msg-filters button:hover { background: #e5e7eb; }
.lfm-msg-filters button.is-on { background: #111827; color: #fff; }
.lfm-msg-items { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px; }
.lfm-msg-item { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 11px 10px; border-radius: 16px; transition: background .12s; position: relative; }
.lfm-msg-item:hover { background: #f8fafc; }
.lfm-msg-item.is-on { background: var(--lf-brand-50, #f0fdf4); }
.lfm-msg-item.is-on::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--lf-brand-600, #16a34a); }
.lfm-msg-av { position: relative; width: 48px; height: 48px; flex-shrink: 0; border-radius: 999px; background: linear-gradient(135deg, #22c55e, #15803d); color: #fff; font-weight: 900; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
.lfm-msg-av img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; background: #fff; }
.lfm-msg-av.is-store { border-radius: 14px; }
.lfm-msg-av.is-online::after { content: ''; position: absolute; right: 1px; bottom: 1px; width: 13px; height: 13px; border-radius: 999px; background: #22c55e; border: 2.5px solid #fff; }
.lfm-msg-av-p { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; border-radius: 8px; object-fit: cover; border: 2px solid #fff; background: #f3f4f6; }
.lfm-msg-ibody { display: block; flex: 1; min-width: 0; }
.lfm-msg-irow { display: flex; align-items: center; gap: 6px; }
.lfm-msg-iname { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 800; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.lfm-msg-iname svg { color: #0ea5e9; flex-shrink: 0; }
.lfm-msg-iwhen { font-size: 12px; color: #9ca3af; flex-shrink: 0; }
.lfm-msg-iprod { display: block; font-size: 12px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.lfm-msg-ilast { display: block; flex: 1; min-width: 0; font-size: 13.5px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.lfm-msg-ilast b { color: #374151; font-weight: 700; }
.lfm-msg-item.is-unread .lfm-msg-ilast { color: #111827; font-weight: 700; }
.lfm-msg-item.is-unread .lfm-msg-iwhen { color: var(--lf-brand-600, #16a34a); font-weight: 800; }
.lfm-msg-icount { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--lf-brand-600, #16a34a); color: #fff; font-size: 11.5px; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lfm-msg-iblk { color: #e11d48; flex-shrink: 0; }
.lfm-msg-tick { display: inline-flex; color: #9ca3af; vertical-align: -2px; margin-right: 2px; }
.lfm-msg-tick.is-read { color: #0ea5e9; }
.lfm-msg-tick svg { width: 16px; height: 16px; }
.lfm-msg-lempty { padding: 50px 24px; text-align: center; color: #6b7280; font-size: 14px; }
.lfm-msg-lempty span { width: 68px; height: 68px; border-radius: 22px; background: #f3f4f6; color: #9ca3af; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.lfm-msg-lempty b { display: block; color: #111827; font-size: 16px; font-weight: 900; margin-bottom: 4px; }
.lfm-msg-skel { height: 70px; margin: 4px; border-radius: 16px; background: linear-gradient(90deg, #f3f4f6 25%, #eceef1 37%, #f3f4f6 63%); background-size: 400% 100%; animation: lfm-msg-sk 1.3s infinite; }
@keyframes lfm-msg-sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- 4) Yazışma: başlıq + elan zolağı ---------- */
.lfm-msg-thread { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #f6f7f9; }
.lfm-msg-none { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; color: #6b7280; }
.lfm-msg-none > span { width: 84px; height: 84px; border-radius: 28px; background: #fff; color: var(--lf-brand-600, #16a34a); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px -12px rgba(22, 163, 74, .35); margin-bottom: 16px; }
.lfm-msg-none b { font-size: 18px; color: #111827; font-weight: 900; }
.lfm-msg-none p { max-width: 340px; font-size: 14px; margin-top: 6px; }
.lfm-msg-err { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px !important; padding: 8px 14px; border-radius: 12px; background: #fff1f2; color: #be123c !important; font-weight: 700; }
.lfm-msg-chat { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.lfm-msg-chat[hidden] { display: none; }
.lfm-msg-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border-bottom: 1px solid #f1f5f9; }
.lfm-msg-head .lfm-msg-av { width: 42px; height: 42px; font-size: 16px; }
.lfm-msg-back { display: inline-flex; }
@media (min-width: 1024px) { .lfm-msg-back { display: none; } }
.lfm-msg-hname { display: flex; align-items: center; gap: 5px; font-size: 15.5px; font-weight: 900; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lfm-msg-hname svg { color: #0ea5e9; flex-shrink: 0; }
.lfm-msg-hname em { font-style: normal; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--lf-brand-50, #f0fdf4); color: var(--lf-brand-700, #15803d); }
.lfm-msg-hstat { display: block; font-size: 12.5px; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lfm-msg-hstat.is-online { color: var(--lf-brand-600, #16a34a); font-weight: 700; }
.lfm-msg-hstat.is-typing { color: var(--lf-brand-600, #16a34a); font-style: italic; font-weight: 700; }
.lfm-msg-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; padding: 6px; border-radius: 16px; background: #fff; border: 1px solid #eef0f3; box-shadow: 0 20px 50px -12px rgba(15, 23, 42, .3); animation: lfm-msg-in .16s ease-out; }
.lfm-msg-menu a, .lfm-msg-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 11px; font-size: 14px; font-weight: 600; color: #374151; text-align: left; }
.lfm-msg-menu a:hover, .lfm-msg-menu button:hover { background: #f3f4f6; }
.lfm-msg-menu .is-red { color: #e11d48; }
@keyframes lfm-msg-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.lfm-msg-prod { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: #fff; border-bottom: 1px solid #f1f5f9; transition: background .12s; }
.lfm-msg-prod:hover { background: #fafafa; }
.lfm-msg-prod[hidden] { display: none; }
.lfm-msg-prod img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; background: #f3f4f6; flex-shrink: 0; }
.lfm-msg-prod b { display: block; font-size: 13.5px; font-weight: 700; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lfm-msg-prod small { display: block; font-size: 13px; font-weight: 900; color: var(--lf-brand-700, #15803d); }
.lfm-msg-prod em { font-style: normal; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: #f3f4f6; color: #6b7280; flex-shrink: 0; }

/* ---------- 5) Mesajlar ---------- */
.lfm-msg-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px 6px; display: flex; flex-direction: column;
    background-color: #eef1f4; background-image: radial-gradient(rgba(22, 163, 74, .05) 1.2px, transparent 1.2px); background-size: 22px 22px; }
.lfm-msg-safety { display: flex; gap: 10px; align-items: flex-start; margin: 0 auto 12px; max-width: 520px; padding: 11px 12px; border-radius: 16px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 12.5px; line-height: 1.45; }
.lfm-msg-safety[hidden] { display: none; }
.lfm-msg-safety > svg { flex-shrink: 0; color: #d97706; margin-top: 1px; }
.lfm-msg-safety p { flex: 1; }
.lfm-msg-safety button { color: #b45309; flex-shrink: 0; }
.lfm-msg-more { align-self: center; margin-bottom: 10px; padding: 7px 14px; border-radius: 999px; background: #fff; font-size: 12.5px; font-weight: 700; color: #4b5563; box-shadow: 0 2px 8px -4px rgba(0, 0, 0, .2); }
.lfm-msg-more[hidden] { display: none; }
.lfm-msg-msgs { display: flex; flex-direction: column; gap: 2px; margin-top: auto; }
.lfm-msg-day { align-self: center; margin: 12px 0 8px; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .9); font-size: 12px; font-weight: 700; color: #6b7280; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); position: sticky; top: 0; z-index: 2; }
.lfm-msg-row { display: flex; }
.lfm-msg-row.is-mine { justify-content: flex-end; }
.lfm-msg-row + .lfm-msg-row:not(.is-cont) { margin-top: 6px; }
.lfm-msg-b { position: relative; max-width: min(78%, 520px); padding: 8px 12px 6px; border-radius: 18px; background: #fff; color: #111827; font-size: 14.5px; line-height: 1.45; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; }
.lfm-msg-row:not(.is-mine) .lfm-msg-b { border-bottom-left-radius: 6px; }
.lfm-msg-row.is-mine .lfm-msg-b { background: var(--lf-brand-600, #16a34a); color: #fff; border-bottom-right-radius: 6px; }
.lfm-msg-row.is-cont:not(.is-mine) .lfm-msg-b { border-top-left-radius: 6px; }
.lfm-msg-row.is-cont.is-mine .lfm-msg-b { border-top-right-radius: 6px; }
.lfm-msg-b a { text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.lfm-msg-row:not(.is-mine) .lfm-msg-b a { color: #1d4ed8; }
.lfm-msg-meta { float: right; display: inline-flex; align-items: center; gap: 3px; margin: 6px 0 -2px 10px; font-size: 11px; line-height: 1; opacity: .7; white-space: nowrap; }
.lfm-msg-row.is-mine .lfm-msg-meta { opacity: .85; }
.lfm-msg-meta .lfm-msg-tick { color: inherit; margin: 0; }
.lfm-msg-meta .lfm-msg-tick.is-read { color: #bae6fd; opacity: 1; }
.lfm-msg-meta .lfm-msg-tick svg { width: 15px; height: 15px; }
.lfm-msg-b.is-pending { opacity: .65; }
.lfm-msg-b.is-failed { background: #fee2e2 !important; color: #991b1b !important; }
.lfm-msg-b.is-del { font-style: italic; opacity: .6; }
.lfm-msg-new { animation: lfm-msg-new .25s ease-out; }
@keyframes lfm-msg-new { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
/* Şəkil */
.lfm-msg-b.is-img { padding: 4px; overflow: hidden; }
.lfm-msg-b.is-img img { display: block; max-width: 280px; width: 100%; max-height: 340px; min-height: 80px; border-radius: 14px; object-fit: cover; cursor: zoom-in; background: #e5e7eb; }
.lfm-msg-b.is-img .lfm-msg-cap { padding: 6px 8px 2px; }
.lfm-msg-b.is-img > .lfm-msg-meta { position: absolute; right: 10px; bottom: 9px; margin: 0; padding: 3px 7px; border-radius: 999px; background: rgba(0, 0, 0, .45); color: #fff; opacity: 1; }
.lfm-msg-b.is-img.has-cap > .lfm-msg-meta { position: static; float: right; background: none; padding: 0; margin: 4px 6px 2px 10px; color: inherit; opacity: .8; }
/* Təklif kartı */
.lfm-msg-b.is-offer { padding: 12px 14px 8px; min-width: 220px; background: #fff !important; color: #111827 !important; border: 2px solid var(--lf-brand-500, #22c55e); }
.lfm-msg-offer-l { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; }
.lfm-msg-offer-a { font-size: 24px; font-weight: 900; color: var(--lf-brand-700, #15803d); letter-spacing: -.02em; margin: 2px 0 6px; }
.lfm-msg-offer-s { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: #fef3c7; color: #92400e; }
.lfm-msg-offer-s.is-accepted { background: #dcfce7; color: #166534; }
.lfm-msg-offer-s.is-declined { background: #fee2e2; color: #991b1b; }
.lfm-msg-offer-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.lfm-msg-offer-btns button { height: 38px; border-radius: 12px; font-size: 13px; font-weight: 800; }
.lfm-msg-offer-btns .is-yes { background: var(--lf-brand-600, #16a34a); color: #fff; }
.lfm-msg-offer-btns .is-no { background: #f3f4f6; color: #374151; }
.lfm-msg-b.is-offer .lfm-msg-meta { color: #6b7280; }
.lfm-msg-b.is-offer .lfm-msg-tick.is-read { color: #0ea5e9; }
/* Sistem */
.lfm-msg-sys { align-self: center; margin: 8px 0; max-width: 90%; padding: 6px 14px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 12.5px; font-weight: 700; text-align: center; }
.lfm-msg-typing { display: inline-flex; gap: 4px; align-self: flex-start; margin: 6px 0 2px; padding: 12px 14px; border-radius: 18px 18px 18px 6px; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.lfm-msg-typing[hidden] { display: none; }
.lfm-msg-typing i { width: 7px; height: 7px; border-radius: 99px; background: #9ca3af; animation: lfm-msg-dot 1.2s infinite; }
.lfm-msg-typing i:nth-child(2) { animation-delay: .15s; }
.lfm-msg-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes lfm-msg-dot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.lfm-msg-down { position: absolute; right: 16px; bottom: 92px; z-index: 5; width: 42px; height: 42px; border-radius: 999px; background: #fff; color: #374151; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px -6px rgba(0, 0, 0, .3); }
.lfm-msg-down[hidden] { display: none; }
.lfm-msg-down em { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--lf-brand-600, #16a34a); color: #fff; font-size: 11px; font-weight: 900; font-style: normal; display: inline-flex; align-items: center; justify-content: center; }
.lfm-msg-down em[hidden] { display: none; }

/* ---------- 6) Yazma sahəsi ---------- */
.lfm-msg-blocked { margin: 0; padding: 14px; background: #fff; border-top: 1px solid #f1f5f9; text-align: center; font-size: 13.5px; color: #6b7280; }
.lfm-msg-blocked[hidden] { display: none; }
.lfm-msg-blocked button { margin-left: 6px; font-weight: 800; color: var(--lf-brand-700, #15803d); }
.lfm-msg-quick { display: flex; gap: 6px; padding: 8px 12px 0; overflow-x: auto; scrollbar-width: none; background: #fff; border-top: 1px solid #f1f5f9; }
.lfm-msg-quick:empty { display: none; }
.lfm-msg-quick::-webkit-scrollbar { display: none; }
.lfm-msg-quick button { flex-shrink: 0; padding: 7px 12px; border-radius: 999px; border: 1px solid #e5e7eb; background: #fff; font-size: 13px; font-weight: 600; color: #374151; transition: all .12s; }
.lfm-msg-quick button:hover { border-color: var(--lf-brand-500, #22c55e); color: var(--lf-brand-700, #15803d); background: var(--lf-brand-50, #f0fdf4); }
.lfm-msg-preview { position: relative; display: inline-flex; margin: 8px 12px 0; align-self: flex-start; background: #fff; }
.lfm-msg-preview[hidden] { display: none; }
.lfm-msg-preview img { width: 76px; height: 76px; border-radius: 14px; object-fit: cover; border: 1px solid #e5e7eb; }
.lfm-msg-preview button { position: absolute; top: -7px; right: -7px; width: 24px; height: 24px; border-radius: 999px; background: #111827; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.lfm-msg-compose { display: flex; align-items: flex-end; gap: 4px; padding: 8px 10px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); background: #fff; }
.lfm-msg-compose[hidden] { display: none; }
.lfm-msg-compose textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 140px; resize: none; padding: 11px 16px; border-radius: 22px; background: #f3f4f6; border: 1px solid transparent; outline: none; font-size: 15px; line-height: 1.4; color: #111827; transition: all .15s; }
.lfm-msg-compose textarea:focus { background: #fff; border-color: var(--lf-brand-500, #22c55e); box-shadow: 0 0 0 4px rgba(34, 197, 94, .12); }
.lfm-msg-compose .lfm-msg-ibtn { height: 44px; width: 44px; }
.lfm-msg-send { width: 44px; height: 44px; flex-shrink: 0; border-radius: 999px; background: var(--lf-brand-600, #16a34a); color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px -6px rgba(22, 163, 74, .7); transition: transform .12s, background .15s, opacity .15s; }
.lfm-msg-send:hover { background: var(--lf-brand-700, #15803d); }
.lfm-msg-send:active { transform: scale(.92); }
.lfm-msg-send:disabled { opacity: .45; box-shadow: none; }
.lfm-msg-send svg { transform: rotate(90deg); }

/* ---------- 7) Pəncərələr ---------- */
.lfm-msg-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .lfm-msg-modal { align-items: center; } }
.lfm-msg-modal[hidden] { display: none; }
.lfm-msg-modal-bg { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); backdrop-filter: blur(3px); animation: lfm-msg-fade .2s; }
.lfm-msg-modal-box { position: relative; width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto; background: #fff; border-radius: 26px 26px 0 0; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .4); animation: lfm-msg-up .28s cubic-bezier(.2, .8, .2, 1); }
@media (min-width: 640px) { .lfm-msg-modal-box { border-radius: 26px; padding-bottom: 20px; } }
.lfm-msg-modal-box h3 { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 900; color: #111827; margin-bottom: 6px; }
@keyframes lfm-msg-fade { from { opacity: 0; } }
@keyframes lfm-msg-up { from { transform: translateY(40px); opacity: 0; } }
.lfm-msg-amount { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 18px; border-radius: 18px; border: 2px solid #e5e7eb; transition: border-color .15s; }
.lfm-msg-amount:focus-within { border-color: var(--lf-brand-500, #22c55e); }
.lfm-msg-amount input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 30px; font-weight: 900; color: #111827; padding: 6px 0; background: none; }
.lfm-msg-amount span { font-size: 22px; font-weight: 900; color: #9ca3af; }
.lfm-msg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.lfm-msg-chips button { padding: 7px 12px; border-radius: 999px; background: #f3f4f6; font-size: 13px; font-weight: 700; color: #374151; }
.lfm-msg-chips button:hover { background: var(--lf-brand-50, #f0fdf4); color: var(--lf-brand-700, #15803d); }
.lfm-msg-reasons { display: grid; gap: 6px; margin-top: 12px; }
.lfm-msg-reasons label { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid #e5e7eb; font-size: 14px; font-weight: 600; color: #374151; cursor: pointer; }
.lfm-msg-reasons label:has(input:checked) { border-color: #f43f5e; background: #fff1f2; }
.lfm-msg-reasons input { accent-color: #e11d48; }
.lfm-msg-qlist { display: grid; gap: 6px; margin-top: 12px; }
.lfm-msg-qlist li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #f8fafc; font-size: 14px; color: #374151; }
.lfm-msg-qlist li span { flex: 1; min-width: 0; }
.lfm-msg-qlist li button { color: #9ca3af; }
.lfm-msg-qlist li button:hover { color: #e11d48; }
.lfm-msg-qlist li.is-def { color: #9ca3af; font-style: italic; background: none; padding: 4px 2px; }
.lfm-msg-lightbox { position: fixed; inset: 0; z-index: 210; background: rgba(0, 0, 0, .92); display: flex; align-items: center; justify-content: center; padding: 20px; animation: lfm-msg-fade .2s; }
.lfm-msg-lightbox[hidden] { display: none; }
.lfm-msg-lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; object-fit: contain; }
.lfm-msg-lightbox button { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; width: 46px; height: 46px; border-radius: 999px; background: rgba(255, 255, 255, .15); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.lfm-msg-toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 220; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 10px 12px 10px 14px; border-radius: 18px; background: #111827; color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .5); animation: lfm-msg-up .28s cubic-bezier(.2, .8, .2, 1); }
@media (min-width: 768px) { .lfm-msg-toast { left: auto; right: 24px; bottom: 24px; transform: none; } }
.lfm-msg-toast a { padding: 6px 12px; border-radius: 12px; background: var(--lf-brand-600, #16a34a); font-weight: 800; flex-shrink: 0; }

/* Mesajlar səhifəsində saytın "yuxarı qalx" düyməsi göndər düyməsinin üstünə düşməsin */
html.lfm-msg-page .laf-scroll-wrapper, html.lfm-msg-page .lf-to-top { display: none !important; }

/* ---------- 8) Mobil: tətbiq kimi ---------- */
@media (max-width: 1023px) {
    .lfm-msg { height: auto; min-height: calc(100dvh - 210px); border-radius: 22px; }
    .lfm-msg-thread { display: none; }
    .lfm-msg-items { overflow: visible; }
    /* Söhbət açıqdır: tam ekran, menyu və alt naviqasiya gizli */
    .lfm-msg.is-thread .lfm-msg-list { display: none; }
    .lfm-msg.is-thread .lfm-msg-thread { display: flex; position: fixed; inset: 0; z-index: 150; height: 100vh; height: 100dvh; }
    html.lfm-msg-open #lf-header, html.lfm-msg-open .lf-bottom-nav, html.lfm-msg-open .lf-app-band, html.lfm-msg-open .lf-topbar { display: none !important; }
    html.lfm-msg-open body.lf-body { overflow: hidden; }
    .lfm-msg-head { padding-top: calc(10px + env(safe-area-inset-top)); }
    .lfm-msg-down { bottom: calc(86px + env(safe-area-inset-bottom)); }
    .lfm-msg-b { max-width: 84%; }
}
@media (max-width: 767px) {
    .lfm-msg { border: 0; border-radius: 0; box-shadow: none; margin: -8px -12px 0; min-height: calc(100dvh - 190px); }
}
