/* Live chat (chat.php + admin-panel/chat.php). Light theme with the site's colours. */
.ndc { --c-ink: #1a1a1c; --c-muted: rgba(26, 26, 28, .58); --c-faint: rgba(26, 26, 28, .42); --c-line: #e3e7ed; --c-soft: #f2f5fa;
  --c-violet: #864ffe; --c-grad: linear-gradient(180deg, #c1b1f9 0%, #7d51f4 100%); --c-mine: #1a1a1c; --c-ease: cubic-bezier(.22, 1, .36, 1);
  position: relative; display: flex; flex-direction: column; min-height: 0; height: 100%; background: #fff; font-family: var(--font-inter-tight, 'Inter Tight', 'Instrument Sans', sans-serif); color: var(--c-ink); }
.ndc * { box-sizing: border-box; }
.ndc .nd-ic { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* head */
.ndc-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--c-line); background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); }
.ndc-head__av { position: relative; display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: #1a1a1c; color: #fff; font-weight: 600; overflow: visible; }
.ndc-head__av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.ndc-head__av::after { content: ''; position: absolute; right: 0; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: #cbd2dc; box-shadow: 0 0 0 2.5px #fff; transition: background .3s; }
.ndc.is-online .ndc-head__av::after { background: #10b981; }
.ndc-head__txt { flex: 1; min-width: 0; }
.ndc-head__txt strong { display: block; font-size: 15.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ndc-head__txt span { display: block; font-size: 12.5px; color: var(--c-muted); }
.ndc-head__txt span.is-online { color: #059669; }
.ndc-head__tools { display: flex; gap: 6px; }
.ndc-tool { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--c-line); border-radius: 12px; background: #fff; color: var(--c-ink); cursor: pointer; text-decoration: none; transition: background .2s, border-color .2s, color .2s; }
.ndc-tool:hover { border-color: #c1b1f9; color: var(--c-ink); }
.ndc-tool.is-on { background: var(--c-violet); border-color: var(--c-violet); color: #fff; }
.ndc-tool .nd-ic { width: 18px; height: 18px; }

/* messages */
.ndc-msgs { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 18px 8px; background: radial-gradient(circle at 20% 0%, rgba(193, 177, 249, .14), transparent 45%), radial-gradient(circle at 100% 100%, rgba(226, 72, 170, .07), transparent 40%), #f7f8fb; }
.cm-list { display: flex; flex-direction: column; gap: 2px; max-width: 860px; margin: 0 auto; }
.cm-day { align-self: center; margin: 14px 0 8px; padding: 4px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--c-line); font-size: 11.5px; font-weight: 500; color: var(--c-muted); }
.cm-system { align-self: center; max-width: 520px; margin: 8px 0; padding: 9px 14px; border-radius: 14px; background: #f3eeff; color: #5b21b6; font-size: 13px; line-height: 1.5; text-align: center; animation: cm-in .35s var(--c-ease) both; }
.cm-system a { color: inherit; font-weight: 600; }
.cm { display: flex; align-items: flex-end; gap: 8px; margin-top: 10px; animation: cm-in .35s var(--c-ease) both; }
.cm--cont { margin-top: 2px; }
.cm--mine { flex-direction: row-reverse; }
@keyframes cm-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.cm-av { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: #1a1a1c; color: #fff; font-size: 13px; font-weight: 600; overflow: hidden; }
.cm-av img { width: 100%; height: 100%; object-fit: cover; }
.cm-av--bot { background: var(--c-grad); }
.cm-av--bot .nd-ic { width: 17px; height: 17px; stroke: #fff; }
.cm--cont .cm-av { visibility: hidden; }
.cm-col { display: flex; flex-direction: column; max-width: min(78%, 560px); min-width: 0; }
.cm--mine .cm-col { align-items: flex-end; }
.cm-who { margin: 0 0 3px 12px; font-size: 11.5px; font-weight: 600; color: var(--c-muted); }
.cm-bubble { position: relative; max-width: 100%; padding: 9px 13px; border-radius: 18px 18px 18px 6px; background: #fff; border: 1px solid var(--c-line); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); overflow: hidden; }
.cm--cont.cm--other .cm-bubble { border-radius: 6px 18px 18px 6px; }
.cm--mine .cm-bubble { border-radius: 18px 18px 6px 18px; background: var(--c-mine); border-color: var(--c-mine); color: #fff; }
.cm--mine.cm--cont .cm-bubble { border-radius: 18px 6px 6px 18px; }
.cm--bot .cm-bubble { background: #fbf9ff; border-color: #e9e0ff; }
.cm-bubble--media { padding: 4px; }
.cm-text { color: inherit !important; margin: 0; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-bubble--media .cm-text { padding: 6px 9px 4px; }
.cm-text a { color: var(--c-violet); text-decoration: underline; }
.cm--mine .cm-text a { color: #d8ccff; }
.cm-deleted { font-size: 13.5px; color: var(--c-faint); }
.cm--mine .cm-deleted { color: rgba(255, 255, 255, .6); }
.cm-img { display: block; border-radius: 14px; overflow: hidden; cursor: zoom-in; }
.cm-img img { display: block; max-width: 100%; max-height: 340px; width: auto; height: auto; object-fit: cover; }
.cm-video { display: block; max-width: 100%; max-height: 360px; border-radius: 14px; background: #000; }
.cm-audio { width: 260px; max-width: 100%; }
.cm-file { display: flex; align-items: center; gap: 10px; min-width: 220px; max-width: 320px; padding: 8px 10px; border-radius: 14px; background: var(--c-soft); color: var(--c-ink); text-decoration: none; }
.cm--mine .cm-file { background: rgba(255, 255, 255, .1); color: #fff; }
.cm-file__ic { position: relative; display: grid; place-items: center; flex: none; width: 42px; height: 48px; color: var(--c-violet); }
.cm-file__ic .nd-ic { width: 42px; height: 46px; stroke-width: 1.2; }
.cm-file__ic b { position: absolute; bottom: 9px; font-size: 8.5px; font-weight: 700; letter-spacing: .03em; }
.cm--mine .cm-file__ic { color: #c1b1f9; }
.cm-file__info { flex: 1; min-width: 0; }
.cm-file__info strong { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-file__info small { display: block; font-size: 11.5px; opacity: .7; }
.cm-file__dl { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--c-ink); }
.cm--mine .cm-file__dl { background: rgba(255, 255, 255, .15); color: #fff; }
.cm-file__dl .nd-ic { width: 16px; height: 16px; }
.cm-voice { display: flex; align-items: center; gap: 10px; min-width: 230px; padding: 6px 8px 6px 6px; }
.cm-voice__btn { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--c-violet); color: #fff; cursor: pointer; transition: transform .2s; }
.cm-voice__btn:hover { transform: scale(1.06); }
.cm-voice__btn .nd-ic { width: 16px; height: 16px; }
.cm--mine .cm-voice__btn { background: #fff; color: var(--c-ink); }
.cm-voice__bar { position: relative; flex: 1; display: flex; align-items: center; gap: 2px; height: 30px; cursor: pointer; }
.cm-voice__bar b { flex: 1; min-width: 2px; border-radius: 2px; background: rgba(134, 79, 254, .35); }
.cm--mine .cm-voice__bar b { background: rgba(255, 255, 255, .35); }
.cm-voice__bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, rgba(134, 79, 254, .25), rgba(134, 79, 254, .25)); border-radius: 4px; pointer-events: none; transition: width .2s linear; }
.cm--mine .cm-voice__bar i { background: rgba(255, 255, 255, .22); }
.cm-voice.is-playing .cm-voice__bar b { animation: cm-wave 1s ease-in-out infinite alternate; }
.cm-voice__bar b:nth-child(3n) { animation-delay: .15s; } .cm-voice__bar b:nth-child(4n) { animation-delay: .3s; }
@keyframes cm-wave { to { transform: scaleY(.55); } }
.cm-voice__time { font-size: 12px; font-variant-numeric: tabular-nums; opacity: .75; }
.cm-meta { display: flex; align-items: center; gap: 6px; margin: 3px 6px 0; font-size: 11px; color: var(--c-faint); }
.cm-tick { display: inline-flex; color: var(--c-faint); }
.cm-tick .nd-ic { width: 16px; height: 16px; stroke-width: 2; }
.cm-tick.is-read { color: var(--c-violet); }
.cm-tick.is-failed { color: #dc2626; }
.cm-tick.is-sending .nd-ic { animation: cm-spin 1.5s linear infinite; }
@keyframes cm-spin { to { transform: rotate(360deg); } }
.cm-act { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--c-faint); cursor: pointer; opacity: 0; transition: opacity .2s, background .2s, color .2s; }
.cm:hover .cm-act, .cm-act:focus-visible, .cm-act.is-on { opacity: 1; }
@media (hover: none) { .cm-act { opacity: .7; } }
.cm-act:hover { background: var(--c-soft); color: var(--c-ink); }
.cm-act.is-on { color: var(--c-violet); }
.cm-act--del:hover { color: #dc2626; }
.cm-act .nd-ic { width: 14px; height: 14px; }
.cm.is-failed .cm-bubble { opacity: .7; }
.cm-progress { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .5); overflow: hidden; }
.cm-progress i { display: block; width: 0; height: 100%; background: var(--c-violet); transition: width .2s; }
.ndc-typing { display: flex; align-items: center; gap: 8px; max-width: 860px; margin: 8px auto 4px; padding: 0 2px; font-size: 12.5px; color: var(--c-muted); }
.ndc-typing[hidden] { display: none; }
.ndc-typing span { display: inline-flex; gap: 3px; padding: 9px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--c-line); }
.ndc-typing span i { width: 6px; height: 6px; border-radius: 50%; background: var(--c-violet); animation: cm-dot 1.2s infinite ease-in-out; }
.ndc-typing span i:nth-child(2) { animation-delay: .15s; } .ndc-typing span i:nth-child(3) { animation-delay: .3s; }
@keyframes cm-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

/* composer */
.ndc-foot { position: relative; padding: 10px 14px 14px; border-top: 1px solid var(--c-line); background: #fff; }
.ndc-form { position: relative; display: flex; align-items: flex-end; gap: 6px; max-width: 860px; margin: 0 auto; padding: 6px; border-radius: 22px; border: 1px solid var(--c-line); background: #fff; transition: border-color .25s, box-shadow .25s; }
.ndc-form:focus-within { border-color: #c1b1f9; box-shadow: 0 0 0 4px rgba(134, 79, 254, .1); }
.ndc-form textarea { flex: 1; min-width: 0; min-height: 40px; max-height: 160px; padding: 10px 6px; border: 0; outline: none; resize: none; font: inherit; font-size: 15px; line-height: 1.45; background: transparent; color: var(--c-ink); }
.ndc-btn { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--c-muted); cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.ndc-btn:hover { background: var(--c-soft); color: var(--c-ink); }
.ndc-btn.is-on { background: #fee2e2; color: #dc2626; animation: cm-pulse 1.4s infinite; }
@keyframes cm-pulse { 50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, .12); } }
.ndc-send { background: var(--c-mine); color: #fff; }
.ndc-send:hover { background: #2c2c30; color: #fff; transform: scale(1.04); }
.ndc .ndc-send .nd-ic { width: 18px; height: 18px; }
.ndc:not(.has-text) .ndc-send { display: none; }
.ndc.has-text [data-c-record] { display: none; }
.ndc-rec-btn { background: var(--c-grad); color: #fff; }
.ndc-rec-btn:hover { background: var(--c-grad); color: #fff; transform: scale(1.05); }
.ndc-menu { position: absolute; bottom: calc(100% + 10px); left: 6px; z-index: 5; min-width: 210px; padding: 6px; border-radius: 18px; background: #fff; border: 1px solid var(--c-line); box-shadow: 0 24px 50px -24px rgba(26, 26, 28, .35); animation: cm-in .25s var(--c-ease) both; }
.ndc-menu[hidden] { display: none; }
.ndc-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: none; font: inherit; font-size: 14px; color: var(--c-ink); cursor: pointer; text-align: left; }
.ndc-menu button:hover { background: var(--c-soft); }
.ndc-menu button span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: #fff; }
.ndc-menu button span .nd-ic { width: 17px; height: 17px; }
.ndc-menu--emoji { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; min-width: 0; width: 300px; max-width: calc(100vw - 40px); left: 46px; }
.ndc-menu--emoji[hidden] { display: none; }
.ndc-menu--emoji button { justify-content: center; padding: 6px; font-size: 20px; }
.ndc-rec { position: absolute; inset: 10px 14px 14px; z-index: 6; display: flex; align-items: center; gap: 10px; max-width: 860px; margin: 0 auto; padding: 6px; border-radius: 22px; background: #fff; border: 1px solid #c1b1f9; box-shadow: 0 0 0 4px rgba(134, 79, 254, .1); }
.ndc-rec[hidden] { display: none; }
.ndc-rec__dot { width: 10px; height: 10px; margin-left: 10px; border-radius: 50%; background: #ef4444; animation: cm-blink 1s infinite; }
@keyframes cm-blink { 50% { opacity: .25; } }
.ndc-rec canvas { flex: 1; min-width: 0; height: 34px; }
.ndc-rec__time { font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; min-width: 42px; }
.ndc-quick { display: flex; gap: 6px; overflow-x: auto; max-width: 860px; margin: 0 auto 8px; scrollbar-width: none; }
.ndc-quick::-webkit-scrollbar { display: none; }
.ndc-quick button { flex: none; padding: 7px 12px; border: 1px solid var(--c-line); border-radius: 999px; background: #fff; font: inherit; font-size: 12.5px; color: var(--c-ink); cursor: pointer; white-space: nowrap; }
.ndc-quick button:hover { border-color: #c1b1f9; background: #fbf9ff; }
.ndc-hint { max-width: 860px; margin: 8px auto 0; font-size: 11.5px; color: var(--c-faint); text-align: center; }
.ndc-drop { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(134, 79, 254, .08); border: 2px dashed var(--c-violet); border-radius: inherit; font-size: 16px; font-weight: 600; color: var(--c-violet); pointer-events: none; }
.ndc-drop[hidden] { display: none; }
.ndc-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; max-width: 860px; margin: 0 auto 10px; padding: 12px 14px; border-radius: 16px; background: #fbf9ff; border: 1px solid #e9e0ff; font-size: 13.5px; }
.ndc-banner strong { flex: 1 1 200px; font-weight: 500; }
.ndc-banner form { display: flex; flex-wrap: wrap; gap: 6px; flex: 2 1 300px; margin: 0; }
.ndc-banner input { flex: 1 1 130px; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid var(--c-line); border-radius: 12px; font: inherit; font-size: 14px; }
.ndc-banner button { height: 38px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--c-mine); color: #fff; font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.cm-lightbox { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 30px; background: rgba(10, 10, 14, .88); opacity: 0; transition: opacity .25s; }
.cm-lightbox.is-in { opacity: 1; }
.cm-lightbox img { max-width: 100%; max-height: calc(100vh - 120px); border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.cm-lightbox button { position: absolute; top: 18px; right: 18px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.cm-lightbox .nd-ic { stroke: #fff; width: 20px; height: 20px; }
.cm-lightbox__dl { position: absolute; bottom: 22px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: #fff; color: #1a1a1c; font-size: 14px; font-weight: 500; text-decoration: none; }
.cm-lightbox__dl .nd-ic { stroke: #1a1a1c; width: 16px; height: 16px; }
@media (max-width: 640px) {
  .ndc-msgs { padding: 14px 10px 6px; }
  .cm-col { max-width: 84%; }
  .ndc-foot { padding: 8px 8px 10px; }
  .ndc-btn { width: 38px; height: 38px; }
  .ndc-head { padding: 10px 12px; }
  .cm-img img { max-height: 260px; }
}
.cm--mine .cm-bubble, .cm--mine .cm-bubble p, .cm--mine .cm-file strong, .cm--mine .cm-file small { color: #fff; }
.cm-bubble p, .cm-who, .cm-meta, .cm-system, .cm-day { letter-spacing: normal; }
.ndc .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* =====================================================
   v9: message menu, reactions, quotes, popups, search, media panel, settings
   ===================================================== */
.cm-wrap { position: relative; display: flex; align-items: flex-start; max-width: 100%; }
.cm--mine .cm-wrap { flex-direction: row-reverse; }
.cm-more { position: absolute; top: 4px; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--c-ink); box-shadow: 0 2px 8px rgba(16, 24, 40, .14); cursor: pointer; opacity: 0; transform: scale(.85); transition: opacity .15s, transform .15s; z-index: 2; }
.cm--other .cm-more { right: 4px; }
.cm--mine .cm-more { left: 4px; }
.cm:hover .cm-more, .cm-more:focus-visible { opacity: 1; transform: none; }
@media (hover: none) { .cm-more { display: none; } }
.cm-more .nd-ic { width: 15px; height: 15px; }
.cm-quote { display: flex; flex-direction: column; gap: 1px; width: 100%; margin: 0 0 6px; padding: 6px 10px; border: 0; border-left: 3px solid var(--c-violet); border-radius: 10px; background: rgba(134, 79, 254, .08); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.cm--mine .cm-quote { background: rgba(255, 255, 255, .12); border-left-color: #c1b1f9; }
.cm-bubble--media .cm-quote { width: calc(100% - 8px); margin: 4px 4px 6px; }
.cm-quote strong { font-size: 12px; font-weight: 600; color: var(--c-violet); }
.cm--mine .cm-quote strong { color: #d8ccff; }
.cm-quote span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; opacity: .8; }
.cm-reacts { display: flex; gap: 4px; margin: -6px 10px 0; position: relative; z-index: 1; }
.cm--mine .cm-reacts { justify-content: flex-end; }
.cm-react { display: inline-flex; align-items: center; height: 24px; padding: 0 6px; border: 1px solid var(--c-line); border-radius: 999px; background: #fff; font-size: 13px; line-height: 1; box-shadow: 0 1px 3px rgba(16, 24, 40, .08); cursor: default; }
.cm-react.is-mine { border-color: #c1b1f9; background: #f6f2ff; cursor: pointer; }
.cm-star { display: inline-flex; color: #f5a524; }
.cm-star .nd-ic { width: 12px; height: 12px; }
.cm-edited { font-style: italic; }
.cm-new { align-self: center; margin: 12px 0 4px; padding: 4px 14px; border-radius: 999px; background: var(--c-violet); color: #fff; font-size: 11.5px; font-weight: 600; }
.cm.is-flash .cm-bubble { animation: cm-flash 1.4s ease; }
@keyframes cm-flash { 0%, 40% { box-shadow: 0 0 0 4px rgba(134, 79, 254, .35); } 100% { box-shadow: none; } }
.ndc.is-searching .cm:not(.is-hit) { opacity: .45; }
.cm.is-hit-on .cm-bubble { box-shadow: 0 0 0 2px var(--c-violet); }
::highlight(nd-chat-hit) { background: #fde68a; color: #1a1a1c; }
.cm-voice__speed { flex: none; height: 24px; padding: 0 7px; border: 0; border-radius: 999px; background: rgba(134, 79, 254, .12); color: inherit; font-size: 11px; font-weight: 600; line-height: 1; cursor: pointer; }
.cm--mine .cm-voice__speed { background: rgba(255, 255, 255, .16); }

/* popover menus (message menu + header "more") */
.cm-menu { position: fixed; z-index: 100001; min-width: 210px; max-width: calc(100vw - 20px); padding: 6px; border-radius: 16px; background: #fff; border: 1px solid #e3e7ed; box-shadow: 0 24px 60px -20px rgba(16, 24, 40, .35); font-family: var(--font-inter-tight, 'Inter Tight', 'Instrument Sans', sans-serif); opacity: 0; transform: translateY(-4px) scale(.98); transition: opacity .14s, transform .14s; }
.cm-menu.is-in { opacity: 1; transform: none; }
.cm-menu .nd-ic { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.cm-menu__react { display: flex; gap: 2px; padding: 2px 2px 6px; margin-bottom: 4px; border-bottom: 1px solid #eef0f4; }
.cm-menu__react button { flex: 1; min-width: 32px; height: 36px; border: 0; border-radius: 10px; background: none; font-size: 20px; cursor: pointer; transition: transform .12s, background .12s; }
.cm-menu__react button:hover { background: #f4f1ff; transform: scale(1.15); }
.cm-menu__react button.is-on { background: #ede7ff; }
.cm-menu__item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 14px; color: #1a1a1c; text-align: left; cursor: pointer; }
.cm-menu__item:hover, .cm-menu__item:focus-visible { background: #f4f5f9; outline: none; }
.cm-menu__item.is-danger { color: #dc2626; }

/* popups (replace the browser's confirm / prompt) */
.ndm { position: fixed; inset: 0; z-index: 100002; display: grid; place-items: center; padding: 16px; background: rgba(12, 10, 20, .45); backdrop-filter: blur(4px); opacity: 0; transition: opacity .18s; font-family: var(--font-inter-tight, 'Inter Tight', 'Instrument Sans', sans-serif); }
.ndm.is-in { opacity: 1; }
.ndm__box { width: min(420px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 24px; border-radius: 24px; background: #fff; color: #1a1a1c; box-shadow: 0 40px 90px -30px rgba(16, 24, 40, .5); transform: translateY(10px) scale(.97); transition: transform .22s cubic-bezier(.2, .9, .3, 1.2); }
.ndm.is-in .ndm__box { transform: none; }
.ndm .nd-ic { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ndm__icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 14px; border-radius: 16px; background: #f3eeff; color: #864ffe; }
.ndm__icon.is-danger { background: #fee2e2; color: #dc2626; }
.ndm__icon .nd-ic { width: 22px; height: 22px; }
.ndm__title { margin: 0 0 6px; font-size: 19px; font-weight: 600; color: #1a1a1c; }
.ndm__text { margin: 0 0 4px; font-size: 14.5px; line-height: 1.55; color: rgba(26, 26, 28, .65); }
.ndm__acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.ndm__acts.is-stack { flex-direction: column; }
.ndm__btn { height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: 14px; background: #f2f3f7; color: #1a1a1c; font: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer; transition: background .15s, transform .1s; }
.ndm__btn:active { transform: scale(.98); }
.ndm__btn.is-primary { background: #1a1a1c; color: #fff; }
.ndm__btn.is-primary:hover { background: #2c2c30; }
.ndm__btn.is-danger { background: #dc2626; color: #fff; }
.ndm__btn.is-danger:hover { background: #b91c1c; }
.ndm__btn.is-ghost { background: transparent; border-color: #e3e7ed; }
.ndm__btn.is-ghost-danger { background: transparent; border-color: #fecaca; color: #dc2626; }
.ndm__btn:disabled { opacity: .55; cursor: default; }
.ndm__form { display: grid; gap: 10px; margin-top: 10px; }
.ndm__form textarea, .ndm__form input[type=text], .ndm__form input[type=email] { width: 100%; padding: 11px 14px; border: 1px solid #e3e7ed; border-radius: 12px; font: inherit; font-size: 14.5px; color: #1a1a1c; background: #fff; outline: none; resize: vertical; }
.ndm__form textarea:focus, .ndm__form input:focus { border-color: #c1b1f9; box-shadow: 0 0 0 3px rgba(134, 79, 254, .12); }
.ndm__radio, .ndm__check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #e3e7ed; border-radius: 12px; font-size: 14px; cursor: pointer; }
.ndm__radio:has(input:checked) { border-color: #c1b1f9; background: #faf8ff; }
.ndm__radio input, .ndm__check input { accent-color: #864ffe; width: 16px; height: 16px; }
.ndm__radio span, .ndm__check span { display: none; }
.ndm__info { display: grid; gap: 10px; margin-top: 8px; }
.ndm__info div { display: grid; grid-template-columns: 22px 80px 1fr; align-items: center; gap: 8px; font-size: 14px; }
.ndm__info div span { color: rgba(26, 26, 28, .65); }
.ndm__info div.is-read .nd-ic { color: #864ffe; }
.ndm__set { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid #f0f1f5; cursor: pointer; }
.ndm__set > span { display: grid; gap: 2px; }
.ndm__set strong { font-size: 14.5px; font-weight: 500; }
.ndm__set small { font-size: 12.5px; color: rgba(26, 26, 28, .55); }
.ndm__switch { position: relative; flex: none; width: 42px; height: 24px; }
.ndm__switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; margin: 0; }
.ndm__switch i { position: absolute; inset: 0; border-radius: 999px; background: #d7dbe3; transition: background .2s; }
.ndm__switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.ndm__switch input:checked + i { background: #864ffe; }
.ndm__switch input:checked + i::after { transform: translateX(18px); }
.ndm__seg { display: inline-flex; padding: 3px; border-radius: 12px; background: #f2f3f7; }
.ndm__seg button { height: 30px; padding: 0 10px; border: 0; border-radius: 9px; background: none; font: inherit; font-size: 13px; cursor: pointer; }
.ndm__seg button.is-on { background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .12); font-weight: 600; }
.ndm__walls { display: flex; gap: 6px; }
.ndm__wall { width: 34px; height: 34px; border: 2px solid transparent; border-radius: 10px; cursor: pointer; }
.ndm__wall.is-on { border-color: #864ffe; }
.ndm__hint { margin: 4px 0 0; font-size: 12px; color: rgba(26, 26, 28, .5); }
.ndm__profile { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid #f0f1f5; }
.ndm__profile-av { position: relative; flex: none; width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(180deg, #c1b1f9, #7d51f4); color: #fff; display: grid; place-items: center; font-size: 24px; font-weight: 600; overflow: hidden; cursor: pointer; border: 0; padding: 0; }
.ndm__profile-av img { width: 100%; height: 100%; object-fit: cover; }
.ndm__profile-av::after { content: "Change"; position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 0; background: rgba(0, 0, 0, .45); font-size: 10px; font-weight: 500; text-align: center; }
.ndm__profile > div { flex: 1; display: grid; gap: 6px; }
.ndm__profile small { font-size: 12px; color: rgba(26, 26, 28, .55); }
.ndm__profile .ndm__link { justify-self: start; padding: 0; border: 0; background: none; color: #dc2626; font: inherit; font-size: 12.5px; cursor: pointer; }

/* reply / edit bar */
.ndc-ctx { display: flex; align-items: center; gap: 10px; max-width: 860px; margin: 0 auto 8px; padding: 8px 10px 8px 12px; border-radius: 16px; background: #f6f2ff; border-left: 3px solid var(--c-violet); }
.ndc-ctx[hidden] { display: none; }
.ndc-ctx__ic { color: var(--c-violet); display: inline-flex; }
.ndc-ctx__txt { flex: 1; min-width: 0; display: grid; }
.ndc-ctx__txt strong { font-size: 12.5px; font-weight: 600; color: var(--c-violet); }
.ndc-ctx__txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--c-muted); }
.ndc-ctx__x { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: #fff; color: var(--c-ink); cursor: pointer; }
.ndc-ctx__x .nd-ic { width: 15px; height: 15px; }

/* jump to latest */
.ndc-fab { position: absolute; right: 22px; bottom: 150px; z-index: 4; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--c-line); border-radius: 50%; background: #fff; color: var(--c-ink); box-shadow: 0 10px 24px -10px rgba(16, 24, 40, .4); cursor: pointer; animation: cm-in .25s var(--c-ease) both; }
.ndc-fab[hidden] { display: none; }
.ndc-fab b { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--c-violet); color: #fff; font-size: 11px; line-height: 20px; text-align: center; }
.ndc-fab b[hidden] { display: none; }

/* search bar */
.ndc-search { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--c-line); background: #fff; }
.ndc-search[hidden] { display: none; }
.ndc-search__ic { display: inline-flex; color: var(--c-muted); }
.ndc-search input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-soft); font: inherit; font-size: 14px; color: var(--c-ink); outline: none; }
.ndc-search input:focus { border-color: #c1b1f9; background: #fff; }
.ndc-search__n { min-width: 64px; font-size: 12.5px; color: var(--c-muted); text-align: center; }
.ndc-search button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: none; color: var(--c-ink); cursor: pointer; }
.ndc-search button:hover { background: var(--c-soft); }
.ndc-search .nd-ic { width: 17px; height: 17px; }

/* media, docs, links + starred panel */
.ndc-panel { position: absolute; top: 0; right: 0; bottom: 0; z-index: 8; display: flex; flex-direction: column; width: min(380px, 100%); background: #fff; border-left: 1px solid var(--c-line); box-shadow: -20px 0 50px -30px rgba(16, 24, 40, .35); animation: ndc-slide .25s var(--c-ease) both; }
.ndc-panel[hidden] { display: none; }
@keyframes ndc-slide { from { transform: translateX(30px); opacity: 0; } }
.ndc-panel__head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--c-line); }
.ndc-panel__head strong { font-size: 15px; font-weight: 600; }
.ndc-panel__tabs { display: flex; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--c-line); }
.ndc-panel__tabs button { flex: 1; height: 34px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 13.5px; color: var(--c-muted); cursor: pointer; }
.ndc-panel__tabs button.is-on { background: var(--c-soft); color: var(--c-ink); font-weight: 600; }
.ndc-panel__body { flex: 1; overflow-y: auto; padding: 10px; }
.ndc-panel__empty { margin: 30px 10px; text-align: center; font-size: 13.5px; color: var(--c-muted); }
.ndc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.ndc-grid__item { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--c-soft); cursor: pointer; }
.ndc-grid__item img, .ndc-grid__item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ndc-grid__play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .2); }
.ndc-doc { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; color: var(--c-ink); text-decoration: none; }
.ndc-doc:hover { background: var(--c-soft); color: var(--c-ink); }
.ndc-doc__ic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: #f3eeff; color: var(--c-violet); }
.ndc-doc__ic.is-link { background: #e0f2fe; color: #0369a1; }
.ndc-doc__tx { flex: 1; min-width: 0; display: grid; }
.ndc-doc__tx strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; }
.ndc-doc__tx small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--c-muted); }
.ndc-doc__dl { color: var(--c-muted); display: inline-flex; }
.ndc-starred { display: grid; gap: 3px; width: 100%; margin-bottom: 6px; padding: 10px 12px; border: 1px solid var(--c-line); border-radius: 14px; background: #fff; font: inherit; text-align: left; color: var(--c-ink); cursor: pointer; }
.ndc-starred:hover { border-color: #c1b1f9; }
.ndc-starred small { font-size: 11.5px; color: var(--c-muted); }
.ndc-starred span { font-size: 14px; }
@media (max-width: 640px) { .ndc-panel { width: 100%; } .ndc-fab { right: 14px; bottom: 130px; } }

/* blocked conversation (visitor side) */
.ndc.is-blocked .ndc-form, .ndc.is-blocked .ndc-quick { opacity: .45; pointer-events: none; }
.ndc.is-blocked .ndc-foot::before { content: "This conversation was closed by Nithin."; display: block; max-width: 860px; margin: 0 auto 8px; padding: 10px 14px; border-radius: 14px; background: #fef2f2; color: #b91c1c; font-size: 13.5px; text-align: center; }

/* text size */
.ndc[data-size="s"] .cm-text { font-size: 13.5px; }
.ndc[data-size="l"] .cm-text { font-size: 16.5px; }
.ndc[data-size="l"] .ndc-form textarea { font-size: 16.5px; }

/* wallpapers */
.ndc[data-wall="plain"] .ndc-msgs, .ndm__wall[data-wall="plain"] { background: #f4f5f8; }
.ndc[data-wall="dots"] .ndc-msgs, .ndm__wall[data-wall="dots"] { background: radial-gradient(rgba(134, 79, 254, .16) 1px, transparent 1.5px) 0 0 / 18px 18px, #f7f8fb; }
.ndc[data-wall="mint"] .ndc-msgs, .ndm__wall[data-wall="mint"] { background: radial-gradient(circle at 10% 0%, rgba(16, 185, 129, .16), transparent 45%), radial-gradient(circle at 100% 100%, rgba(14, 165, 233, .12), transparent 45%), #f3faf7; }
.ndc[data-wall="sunset"] .ndc-msgs, .ndm__wall[data-wall="sunset"] { background: radial-gradient(circle at 0% 0%, rgba(255, 156, 64, .18), transparent 45%), radial-gradient(circle at 100% 100%, rgba(226, 72, 170, .14), transparent 45%), #fdf7f4; }
.ndm__wall[data-wall="aurora"] { background: radial-gradient(circle at 20% 0%, rgba(193, 177, 249, .5), transparent 60%), radial-gradient(circle at 100% 100%, rgba(226, 72, 170, .25), transparent 60%), #f7f8fb; }

/* dark chat (visitor setting) */
.ndc.is-dark { --c-ink: #e8e8ee; --c-muted: rgba(232, 232, 238, .62); --c-faint: rgba(232, 232, 238, .42); --c-line: #2b2c36; --c-soft: #23242e; --c-mine: #864ffe; background: #17181f; }
.ndc.is-dark .ndc-head, .ndc.is-dark .ndc-foot, .ndc.is-dark .ndc-search, .ndc.is-dark .ndc-panel { background: #1b1c24; }
.ndc.is-dark .ndc-msgs { background: #121319 !important; }
.ndc.is-dark .cm-bubble, .ndc.is-dark .cm-day, .ndc.is-dark .ndc-form, .ndc.is-dark .ndc-tool, .ndc.is-dark .ndc-typing span, .ndc.is-dark .cm-react, .ndc.is-dark .ndc-fab, .ndc.is-dark .ndc-starred, .ndc.is-dark .ndc-ctx__x { background: #22232d; border-color: #2f303b; color: #e8e8ee; }
.ndc.is-dark .ndc-form textarea, .ndc.is-dark .ndc-search input { color: #e8e8ee; }
.ndc.is-dark .cm--mine .cm-bubble { background: #864ffe; border-color: #864ffe; }
.ndc.is-dark .cm-system { background: #2a2340; color: #d8ccff; }
.ndc.is-dark .ndc-ctx { background: #2a2340; }
.ndc.is-dark .cm-more { background: #2b2c36; color: #e8e8ee; }
.ndc.is-dark .ndc-banner { background: #22232d; border-color: #2f303b; color: #e8e8ee; }
.ndc.is-dark .ndc-banner input { background: #17181f; border-color: #2f303b; color: #e8e8ee; }
@media (max-width: 640px) { .ndc-hint { display: none; } }
