/* Conversations › Snippets: the list page, the Text and Email snippet modals
   and their phone preview (public/conversations-snippets.js). Sizes follow
   GHL's: an 850px text modal, a 260×525 phone, 350px confirm dialogs. */

.sn-page {
  --sn-blue: #155eef;
  --sn-blue-dark: #004eeb;
  --sn-blue-soft: #eff4ff;
  --sn-border: #d0d5dd;
  --sn-text: #101828;
  --sn-text-2: #344054;
  --sn-muted: #667085;
  --sn-red: #d92d20;
  color: var(--sn-text);
  padding: 4px 26px 28px;
}
.sn-mask, .sn-menu, .sn-panel {
  --sn-blue: #155eef;
  --sn-blue-dark: #004eeb;
  --sn-blue-soft: #eff4ff;
  --sn-border: #d0d5dd;
  --sn-text: #101828;
  --sn-text-2: #344054;
  --sn-muted: #667085;
  --sn-red: #d92d20;
}

/* ---------- header and tabs ---------- */
.sn-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 8px 0 14px; flex-wrap: wrap; }
.sn-h1 { margin: 0; font-size: 22px; line-height: 30px; font-weight: 600; color: var(--sn-text); }
.sn-sub { font-size: 14px; color: var(--sn-muted); margin-top: 2px; }
.sn-actions { display: flex; gap: 10px; align-items: center; }
.sn-tabs { display: flex; gap: 6px; border-bottom: 1px solid #eaecf0; margin-bottom: 12px; }
.sn-tab {
  border: 0; background: none; padding: 8px 12px; font: inherit; font-size: 14px; font-weight: 500;
  color: var(--sn-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer;
}
.sn-tab:hover { color: var(--sn-text-2); }
.sn-tab.on { color: var(--sn-blue); border-bottom-color: var(--sn-blue); font-weight: 600; }

/* ---------- buttons and inputs ---------- */
.sn-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 14px; font-weight: 600; line-height: 20px; white-space: nowrap;
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--sn-border);
  background: #fff; color: var(--sn-text-2); cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}
.sn-btn:hover { background: #f9fafb; }
.sn-btn:disabled { opacity: .6; cursor: not-allowed; }
.sn-btn.loading { cursor: progress; }
.sn-btn.outline { color: var(--sn-blue); border-color: #84adff; }
.sn-btn.outline:hover { background: var(--sn-blue-soft); }
.sn-btn.primary { background: var(--sn-blue); border-color: var(--sn-blue); color: #fff; }
.sn-btn.primary:hover { background: var(--sn-blue-dark); }
.sn-btn.danger { background: var(--sn-red); border-color: var(--sn-red); color: #fff; }
.sn-btn.danger:hover { background: #b42318; }
.sn-btn.secondary.xs, .sn-btn.xs { padding: 6px 12px; font-size: 14px; }
.sn-btn.secondary.xs:not(.primary) { color: var(--sn-blue); border-color: #84adff; }
.sn-btn.secondary.xs:not(.primary):hover { background: var(--sn-blue-soft); }
.sn-btn.link { border: 0; box-shadow: none; background: none; color: var(--sn-blue); padding: 4px 6px; }
.sn-btn.link:hover { text-decoration: underline; background: none; }

.sn-input {
  width: 100%; font: inherit; font-size: 14px; color: var(--sn-text); background: #fff;
  border: 1px solid var(--sn-border); border-radius: 8px; padding: 8px 12px; line-height: 20px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}
.sn-input::placeholder { color: #98a2b3; }
.sn-input:focus { outline: none; border-color: #84adff; box-shadow: 0 0 0 4px #d1e0ff; }
select.sn-input { appearance: auto; }

.sn-item { margin-bottom: 12px; }
.sn-item:has(> .sn-err:empty) { margin-bottom: 12px; }
.sn-label { font-size: 14px; font-weight: 500; color: var(--sn-text-2); margin-bottom: 6px; }
.sn-req { color: #f04438; }
.sn-err { font-size: 12.5px; color: var(--sn-red); margin-top: 4px; }
.sn-err:empty { display: none; }
.sn-item.invalid .sn-input { border-color: #fda29b; }
.sn-item.invalid .sn-input:focus { box-shadow: 0 0 0 4px #fee4e2; }

/* ---------- the card ---------- */
.sn-card { background: #fff; border: 1px solid #eaecf0; border-radius: 8px; overflow: hidden; }
.sn-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; min-height: 58px; flex-wrap: wrap; }
.sn-bar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 34px; }
.sn-search {
  display: flex; align-items: center; gap: 8px; width: 260px; max-width: 100%;
  border: 1px solid var(--sn-border); border-radius: 8px; padding: 7px 12px; color: var(--sn-muted);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05); background: #fff;
}
.sn-search:focus-within { border-color: #84adff; box-shadow: 0 0 0 4px #d1e0ff; }
.sn-search input { border: 0; outline: none; font: inherit; font-size: 14px; flex: 1; min-width: 0; color: var(--sn-text); background: none; }
.sn-inside { font-size: 14px; color: var(--sn-text-2); }
.sn-bulk { display: flex; align-items: center; gap: 8px; }
.sn-bulk-count { font-size: 14px; font-weight: 500; color: var(--sn-text-2); }
.sn-bulk-btn {
  border: 1px solid var(--sn-border); background: #fff; border-radius: 8px; padding: 7px; color: var(--sn-text-2);
  display: inline-flex; cursor: pointer;
}
.sn-bulk-btn:hover { background: #f9fafb; }
.sn-bulk-btn.danger { color: var(--sn-red); }

.sn-table-wrap { overflow-x: auto; border-top: 1px solid #eaecf0; }
.sn-table-wrap.loading { opacity: .55; transition: opacity .15s; }
.sn-table { width: 100%; min-width: 880px; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
.sn-table th {
  text-align: left; font-size: 14px; font-weight: 500; color: var(--sn-text-2); background: #f9fafb;
  padding: 12px 16px; border-bottom: 1px solid #eaecf0; border-right: 1px solid #eaecf0; white-space: nowrap;
}
.sn-table th:last-child { border-right: 0; }
.sn-table td { padding: 12px 16px; border-bottom: 1px solid #eaecf0; border-right: 1px solid #eaecf0; color: var(--sn-text-2); vertical-align: middle; }
.sn-table td:last-child { border-right: 0; }
.sn-table tbody tr:hover td { background: #fcfcfd; }
.sn-table tbody tr.sel td { background: #f5f8ff; }
.sn-table .sn-cc { text-align: center; padding-left: 0; padding-right: 0; }
.sn-check { width: 16px; height: 16px; accent-color: var(--sn-blue); cursor: pointer; vertical-align: middle; }
.sn-clamp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sn-clamp .ico { vertical-align: -2px; color: var(--sn-muted); }
.sn-date { white-space: nowrap; }
.sn-th-type { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sn-th-filter {
  border: 0; background: none; color: var(--sn-muted); padding: 2px; border-radius: 4px; cursor: pointer; display: inline-flex;
}
.sn-th-filter:hover { background: #eaecf0; }
.sn-th-filter.on { color: var(--sn-blue); }
.sn-kebab {
  border: 0; background: none; color: var(--sn-text-2); padding: 4px; border-radius: 6px; cursor: pointer; display: inline-flex;
}
.sn-kebab:hover { background: #f2f4f7; }
.sn-folder-tag {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%; border: 0; cursor: pointer;
  background: #f2f4f7; color: var(--sn-text-2); border-radius: 999px; padding: 2px 10px 2px 8px; font: inherit; font-size: 12px;
}
.sn-folder-tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sn-folder-tag:disabled { cursor: default; }
.sn-folder-tag:not(:disabled):hover { background: #eaecf0; }
.sn-folder-link {
  display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--sn-text-2); max-width: 100%;
}
.sn-folder-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sn-folder-link:hover span { color: var(--sn-blue); text-decoration: underline; }
.sn-folder-link .ico { color: var(--sn-muted); }
.sn-empty { padding: 48px 16px !important; }
.sn-empty-box { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--sn-muted); }
.sn-empty-title { font-size: 16px; font-weight: 600; color: var(--sn-text); }
.sn-empty-sub { font-size: 14px; }

.sn-foot { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 12px 16px; flex-wrap: wrap; font-size: 14px; color: var(--sn-text-2); }
.sn-per { display: flex; align-items: center; gap: 8px; }
.sn-size { font: inherit; font-size: 14px; border: 1px solid var(--sn-border); border-radius: 6px; padding: 4px 6px; background: #fff; }
.sn-pages { display: flex; align-items: center; gap: 6px; }
.sn-page-btn, .sn-page-num {
  font: inherit; font-size: 14px; border: 1px solid var(--sn-border); background: #fff; color: var(--sn-text-2);
  border-radius: 6px; padding: 4px 10px; cursor: pointer; min-width: 32px;
}
.sn-page-btn:disabled { color: #d0d5dd; border-color: #eaecf0; cursor: not-allowed; }
.sn-page-num.on { border-color: var(--sn-blue); color: var(--sn-blue); font-weight: 600; }
.sn-gap { color: var(--sn-muted); }

/* ---------- menus and floating panels ---------- */
.sn-menu, .sn-panel {
  position: fixed; z-index: 1400; background: #fff; border: 1px solid #eaecf0; border-radius: 8px;
  box-shadow: 0 12px 16px -4px rgba(16, 24, 40, .08), 0 4px 6px -2px rgba(16, 24, 40, .03);
}
.sn-menu { min-width: 200px; padding: 4px; }
.sn-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; cursor: pointer;
  padding: 9px 12px; border-radius: 6px; font: inherit; font-size: 14px; color: var(--sn-text-2); text-align: left;
}
.sn-menu-item:hover { background: #f9fafb; }
.sn-menu-item .ico { color: var(--sn-muted); }
.sn-menu-item.danger, .sn-menu-item.danger .ico { color: var(--sn-red); }
.sn-panel { padding: 10px; min-width: 220px; max-width: 340px; }
.sn-panel-title { font-size: 12px; font-weight: 600; color: var(--sn-muted); text-transform: uppercase; letter-spacing: .04em; margin: 0 2px 8px; }
.sn-panel-search { margin-bottom: 8px; }
.sn-tag-panel { width: 320px; }
.sn-tag-list { max-height: 280px; overflow-y: auto; }
.sn-tag-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; border: 0; background: none;
  padding: 8px 10px; border-radius: 6px; font: inherit; font-size: 14px; color: var(--sn-text-2); cursor: pointer; text-align: left;
}
.sn-tag-row:hover { background: #f9fafb; }
.sn-tag-row.back { justify-content: flex-start; font-weight: 600; color: var(--sn-text); }
.sn-tag-row code { font-size: 11px; color: var(--sn-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.sn-none { padding: 10px; font-size: 13px; color: var(--sn-muted); }

/* Add / Edit Trigger Link (public/conversations-trigger-links.js): the
   Link URL input carries the merge-field tag inside its right edge. */
/* Measured off GHL's: a 492px modal, 33px inputs, 32px footer buttons. */
.tl-modal .sn-modal-head { padding: 16px 20px 4px; }
.tl-modal .sn-modal-body { padding: 12px 20px 4px; }
.tl-modal .sn-label { margin-bottom: 4px; }
.tl-modal .sn-input { height: 33px; padding: 6px 12px; }
.tl-modal .sn-modal-foot { padding: 12px 20px; }
.tl-modal .sn-foot-btns .sn-btn { padding: 5px 14px; }
.tl-url { position: relative; }
.tl-url .sn-input { padding-right: 40px; }
.tl-url .tl-tag {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center; border: 0; background: none;
  border-radius: 6px; color: #101828; cursor: pointer; padding: 0;
}
.tl-url .tl-tag:hover { background: #f2f4f7; }
/* The dark tooltip is the shared [data-tip] one (conversations-rail.css);
   it gets out of the way while the menu is open. */
.tl-tag[aria-expanded="true"]::after, .tl-tag[aria-expanded="true"]::before { display: none; }

/* HighRise's tree dropdown (GHL's CustomValueDropdown): 182px wide, centred
   under its anchor, a search row, 28px options padded 4px 8px, a 300px
   list. Values are the HLDropdown theme overrides in GHL's bundle. */
.sn-panel.hr-dd {
  padding: 4px 0; min-width: 0; max-width: none; border: 1px solid #d0d5dd; border-radius: 4px;
  box-shadow: 0 2px 4px -2px #1018280f, 0 4px 8px -2px #1018281a; color: #344054;
}
.hr-dd-search {
  position: relative; display: flex; align-items: center; gap: 6px; margin: 6px 8px 4px; padding: 0 8px;
  height: 28px; border: 1px solid #d0d5dd; border-radius: 4px; background: #fff; color: #667085;
}
.hr-dd-search:focus-within { border-color: #84adff; box-shadow: 0 0 0 3px #d1e0ff; }
.hr-dd-input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0; font: inherit; font-size: 14px; color: #101828; background: none; }
.hr-dd-input::placeholder { color: #667085; }
.hr-dd-clear { border: 0; background: #98a2b3; color: #fff; border-radius: 50%; width: 16px; height: 16px; padding: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.hr-dd-clear[hidden] { display: none; }
.hr-dd-list { max-height: 300px; overflow-y: auto; }
.hr-dd-opt {
  display: flex; align-items: center; gap: 4px; width: 100%; min-height: 28px; border: 0; background: none; cursor: pointer;
  padding: 4px 8px; font: inherit; font-size: 14px; line-height: 20px; color: #344054; text-align: left;
}
.hr-dd-opt:hover, .hr-dd-opt:focus-visible { background: #f2f4f7; outline: 0; }
.hr-dd-opt > .ico { flex: none; color: #667085; }
.hr-dd-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hr-dd-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-dd-info { font-size: 12px; line-height: 18px; color: #667085; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-dd-opt.back { color: #101828; font-weight: 500; }
.hr-dd-empty { padding: 6px 8px; font-size: 14px; color: #98a2b3; }
.sn-emoji-grid { display: grid; grid-template-columns: repeat(8, 32px); gap: 2px; }
.sn-emoji { border: 0; background: none; font-size: 20px; line-height: 32px; border-radius: 6px; cursor: pointer; padding: 0; }
.sn-emoji:hover { background: #f2f4f7; }
.sn-radios { display: flex; flex-direction: column; gap: 8px; margin: 4px 2px 12px; }
.sn-radio { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--sn-text-2); cursor: pointer; }
.sn-radio input { accent-color: var(--sn-blue); }
.sn-swatches { display: grid; grid-template-columns: repeat(6, 24px); gap: 6px; margin-bottom: 8px; }
.sn-swatch { width: 24px; height: 24px; border-radius: 6px; border: 1px solid #d0d5dd; cursor: pointer; padding: 0; }
.sn-color { width: 100%; height: 30px; border: 1px solid var(--sn-border); border-radius: 6px; padding: 2px; background: #fff; }

/* ---------- modals ---------- */
.sn-mask {
  position: fixed; inset: 0; z-index: 1200; background: rgba(52, 64, 84, .7); backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 48px 16px;
  animation: sn-fade .12s ease-out;
}
.sn-mask.sn-top { z-index: 1300; }
@keyframes sn-fade { from { opacity: 0 } to { opacity: 1 } }
body:has(.sn-mask) .toast { z-index: 1500; }
.sn-modal {
  background: #fff; border-radius: 12px; box-shadow: 0 20px 24px -4px rgba(16, 24, 40, .08), 0 8px 8px -4px rgba(16, 24, 40, .03);
  margin: auto 0; display: flex; flex-direction: column; color: var(--sn-text);
}
.sn-modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 4px; }
.sn-modal-titles { flex: 1; min-width: 0; }
.sn-modal-title { font-size: 16px; font-weight: 600; line-height: 24px; }
.sn-modal-sub { font-size: 14px; color: var(--sn-muted); margin-top: 2px; }
.sn-modal-x { border: 0; background: none; color: var(--sn-muted); padding: 4px; border-radius: 6px; cursor: pointer; display: inline-flex; }
.sn-modal-x:hover { background: #f2f4f7; color: var(--sn-text-2); }
.sn-modal-body { padding: 16px 20px 20px; }
.sn-modal-foot { padding: 16px 20px; border-top: 1px solid #eaecf0; }
.sn-foot-btns { display: flex; justify-content: flex-end; gap: 12px; }
.sn-foot-split { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sn-confirm { font-size: 14px; color: var(--sn-muted); }

.sn-split { display: flex; gap: 24px; align-items: center; }
.sn-form { flex: 1; min-width: 0; }
.sn-side { width: 288px; flex: none; }
.sn-block { margin-top: 4px; }
.sn-inline { display: grid; grid-template-columns: 1fr 100px; gap: 8px; align-items: start; }
.sn-inline .sn-item { margin-bottom: 8px; }
.sn-inline > .sn-btn { height: 38px; }
.sn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.sn-pair .sn-item { margin-bottom: 8px; }
.sn-send-row { display: flex; justify-content: flex-end; }
.sn-attach-row { margin: 4px 0 12px; }

/* the editor box */
.sn-editor { border: 1px solid var(--sn-border); border-radius: 8px; background: #fff; overflow: hidden; }
.sn-item.invalid .sn-editor { border-color: #fda29b; }
.sn-editor-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px; border-bottom: 1px solid #eaecf0; }
.sn-tool {
  border: 0; background: none; color: var(--sn-text-2); padding: 5px; border-radius: 6px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.sn-tool:hover { background: #f2f4f7; }
.sn-tool.on { background: #eaecf0; color: var(--sn-text); }
.sn-textarea {
  display: block; width: 100%; border: 0; outline: none; resize: vertical; min-height: 120px;
  font: inherit; font-size: 14px; color: var(--sn-text-2); padding: 12px 16px;
}
.sn-textarea::placeholder { color: var(--sn-muted); }
.sn-editor-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #eaecf0; padding: 9px 12px; font-size: 14px; color: var(--sn-muted); }
.sn-rich .sn-editor-foot { justify-content: flex-end; }
.sn-cost { display: inline-flex; align-items: center; gap: 6px; }
.sn-tip { display: inline-flex; cursor: help; }
.sn-count { text-align: right; flex: 1; }

/* the rich-text editor */
.sn-rte-tools { gap: 6px 7px; padding: 10px 14px; }
.sn-rte-select {
  font: inherit; font-size: 14px; color: var(--sn-text-2); background: #fff; border: 1px solid var(--sn-border);
  border-radius: 6px; padding: 4px 8px; height: 32px;
}
.sn-rte-select.blocks { width: 214px; }
.sn-rte-select.size { width: 106px; }
.sn-rte-select.lh { width: 75px; }
.sn-rte-select.font { width: 216px; }
.sn-rte {
  min-height: 140px; max-height: 340px; overflow-y: auto; resize: vertical; outline: none;
  padding: 12px; font-size: 14px; line-height: 1.5; color: var(--sn-text); position: relative; word-wrap: break-word;
}
.sn-rte.empty::before { content: attr(data-placeholder); color: var(--sn-text-2); position: absolute; pointer-events: none; }
.sn-rte p { margin: 0; }
.sn-rte blockquote { border-left: 3px solid #d0d5dd; margin: 4px 0; padding-left: 12px; color: var(--sn-muted); }
.sn-rte pre { background: #f2f4f7; border-radius: 6px; padding: 8px 10px; font-size: 13px; white-space: pre-wrap; }
.sn-rte code { background: #f2f4f7; border-radius: 4px; padding: 1px 4px; font-size: 13px; }
.sn-rte img { max-width: 100%; }
.sn-rte a { color: var(--sn-blue); }
.sn-source { width: 100%; min-height: 340px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; border: 1px solid var(--sn-border); border-radius: 8px; padding: 10px; }

/* attachments */
.sn-files { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 6px; }
.sn-files[hidden] { display: none; }
.sn-file {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; font-size: 13px; color: var(--sn-text-2);
  border: 1px solid #eaecf0; border-radius: 8px; padding: 5px 6px 5px 10px; background: #fff;
}
.sn-file a { color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sn-file a:hover { color: var(--sn-blue); }
.sn-file .ico { color: var(--sn-blue); }
.sn-file-note { font-size: 12px; color: var(--sn-muted); }
.sn-file-x { border: 0; background: none; color: var(--sn-red); padding: 3px; border-radius: 4px; cursor: pointer; display: inline-flex; }
.sn-file-x:hover { background: #fef3f2; }
.sn-urls { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.sn-url { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.sn-url .ico { color: var(--sn-blue); flex: none; }
.sn-url a { color: var(--sn-text-2); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- the phone ---------- */
.sn-phone-wrap { display: flex; justify-content: center; }
.sn-phone {
  position: relative; width: 260px; height: 525px; background: #fff; border: 4px solid #000; border-radius: 2.5rem;
  display: flex; flex-direction: column; overflow: hidden;
}
.sn-phone-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 96px; height: 20px; background: #000; border-radius: 0 0 16px 16px; z-index: 2; }
.sn-phone-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px 0 22px; font-size: 12px; font-weight: 500; height: 34px; flex: none; }
.sn-phone-batt { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; }
.sn-batt { width: 22px; height: 11px; border: 1.5px solid #111; border-radius: 3px; position: relative; padding: 1px; display: inline-block; }
.sn-batt::before { content: ""; display: block; height: 100%; width: 75%; background: #22c55e; border-radius: 1px; }
.sn-batt::after { content: ""; position: absolute; right: -4px; top: 2.5px; width: 2px; height: 4px; background: #111; border-radius: 0 1px 1px 0; }
.sn-phone-screen { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; justify-content: flex-end; padding: 10px; }
.sn-phone-home { width: 64px; height: 6px; background: #d1d5db; border-radius: 999px; margin: 14px auto 10px; flex: none; }
.sn-bubble-wrap { align-self: flex-end; max-width: 90%; display: flex; flex-direction: column; align-items: flex-end; }
.sn-bubble {
  background: #2563eb; color: #fff; padding: 8px 12px; font-size: 14px; line-height: 1.35; white-space: pre-line;
  border-radius: 18px 18px 4px 18px; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); word-break: break-word; text-align: left;
}
.sn-bubble:empty { display: none; }
.sn-bubble-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; justify-content: flex-end; }
.sn-bubble-img { height: 128px; border-radius: 18px 18px 4px 18px; overflow: hidden; background: #f3f4f6; }
.sn-bubble-img img { height: 100%; width: auto; max-width: 200px; object-fit: cover; display: block; }
.sn-bubble-file { background: #f3f4f6; padding: 8px; border-radius: 18px 18px 4px 18px; max-width: 200px; }
.sn-bubble-file .sn-file { border: 0; background: none; padding: 0; }
.sn-read { font-size: 12px; color: #9ca3af; text-align: right; margin-top: 4px; padding-right: 4px; }

.sn-phone-screen:has(.sn-mail) { justify-content: flex-start; padding: 6px 10px; }
.sn-mail { font-size: 12px; color: #111827; }
.sn-mail-from { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.sn-mail-avatar { width: 32px; height: 32px; border-radius: 50%; background: #dbeafe; color: #1d4ed8; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.sn-mail-name { font-weight: 600; font-size: 13px; }
.sn-mail-addr, .sn-mail-to, .sn-mail-date { color: #6b7280; font-size: 11px; }
.sn-mail-to b { color: #374151; font-weight: 600; }
.sn-mail-subject { font-weight: 600; font-size: 14px; margin: 8px 0 2px; word-break: break-word; }
.sn-mail-subject.placeholder { color: #9ca3af; }
.sn-mail-body { border-top: 1px solid #e5e7eb; margin-top: 8px; padding-top: 8px; }
.sn-mail-frame { width: 100%; height: 160px; border: 0; display: block; }
.sn-mail-empty { color: #9ca3af; font-size: 12px; }
.sn-mail-att-count { font-size: 11px; color: #6b7280; margin: 8px 0 4px; }
.sn-mail-atts { display: flex; flex-wrap: wrap; gap: 6px; }
.sn-mail-att-img { width: 64px; height: 64px; border-radius: 6px; overflow: hidden; background: #f3f4f6; }
.sn-mail-att-img img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px) {
  .sn-split { flex-direction: column; align-items: stretch; }
  .sn-side { width: auto; }
  .sn-pair { grid-template-columns: 1fr; gap: 0; }
  .sn-rte-select.blocks, .sn-rte-select.font { width: 180px; }
}
@media (max-width: 560px) {
  .sn-page { padding: 4px 12px 20px; }
  .sn-head { flex-direction: column; }
  .sn-search { width: 100%; }
  .sn-foot { justify-content: flex-start; }
  .sn-mask { padding: 16px 8px; }
  .sn-inline { grid-template-columns: 1fr 88px; }
}
