/* Conversations: GHL's inbox rail, its dropdowns and the filter drawer
   (public/conversations-rail.js). Sizes and colours are GHL's own classes
   from InboxPanelView / MenuSection / FilterGroup: the panel is
   bg-[#ECEEF2], an active item is white with a #004EEB border, icons are
   #344054 at rest and #004EEB when selected. */

/* The panel column is conversations-panel.css's (420px, 62px when hidden);
   this file loads after it and only changes the rail's width. */
.conv { grid-template-columns: 64px 300px minmax(0, 1fr) 420px; }
.conv.cg-panel-hidden { grid-template-columns: 64px 300px minmax(0, 1fr) 62px; }
.conv.crl-wide { grid-template-columns: 220px 300px minmax(0, 1fr) 420px; }
.conv.crl-wide.cg-panel-hidden { grid-template-columns: 220px 300px minmax(0, 1fr) 62px; }
@media (max-width: 1280px) {
  .conv, .conv.cg-panel-hidden { grid-template-columns: 64px 270px minmax(0, 1fr); }
  .conv.crl-wide, .conv.crl-wide.cg-panel-hidden { grid-template-columns: 220px 270px minmax(0, 1fr); }
}

.conv > .conv-rail.crl {
  position: relative; background: #eceef2; border: 0; box-shadow: none;
  padding: 12px 8px 8px; gap: 0; align-items: center; overflow: visible;
}
.conv-rail.crl.crl-expanded { padding: 12px 12px 8px; align-items: stretch; }

.crl-toggle {
  position: absolute; top: 50%; right: -12px; transform: translateY(-50%); z-index: 10;
  width: 24px; height: 24px; border: 0; border-radius: 50%; background: #fff; color: #101828;
  box-shadow: 0 2px 6px rgba(16, 24, 40, .16); display: grid; place-items: center; cursor: pointer; padding: 0;
}
.crl-toggle:hover { background: #f9fafb; }

.crl-top { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 8px; width: 100%; }
.crl-expanded .crl-top { align-items: stretch; }
.crl-compose {
  width: 40px; height: 40px; border: 0; border-radius: 8px; background: #155eef; color: #fff;
  display: grid; place-items: center; cursor: pointer; position: relative;
}
.crl-compose:hover { background: #004eeb; }
.crl-search {
  width: 40px; height: 32px; border: 1px solid transparent; border-radius: 6px; background: none; color: #344054;
  display: grid; place-items: center; cursor: pointer; position: relative;
}
.crl-search:hover { color: #101828; }
.crl-search.on { color: #004eeb; }
.crl-expanded .crl-compose, .crl-expanded .crl-search {
  width: 100%; height: 32px; display: flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 12.5px; font-weight: 600; border-radius: 4px;
}
.crl-expanded .crl-search {
  justify-content: flex-start; padding: 0 10px; background: #fff; border-color: #d0d5dd; color: #344054;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}
.crl-expanded .crl-search.on { border-color: #004eeb; color: #004eeb; }
.crl-expanded .crl-import { justify-content: center; }
.crl-search-box {
  display: flex; align-items: center; gap: 6px; width: 100%; height: 32px; padding: 0 10px; box-sizing: border-box;
  background: #fff; border: 1px solid #d0d5dd; border-radius: 4px; color: #667085;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}
.crl-search-box:focus-within, .crl-search-box.on { border-color: #004eeb; box-shadow: 0 0 0 3px #eff4ff; }
.crl-search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 13px; color: #101828; }

.crl-menu { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.crl-expanded .crl-menu { align-items: stretch; gap: 2px; }
.crl-item {
  width: 40px; height: 40px; border: 1px solid transparent; border-radius: 6px; background: none;
  color: #344054; display: grid; place-items: center; cursor: pointer; position: relative; padding: 0;
}
.crl-item:hover { background: rgba(255, 255, 255, .6); }
.crl-item.on, .crl-item.crl-open { background: #fff; border-color: #004eeb; color: #004eeb; }
.crl-expanded .crl-item, .crl-acc-head {
  width: 100%; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 10px;
  font: inherit; font-size: 14px; color: #101828; text-align: left; border-radius: 6px;
}
.crl-acc-head {
  border: 1px solid transparent; background: none; cursor: pointer; justify-content: space-between;
  font-weight: 500; color: #101828;
}
.crl-acc-head:hover { background: rgba(255, 255, 255, .6); }
.crl-acc-head.on { color: #004eeb; }
.crl-expanded .crl-item.on { background: #fff; border-color: transparent; color: #004eeb; font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); }
.crl-expanded .crl-child { padding-left: 18px; }
.crl-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crl-divider { width: 40px; height: 1px; background: #d0d5dd; margin: 4px 0; }
.crl-expanded .crl-divider { width: 100%; margin: 8px 0; }
.crl-views { display: flex; flex-direction: column; align-items: center; width: 100%; gap: 2px; }
.crl-expanded .crl-views { align-items: stretch; }
.crl-views-label { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.crl-info { display: inline-flex; color: #667085; position: relative; }

/* hover tooltips: GHL's dark n-tooltip above the control */
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  background: #101828; color: #fff; font-size: 13px; font-weight: 500; line-height: 1.35; white-space: nowrap;
  padding: 7px 10px; border-radius: 6px; z-index: 50; pointer-events: none; text-align: left;
}
[data-tip]:hover::before {
  content: ''; position: absolute; left: 50%; bottom: calc(100% + 3px); transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: #101828; z-index: 50; pointer-events: none;
}
.crl-item.crl-open[data-tip]::after, .crl-item.crl-open[data-tip]::before { display: none; }
/* GHL places the rail's tooltips top-start: left-aligned with the icon, so
   the first column of the page never clips them. */
.conv-rail [data-tip]:not(.crl-tip-wide):hover::after { left: -4px; transform: none; }
.conv-rail [data-tip]:not(.crl-tip-wide):hover::before { left: 15px; transform: none; }
.crl-tip-wide[data-tip]:hover::after { white-space: normal; width: 300px; left: 0; transform: none; }
.crl-tip-wide[data-tip]:hover::before { left: 10px; transform: none; }
.crl-tip-below[data-tip]:hover::after { bottom: auto; top: calc(100% + 6px); }
.crl-tip-below[data-tip]:hover::before { display: none; }

/* dropdowns */
.crl-pop {
  position: fixed; z-index: 1200; background: #fff; border: 1px solid #d0d5dd; border-radius: 6px;
  box-shadow: 0 12px 16px -4px rgba(16, 24, 40, .08), 0 4px 6px -2px rgba(16, 24, 40, .03);
  padding: 4px; display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto;
}
.crl-opt {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 12px;
  border: 1px solid transparent; border-radius: 4px; background: none; font: inherit; font-size: 14px;
  color: #344054; text-align: left; cursor: pointer;
}
.crl-opt:hover { background: #f9fafb; }
.crl-opt.on { background: #eff4ff; color: #101828; }
.crl-opt.on > .ico:last-child { color: #155eef; }
.crl-opt.disabled { color: #98a2b3; cursor: not-allowed; }
.crl-opt.disabled:hover { background: none; }
.crl-new {
  font-size: 11px; font-weight: 600; color: #067647; background: #ecfdf3; border-radius: 10px; padding: 1px 7px;
}
.crl-warn { display: inline-flex; color: #f59e0b; margin-left: auto; }
.crl-none { padding: 8px 12px; font-size: 12px; color: #667085; }
.crl-create {
  display: flex; align-items: center; gap: 6px; padding: 8px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 500; color: #004eeb; text-align: left; border-radius: 4px;
}
.crl-create:hover { font-weight: 600; background: #f9fafb; }
.crl-create-exp { padding: 8px 10px; }
.crl-view-search {
  width: 100%; height: 32px; border: 1px solid #d0d5dd; border-radius: 6px; padding: 0 10px; margin: 2px 0 4px;
  font: inherit; font-size: 13px; outline: 0; background: #fff; color: #101828; box-sizing: border-box;
}
.crl-view-search:focus { border-color: #84adff; box-shadow: 0 0 0 3px #eff4ff; }
.crl-view-list { display: flex; flex-direction: column; gap: 2px; }
.crl-view {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 4px; cursor: pointer;
  font-size: 14px; color: #101828; min-height: 32px;
}
.crl-view:hover { background: #f9fafb; }
.crl-view:hover .crl-view-name { font-weight: 600; }
.crl-view.on { background: #d1e0ff; }
.crl-expanded .crl-view.on { background: #fff; color: #004eeb; }
.crl-view-ico { display: inline-flex; color: #98a2b3; }
.crl-view-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crl-view-check { display: inline-flex; color: #004eeb; }
.crl-view-more {
  border: 0; background: none; padding: 2px; border-radius: 4px; display: inline-flex; color: #667085;
  cursor: pointer; opacity: 0;
}
.crl-view:hover .crl-view-more, .crl-view-more.crl-open { opacity: 1; }
.crl-view-more.disabled { color: #d0d5dd; cursor: not-allowed; }
.crl-more {
  display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border: 0; background: none;
  font: inherit; font-size: 14px; font-weight: 500; color: #004eeb; cursor: pointer; border-radius: 4px;
}
.crl-more-pop { padding: 8px; gap: 8px; }
.crl-more-item {
  display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 2px 4px; cursor: pointer;
  font: inherit; font-size: 14px; color: #101828; text-align: left;
}
.crl-more-item:hover { font-weight: 600; }
.crl-more-item.danger:hover { color: #b42318; }

/* the drawer: GHL's n-drawer at the right edge over a dim mask */
.crl-mask {
  position: fixed; inset: 0; z-index: 1100; background: rgba(16, 24, 40, .6);
  display: flex; justify-content: flex-end;
}
.crl-drawer {
  width: min(466px, 100vw); height: 100%; background: #fff; display: flex; flex-direction: column;
  box-shadow: -12px 0 24px rgba(16, 24, 40, .12); outline: 0;
}
.crl-dr-head {
  display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 14px;
  border-bottom: 1px solid #d0d5dd; min-height: 52px;
}
.crl-dr-title { display: flex; align-items: center; gap: 10px; color: #475467; }
.crl-dr-title span { font-size: 15px; font-weight: 500; color: #101828; }
.crl-dr-title span.big { font-size: 16px; }
.crl-dr-acts { display: flex; align-items: center; gap: 8px; }
.crl-dr-clear { border: 0; background: none; font: inherit; font-size: 16px; color: #475467; cursor: pointer; padding: 4px 6px; }
.crl-dr-clear:hover { color: #1d2939; }
.crl-dr-x { border: 0; background: none; color: #475467; cursor: pointer; padding: 4px; display: inline-flex; border-radius: 4px; }
.crl-dr-x:hover { color: #1d2939; background: #f2f4f7; }
.crl-dr-name {
  display: flex; align-items: center; gap: 6px; margin: 12px 8px 0; padding: 0 10px; height: 40px;
  border: 1px solid #d0d5dd; border-radius: 4px; color: #475467;
}
.crl-dr-name:focus-within { border-color: #84adff; box-shadow: 0 0 0 3px #eff4ff; }
.crl-dr-name input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 15px; color: #101828; background: none; }
.crl-dr-body { flex: 1; overflow-y: auto; background: #f9fafb; margin: 12px 8px; padding: 8px; border-radius: 8px; }
.crl-dr-foot {
  display: flex; justify-content: flex-end; gap: 10px; padding: 14px 16px; border-top: 1px solid #eaecf0;
}
.crl-dr-foot .btn { min-width: 84px; justify-content: center; display: inline-flex; align-items: center; gap: 6px; }
.crl-dr-foot .btn:disabled { opacity: .45; cursor: not-allowed; }

.crl-filter {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px;
  background: #fff; border: 1px solid #eaecf0; border-radius: 12px;
}
.crl-filter.in-group { background: transparent; border: 0; padding: 10px 28px 10px 10px; }
.crl-and-group {
  position: relative; background: #eff4ff; border: 1px solid #84adff; border-radius: 12px; padding: 2px 0;
}
.crl-rm {
  position: absolute; top: -9px; right: -9px; width: 20px; height: 20px; padding: 0; z-index: 2;
  border: 1px solid #d0d5dd; border-radius: 50%; background: #fff; color: #64748b;
  display: grid; place-items: center; cursor: pointer;
}
.crl-rm:hover { background: #fee4e2; color: #b42318; }
.crl-filter.in-group > .crl-rm { top: 50%; right: 6px; transform: translateY(-50%); }
.crl-and-group > .crl-rm-group { top: -10px; right: -10px; }

.crl-select {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; min-height: 44px;
  padding: 4px 12px; border: 1px solid #d0d5dd; border-radius: 6px; background: #fff; color: #101828;
  font: inherit; font-size: 15px; cursor: pointer; text-align: left;
}
.crl-select:hover:not(:disabled) { border-color: #84adff; }
.crl-select.crl-open { border-color: #84adff; box-shadow: 0 0 0 3px #eff4ff; }
.crl-select.disabled { background: #f9fafb; color: #98a2b3; cursor: not-allowed; }
.crl-select > .ico { color: #667085; flex: none; }
.crl-select-val { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.crl-select-val > span:not(.crl-chip) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crl-ph { color: #667085; }
.crl-select.disabled .crl-ph { color: #98a2b3; }
.crl-chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 500; color: #344054;
  background: #f2f4f7; border: 1px solid #eaecf0; border-radius: 6px; padding: 1px 4px 1px 8px; max-width: 100%;
}
.crl-chip-x { display: inline-flex; color: #98a2b3; cursor: pointer; padding: 2px; border-radius: 3px; }
.crl-chip-x:hover { color: #b42318; background: #fee4e2; }
.crl-select-pop { max-height: 280px; }
.crl-select-list { display: flex; flex-direction: column; gap: 2px; }
.crl-num {
  width: 100%; height: 44px; border: 1px solid #d0d5dd; border-radius: 6px; padding: 0 12px;
  font: inherit; font-size: 15px; color: #101828; background: #fff; box-sizing: border-box;
}
.crl-range { display: flex; align-items: center; gap: 8px; }
.crl-range-to { width: 50px; text-align: center; color: #344054; font-size: 14px; flex: none; }
.crl-dep { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.crl-dep-label { font-size: 13px; font-weight: 500; color: #344054; }

.crl-join { display: flex; flex-direction: column; align-items: center; margin: 8px 0; }
.crl-and-group .crl-join { margin: 2px 0; }
.crl-tail { margin-top: 12px; }
.crl-dots { width: 1px; height: 16px; border-left: 1px dotted #d0d5dd; }
.crl-andor {
  display: inline-flex; align-items: center; border: 1px solid #eaecf0; border-radius: 6px; background: #fff; padding: 2px;
}
.crl-andor.set { border-color: #84adff; }
.crl-andor-btn {
  min-width: 40px; height: 24px; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600;
  color: #98a2b3; cursor: pointer; border-radius: 4px;
}
.crl-andor-btn + .crl-andor-btn { border-left: 1px solid #d0d5dd; border-radius: 0 4px 4px 0; }
.crl-andor-btn:hover:not(:disabled) { color: #344054; background: #f9fafb; }
.crl-andor-btn.on { background: #155eef; color: #fff; }
.crl-andor-btn:disabled { cursor: not-allowed; color: #d0d5dd; }

/* Internal chat: GHL's empty panes */
.crl-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 24px; text-align: center;
}
.crl-empty-title { font-size: 22px; font-weight: 500; color: #475467; }
.crl-empty-sub { font-size: 14.5px; color: #667085; letter-spacing: .01em; }
.crl-empty-ico { color: #667085; margin-bottom: 10px; }
.crl-empty-ico svg { width: 52px; height: 52px; stroke-width: 1.5; }
.crl-empty .crl-empty-h3 { font-size: 20px; font-weight: 500; color: #101828; }

/* list header: Save ▾ for an edited view, with GHL's red dot */
.crl-save-wrap { position: relative; margin-right: 6px; }
.crl-save-wrap::after {
  content: ''; position: absolute; top: -2px; right: -2px; width: 7px; height: 7px; border-radius: 50%; background: #f04438;
}
.crl-save-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border: 1px solid #b2ccff;
  border-radius: 4px; background: #eff4ff; color: #004eeb; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.crl-filter-btn { position: relative; }
.crl-filter-count {
  position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
  background: #155eef; color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
}

