/* NACO Live Chat. Works in the dashboard and on the website.
   The dashboard theme styles every button and field, so chat rules use .nc.nc to stay in charge. */
.nc { --nc-navy: #0F437F; --nc-ink: #0B2346; --nc-gold: #FFC40E; --nc-line: rgba(15, 67, 127, .12); --nc-soft: #F3F6FB; --nc-muted: #55657C; color: var(--nc-ink); font-size: 14px; line-height: 1.45; }
.nc *, .nc *::before, .nc *::after { box-sizing: border-box; }
.nc.nc button { width: auto; height: auto; min-width: 0; min-height: 0; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; color: inherit; font: inherit; line-height: 1.3; cursor: pointer; transform: none; }
.nc.nc [hidden] { display: none !important; }
.nc-app { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 12px; height: var(--nc-h, calc(100vh - 150px)); min-height: 380px; }
.nc-app.show-info { grid-template-columns: 310px minmax(0, 1fr) 270px; }
.nc-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: rgba(255, 255, 255, .9); border: 1px solid var(--nc-line); border-radius: 18px; box-shadow: 0 10px 30px rgba(15, 67, 127, .07); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

/* Conversation list */
.nc-side__top { display: grid; gap: 8px; padding: 12px; border-bottom: 1px solid var(--nc-line); }
.nc.nc .nc-new { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 42px; background: var(--nc-gold); border-radius: 12px; color: var(--nc-ink); font-weight: 800; transition: filter .15s; }
.nc.nc .nc-new:hover { filter: brightness(.96); }
.nc.nc input[type=search], .nc.nc .nc-side__top select { width: 100%; min-height: 38px; padding: 7px 12px; background: var(--nc-soft) !important; border: 1px solid transparent; border-radius: 11px !important; color: var(--nc-ink); font-size: 13.5px; }
.nc-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.nc.nc .nc-filters button { padding: 4px 11px; background: var(--nc-soft); border-radius: 99px; color: var(--nc-muted); font-size: 12.5px; font-weight: 600; }
.nc.nc .nc-filters button.is-active { background: var(--nc-navy); color: #fff; }
.nc-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; }
.nc.nc .nc-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 12px; text-align: start; transition: background .15s; }
.nc.nc .nc-item:hover { background: var(--nc-soft); }
.nc.nc .nc-item.is-active { background: rgba(15, 67, 127, .09); }
.nc-av { position: relative; flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--nc-navy); color: #fff; font-size: 14px; font-weight: 800; line-height: 1; }
.nc-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.nc-dot { position: absolute; bottom: 0; inset-inline-end: 0; width: 11px; height: 11px; background: #16A34A; border: 2px solid #fff; border-radius: 50%; }
.nc-item__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.nc-item__top, .nc-item__low { display: flex; align-items: center; gap: 7px; min-width: 0; }
.nc-item__top b { flex: 1; min-width: 0; overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.nc-item__top time { flex: none; color: var(--nc-muted); font-size: 11.5px; }
.nc-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; color: var(--nc-muted); font-size: 11.5px; }
.nc-role { padding: 0 7px; background: var(--nc-soft); border-radius: 99px; color: var(--nc-navy); font-style: normal; font-weight: 700; font-size: 11px; line-height: 18px; }
.nc-role--staff { background: rgba(255, 196, 14, .28); color: #5C4600; }
.nc-closed { color: #B42318; }
.nc-preview { flex: 1; min-width: 0; overflow: hidden; color: var(--nc-muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.has-unread .nc-preview { color: var(--nc-ink); font-weight: 600; }
.nc-pin { color: var(--nc-muted); font-size: 11px; }
.nc-badge { flex: none; min-width: 20px; padding: 0 6px; background: var(--nc-navy); border-radius: 99px; color: #fff; font-size: 11.5px; font-weight: 800; line-height: 20px; text-align: center; }
.nc-none { margin: 0; padding: 14px; color: var(--nc-muted); font-size: 13px; text-align: center; }

/* Empty state */
.nc-main { position: relative; }
.nc-empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; color: var(--nc-muted); text-align: center; }
.nc-empty svg { width: 150px; height: auto; }
.nc-window { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* Header: one row */
.nc-head { position: relative; z-index: 6; flex: none; display: flex; align-items: center; gap: 10px; min-height: 66px; padding: 10px 14px; background: rgba(255, 255, 255, .95); border-bottom: 1px solid var(--nc-line); }
.nc-head__who { flex: 1; min-width: 0; }
.nc-head__line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.nc-head__line b { min-width: 0; overflow: hidden; font-size: 15px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.nc-head__sub { display: flex; flex-wrap: wrap; gap: 0 8px; color: var(--nc-muted); font-size: 12px; }
.nc-presence { color: var(--nc-muted); }
.nc-presence.is-on { color: #166534; font-weight: 600; }
.nc-presence.is-on::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-inline-end: 4px; background: #16A34A; border-radius: 50%; }
.nc-tools { flex: none; display: flex; align-items: center; gap: 4px; }
.nc.nc .nc-icon { flex: none; display: inline-grid; place-items: center; width: 38px; height: 38px; margin: 0; background: transparent; border-radius: 50%; color: var(--nc-navy); font-size: 15px; cursor: pointer; transition: background .15s; }
.nc.nc .nc-icon:hover { background: var(--nc-soft); }
.nc.nc .nc-icon.is-on { background: var(--nc-gold); color: var(--nc-ink); }
.nc-back { display: none !important; }
.nc-menu { position: absolute; top: calc(100% - 6px); inset-inline-end: 12px; z-index: 8; width: 220px; max-height: 60vh; overflow-y: auto; padding: 6px; background: #fff; border: 1px solid var(--nc-line); border-radius: 13px; box-shadow: 0 16px 40px rgba(11, 35, 70, .2); }
.nc.nc .nc-menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border-radius: 9px; font-size: 13px; text-align: start; }
.nc.nc .nc-menu button:hover { background: var(--nc-soft); }
.nc-menu__label { margin: 6px 10px 2px; color: var(--nc-muted); font-size: 11.5px; font-weight: 700; }
.nc.nc .nc-insearch { flex: none; width: calc(100% - 28px); margin: 8px 14px 0; }

/* Messages */
.nc-msgwrap { position: relative; flex: 1; min-height: 0; display: flex; }
.nc-messages { flex: 1; min-width: 0; overflow-y: auto; padding: 14px 16px; background: #F5F8FC; }
.nc-msg { display: flex; align-items: flex-end; gap: 7px; margin-top: 10px; animation: nc-in .18s ease-out; }
.nc-msg.is-grouped { margin-top: 2px; }
.nc-msg.is-mine { justify-content: flex-end; }
@keyframes nc-in { from { opacity: 0; transform: translateY(5px); } }
.nc-av--small { width: 28px; height: 28px; font-size: 10.5px; align-self: flex-start; }
.nc-av--space { background: none; }
.nc.nc .nc-bubble { position: relative; max-width: min(65%, 620px); padding: 9px 12px 6px; background: #fff; border: 1px solid var(--nc-line); border-radius: 14px; box-shadow: 0 1px 4px rgba(15, 67, 127, .06); color: var(--nc-ink); overflow-wrap: anywhere; }
.nc.nc .is-mine .nc-bubble { background: var(--nc-navy); border-color: var(--nc-navy); color: #fff; }
.nc.nc .is-first.is-theirs .nc-bubble { border-start-start-radius: 4px; }
.nc.nc .is-first.is-mine .nc-bubble { border-start-end-radius: 4px; }
.nc.nc .is-tracking .nc-bubble { border-inline-start: 4px solid var(--nc-gold); }
.nc.nc .nc-bubble p { margin: 0; color: inherit; font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.nc.nc .nc-bubble a { color: inherit; text-decoration: underline; }
.nc.nc .is-emoji .nc-bubble { padding: 0 2px; background: none; border: 0; box-shadow: none; }
.nc.nc .is-emoji .nc-bubble p { font-size: 34px; line-height: 1.2; }
.nc.nc .is-emoji .nc-meta { color: var(--nc-muted); opacity: 1; }
.nc-sender { display: block; margin-bottom: 2px; color: var(--nc-navy); font-size: 11.5px; font-weight: 700; }
.nc.nc .nc-meta { display: block; margin-top: 2px; color: inherit; font-size: 10.5px; opacity: .8; text-align: end; }
.nc-tick { font-size: 10px; }
.nc.nc .nc-tick.is-seen { color: var(--nc-gold); }
.is-theirs .nc-tick.is-seen { color: var(--nc-navy); }
.nc.nc .nc-img { display: block; margin-bottom: 4px; }
.nc-img img { display: block; max-width: min(260px, 100%); max-height: 240px; border-radius: 10px; cursor: zoom-in; }
.nc.nc .nc-filecard { display: flex; align-items: center; gap: 10px; min-width: 200px; margin-bottom: 4px; padding: 8px 10px; background: rgba(15, 67, 127, .07); border-radius: 10px; color: inherit; text-decoration: none; }
.nc.nc .is-mine .nc-filecard { background: rgba(255, 255, 255, .15); }
.nc-filecard > i:first-child { font-size: 22px; }
.nc-filecard__text { flex: 1; min-width: 0; }
.nc-filecard__text b, .nc-filecard__text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nc-filecard__text b { font-size: 13px; }
.nc-date, .nc-system { width: fit-content; max-width: 90%; margin: 12px auto; padding: 2px 11px; background: rgba(15, 67, 127, .08); border-radius: 99px; color: #3F5068; font-size: 11.5px; text-align: center; }
.nc.nc .nc-more { display: block; margin: 0 auto 10px; padding: 4px 12px; background: #fff; border: 1px solid var(--nc-line); border-radius: 99px; color: var(--nc-navy); font-size: 12px; }
.nc.nc .nc-jump { position: absolute; bottom: 10px; left: 50%; z-index: 3; padding: 6px 14px; background: var(--nc-navy); border-radius: 99px; box-shadow: 0 8px 20px rgba(11, 35, 70, .25); color: #fff; font-size: 12.5px; font-weight: 700; transform: translateX(-50%); }

/* Typing */
.nc-typing { flex: none; display: flex; align-items: center; gap: 6px; padding: 4px 16px; background: #F5F8FC; color: var(--nc-muted); font-size: 12px; }
.nc-typing__dots { display: inline-flex; gap: 3px; }
.nc-typing__dots i { width: 6px; height: 6px; background: var(--nc-navy); border-radius: 50%; opacity: .35; animation: nc-dot 1.1s infinite; }
.nc-typing__dots i:nth-child(2) { animation-delay: .18s; }
.nc-typing__dots i:nth-child(3) { animation-delay: .36s; }
@keyframes nc-dot { 30% { opacity: 1; transform: translateY(-2px); } }

/* Composer */
.nc-composer-wrap { position: relative; flex: none; border-top: 1px solid var(--nc-line); background: #fff; }
.nc-composer { display: flex; align-items: flex-end; gap: 2px; padding: 8px 10px; }
.nc.nc .nc-composer textarea { display: block; flex: 1 1 0; width: auto; min-width: 0; height: 48px; min-height: 48px; max-height: 138px; margin-inline: 6px; padding: 13px 15px; background: var(--nc-soft); border: 1px solid transparent; border-radius: 22px; box-shadow: none; color: var(--nc-ink); font: inherit; font-size: 14px; line-height: 20px; overflow-y: hidden; resize: none; scrollbar-width: thin; }
.nc.nc .nc-composer textarea:focus { background: #fff; border-color: rgba(15, 67, 127, .3); box-shadow: 0 0 0 3px rgba(15, 67, 127, .08); }
.nc.nc .nc-composer textarea::-webkit-scrollbar { width: 6px; }
.nc.nc .nc-composer textarea::-webkit-scrollbar-button { display: none; }
.nc.nc .nc-composer textarea::-webkit-scrollbar-thumb { background: rgba(15, 67, 127, .25); border-radius: 6px; }
.nc.nc .nc-composer .nc-icon { margin-bottom: 5px; }
.nc-composer label.nc-icon input { display: none; }
.nc.nc .nc-send { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 2px; background: var(--nc-gold); border-radius: 50%; color: var(--nc-ink); font-size: 16px; }
.nc.nc .nc-send:disabled { background: #E7ECF3; color: #8995A6; cursor: default; }
[dir=rtl] .nc-send i { transform: scaleX(-1); }
.nc-chip { display: flex; align-items: center; gap: 8px; width: fit-content; max-width: calc(100% - 24px); margin: 8px 12px 0; padding: 5px 8px; background: var(--nc-soft); border-radius: 11px; font-size: 12.5px; }
.nc-chip img { width: 34px; height: 34px; object-fit: cover; border-radius: 7px; }
.nc-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nc.nc .nc-chip button { display: grid; place-items: center; width: 22px; height: 22px; background: rgba(15, 67, 127, .12); border-radius: 50%; font-size: 11px; }
.nc-pop { position: absolute; bottom: calc(100% + 6px); inset-inline-start: 10px; z-index: 5; display: flex; flex-wrap: wrap; gap: 3px; width: min(300px, calc(100% - 20px)); max-height: 220px; overflow: auto; padding: 8px; background: #fff; border: 1px solid var(--nc-line); border-radius: 14px; box-shadow: 0 14px 34px rgba(15, 67, 127, .2); }
.nc.nc .nc-pop--emoji button { width: 34px; height: 34px; border-radius: 8px; font-size: 19px; }
.nc.nc .nc-pop--emoji button:hover, .nc.nc .nc-pop--quick button:hover { background: var(--nc-soft); }
.nc.nc .nc-pop--quick { flex-direction: column; flex-wrap: nowrap; }
.nc.nc .nc-pop--quick button { width: 100%; padding: 8px 10px; border-radius: 9px; font-size: 13px; text-align: start; }

/* Info panel */
.nc-info { display: none; overflow-y: auto; padding: 14px; }
.show-info .nc-info { display: block; }
.nc-info__sec { margin-bottom: 14px; }
.nc-info__sec h4 { margin: 0 0 6px; color: var(--nc-navy); font-size: 13.5px; font-weight: 800; }
.nc-info__sec p { margin: 0 0 3px; overflow-wrap: anywhere; font-size: 13px; }
.nc-info__link { display: block; padding: 3px 0; color: var(--nc-navy); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.nc-info__link small { display: block; color: var(--nc-muted); font-weight: 400; }
.nc-trk { padding: 6px 0; border-bottom: 1px solid var(--nc-line); }
.nc.nc .nc-mini { margin-top: 4px; padding: 4px 9px; background: var(--nc-soft); border-radius: 8px; color: var(--nc-navy); font-size: 11.5px; font-weight: 600; }

/* New Chat popup */
.nc-dialog { width: min(480px, calc(100vw - 24px)); padding: 0; border: 0; border-radius: 18px; color: #0B2346; box-shadow: 0 30px 70px rgba(11, 35, 70, .3); }
.nc-dialog::backdrop { background: rgba(11, 35, 70, .45); }
.nc-dialog__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.nc-dialog__head h3 { margin: 0; font-size: 17px; }
.nc-dialog__body { display: grid; gap: 9px; padding: 8px 16px 16px; }
.nc-tabs { display: flex; gap: 6px; }
.nc.nc .nc-tabs button { flex: 1; min-height: 38px; background: #F3F6FB; border-radius: 10px; color: #55657C; font-weight: 700; }
.nc.nc .nc-tabs button.is-active { background: #0F437F; color: #fff; }
.nc-results { max-height: 340px; min-height: 120px; overflow-y: auto; }

/* Lightbox: lives outside the chat box */
.nc-lightbox { max-width: 94vw; max-height: 94vh; padding: 0; background: transparent; border: 0; cursor: zoom-out; }
.nc-lightbox::backdrop { background: rgba(11, 35, 70, .8); }
.nc-lightbox img { display: block; max-width: 94vw; max-height: 94vh; border-radius: 10px; }

/* One conversation: client panel */
.nc-single { height: min(70vh, 640px); min-height: 420px; }
.nc-single__head { flex: none; display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-bottom: 1px solid var(--nc-line); }
.nc-single .nc-head__who b { display: block; font-size: 15px; font-weight: 800; }
.nc-single .nc-presence { display: block; font-size: 12px; }

/* Website widget */
.nc-widget { position: relative; }
.nc.nc .nc-widget__toggle { display: grid; place-items: center; width: 52px; height: 52px; background: #0F437F; border-radius: 50%; box-shadow: 0 10px 24px rgba(15, 67, 127, .35); color: #FFC40E; font-size: 21px; }
.nc-widget__panel { position: absolute; bottom: 62px; inset-inline-end: 0; display: flex; flex-direction: column; width: min(360px, calc(100vw - 32px)); height: min(520px, calc(100vh - 150px)); overflow: hidden; background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(11, 35, 70, .28); }
.float-stack--start .nc-widget__panel { inset-inline: 0 auto; }
.nc-widget__head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; background: #0F437F; color: #fff; font-weight: 700; }
.nc-widget__form { display: grid; align-content: start; gap: 10px; padding: 14px; overflow: auto; }
.nc-widget__form input, .nc-widget__form select { width: 100%; min-height: 42px; padding: 8px 12px; background: #F3F6FB; border: 1px solid transparent; border-radius: 11px; font: inherit; }
.nc-widget__chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.nc-widget .nc-bubble { max-width: 80%; }
.nc-hp { position: absolute; left: -9999px; }

/* Top bar */
.nc-topbar { position: relative; }
.nc-topbar__count { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: #C62828; color: #fff; font-size: 11px; font-weight: 700; line-height: 19px; text-align: center; pointer-events: none; }
.nc-topbar__count[hidden], .nc-topbar__menu[hidden] { display: none; }
.nc-topbar__menu { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 1000; width: 300px; max-width: calc(100vw - 24px); padding: 6px; background: #fff; border: 1px solid rgba(15, 67, 127, .12); border-radius: 14px; box-shadow: 0 18px 44px rgba(11, 35, 70, .2); }
.nc-topbar__menu a { display: block; padding: 8px 10px; border-radius: 10px; color: #0B2346; font-size: 13px; }
.nc-topbar__menu a:hover { background: #F3F6FB; }
.nc-topbar__menu small { float: inline-end; color: #55657C; }
.nc-topbar__menu span { display: block; overflow: hidden; color: #55657C; text-overflow: ellipsis; white-space: nowrap; }
.nc-topbar__menu a.is-all { color: #0F437F; font-weight: 700; text-align: center; }
.nc-topbar__menu p { margin: 0; padding: 12px; color: #55657C; font-size: 13px; text-align: center; }

/* Tracking in the dashboard */
.trk-head { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.trk-bar { flex: 1; height: 8px; overflow: hidden; background: #E8EEF7; border-radius: 99px; }
.trk-bar span { display: block; height: 100%; background: linear-gradient(90deg, #0F437F, #FFC40E); border-radius: 99px; transition: width .4s; }
.trk-bar--small { display: inline-block; width: 70px; height: 6px; vertical-align: middle; }
.trk-line { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 14px; padding: 0; list-style: none; font-size: 12px; }
.trk-line li { padding: 2px 9px; background: #F3F6FB; border-radius: 99px; color: #55657C; }
.trk-line li.is-done { background: rgba(15, 67, 127, .12); color: #0F437F; }
.trk-line li.is-now { background: #FFC40E; color: #0B2346; font-weight: 700; }
.trk-qr svg { width: 150px; height: 150px; }

@media (max-width: 1200px) {
  .nc-app, .nc-app.show-info { grid-template-columns: 270px minmax(0, 1fr); }
  .nc-info { position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 1100; width: min(320px, 90vw); border-radius: 0; }
}
@media (max-width: 767px) {
  .nc-app, .nc-app.show-info { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .nc-app .nc-main { display: none; }
  .nc-app.is-chatting .nc-side { display: none; }
  .nc-app.is-chatting .nc-main { display: flex; }
  .nc-back { display: inline-grid !important; }
  .nc-head { gap: 6px; padding: 8px; }
  .nc.nc .nc-tools .nc-icon { width: 34px; height: 34px; font-size: 14px; }
  .nc-tools { gap: 0; }
  .nc-head__line .nc-role { display: none; }
  .nc.nc .nc-bubble { max-width: 82%; }
  .nc.nc .nc-composer .nc-icon { width: 34px; height: 34px; margin-bottom: 7px; }
  .nc.nc .nc-composer textarea { margin-inline: 3px; }
}
@media (prefers-reduced-motion: reduce) { .nc-msg, .nc-typing__dots i { animation: none; } }

/* Delete a message */
.nc.nc .nc-del { flex: none; align-self: center; width: 26px; height: 26px; border-radius: 50%; color: #8A97A8; font-size: 12px; opacity: 0; transition: opacity .15s; }
.nc-msg:hover .nc-del, .nc.nc .nc-del:focus { opacity: 1; }
.nc.nc .nc-del:hover { background: #FDECEC; color: #B42318; }
.is-mine .nc-del { order: -1; }
@media (hover: none) { .nc.nc .nc-del { opacity: .55; } }
@media (max-width: 767px) { .nc-head__sub { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; } .nc-head__sub [data-sub] { display: none; } }
/* Public tracking facts */
