/* CaseAid command center styling, scoped to the Van Every search dialog. */

.ca-search-launch {
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(310px, 22vw);
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d6dce5;
  border-radius: 10px;
  background: #f8f9fb;
  color: #667389;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.ca-search-launch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-search-launch .action-search-icon { font-size: 22px; line-height: 1; }
.ca-search-launch kbd {
  margin-left: auto;
  border: 1px solid #d9dee7;
  border-radius: 5px;
  padding: 2px 5px;
  background: #fff;
  white-space: nowrap;
  font-size: 13px;
}
.ca-search-launch:focus-visible { outline: 2px solid #155eef; outline-offset: 2px; }

.ve-caseaid-search.command-overlay {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  overflow: hidden;
  color: #1b293f;
  overscroll-behavior: contain;
}
.ve-caseaid-search::backdrop { background: transparent; }

.ve-caseaid-search.command-overlay[open] {
  position:fixed;
  inset:0;
  z-index:360;
  padding:22px;
  display:grid;
  place-items:start center;
  background:rgba(13,22,38,.66);
  backdrop-filter:blur(5px);
}

.ve-caseaid-search .command-center {
  width:min(1180px,96vw);
  height:min(840px,calc(100vh - 44px));
  display:grid;
  grid-template-rows:auto auto minmax(0,1fr) auto;
  overflow:hidden;
  border:1px solid #cdd6e2;
  border-radius:15px;
  background:#f3f6fa;
  box-shadow:0 30px 90px rgba(6,14,29,.38);
}

.ve-caseaid-search .command-searchbar {
  height:76px;
  padding:0 20px;
  display:grid;
  grid-template-columns:36px 1fr auto 40px;
  align-items:center;
  gap:10px;
  border-bottom:1px solid #d8dfe8;
  background:#fff;
}

.ve-caseaid-search .command-searchbar>span {
  color:#155eef;
  font-size:30px;
}

.ve-caseaid-search .command-searchbar input {
  width:100%;
  height:52px;
  border:0;
  outline:0;
  background:transparent;
  color:#18243a;
  font-size:18px;
  font-weight:650;
}

.ve-caseaid-search .command-searchbar input::placeholder {
  color:#8a95a5;
  font-weight:550;
}

.ve-caseaid-search .command-searchbar kbd {
  padding:6px 8px;
  border:1px solid #cbd4df;
  border-radius:6px;
  background:#f5f7fa;
  color:#667389;
  font-size:13px;
  font-weight:850;
}

.ve-caseaid-search .command-searchbar button {
  width:38px;
  height:38px;
  border:1px solid #cbd4df;
  border-radius:8px;
  background:#fff;
  color:#4e5c72;
  font-size:22px;
}

.ve-caseaid-search .command-filters {
  padding:0 16px;
  display:flex;
  gap:3px;
  overflow-x:auto;
  border-bottom:1px solid #d8dfe8;
  background:#fff;
}

.ve-caseaid-search .command-filters button {
  height:49px;
  padding:0 12px;
  display:flex;
  align-items:center;
  gap:6px;
  border:0;
  border-bottom:3px solid transparent;
  background:transparent;
  color:#627086;
  font-size:13px;
  font-weight:850;
  white-space:nowrap;
}

.ve-caseaid-search .command-filters button.active {
  border-bottom-color:#155eef;
  color:#155eef;
}

.ve-caseaid-search .command-filters button span {
  min-width:22px;
  height:21px;
  padding:0 5px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:#edf1f6;
  color:#53637b;
  font-size:12px;
}

.ve-caseaid-search .command-filters button.active span {
  background:#e5edff;
  color:#155eef;
}

.ve-caseaid-search .command-layout {
  min-height:0;
  display:grid;
  grid-template-columns:minmax(650px,1fr) 330px;
}

.ve-caseaid-search .command-results {
  min-height:0;
  overflow-y:auto;
  background:#fff;
}

.ve-caseaid-search .command-result-heading {
  padding:18px 20px 13px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}

.ve-caseaid-search .command-result-heading h2 {
  margin:5px 0 0;
  font-size:22px;
  letter-spacing:-.035em;
}

.ve-caseaid-search .command-result-heading>button {
  height:37px;
  padding:0 12px;
  border:1px solid #bfd0ee;
  border-radius:7px;
  background:#f5f8ff;
  color:#155eef;
  font-size:13px;
  font-weight:850;
}

.ve-caseaid-search .save-search-row {
  margin:0 18px 14px;
  padding:13px;
  display:grid;
  grid-template-columns:1fr auto;
  align-items:end;
  gap:12px;
  border:1px solid #bfcfed;
  border-radius:9px;
  background:#f2f6ff;
}

.ve-caseaid-search .save-search-row label>span {
  display:block;
  margin-bottom:5px;
  color:#59687f;
  font-size:13px;
  font-weight:900;
  text-transform:uppercase;
}

.ve-caseaid-search .save-search-row input {
  width:100%;
  height:40px;
  padding:0 10px;
  border:1px solid #c8d2e0;
  border-radius:7px;
  background:#fff;
  color:#27384f;
  font-size:13px;
}

.ve-caseaid-search .save-search-row>div {
  display:grid;
  justify-items:end;
  gap:6px;
}

.ve-caseaid-search .save-search-row small {
  color:#68758a;
  font-size:13px!important;
}

.ve-caseaid-search .save-search-row button {
  height:40px;
  padding:0 13px;
  border:0;
  border-radius:7px;
  background:#155eef;
  color:#fff;
  font-size:13px;
  font-weight:850;
}

.ve-caseaid-search .save-search-row button:disabled {
  background:#aab7cb;
}

.ve-caseaid-search .result-group {
  border-top:1px solid #e2e7ed;
}

.ve-caseaid-search .result-group>header {
  height:43px;
  padding:0 18px;
  display:flex;
  align-items:center;
  gap:9px;
  background:#f6f8fb;
}

.ve-caseaid-search .result-group>header>strong {
  font-size:13px;
}

.ve-caseaid-search .result-group>header>b {
  margin-left:auto;
  color:#647187;
  font-size:13px;
}

.ve-caseaid-search .result-type-icon {
  width:26px;
  height:26px;
  display:grid;
  place-items:center;
  border-radius:7px;
  background:#e6eeff;
  color:#155eef;
  font-size:12px;
  font-weight:950;
}

.ve-caseaid-search .search-result {
  width:100%;
  min-height:78px;
  padding:10px 18px;
  display:grid;
  grid-template-columns:40px minmax(0,1fr) auto 62px;
  align-items:center;
  gap:11px;
  border:0;
  border-top:1px solid #e7ebf0;
  background:#fff;
  color:#1b293f;
  text-align:left;
}

.ve-caseaid-search .search-result:hover {
  background:#f5f8ff;
}

.ve-caseaid-search .result-avatar {
  width:39px;
  height:39px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:#e6eeff;
  color:#155eef;
  font-size:12px;
  font-weight:950;
}

.ve-caseaid-search .result-avatar.communication,
.ve-caseaid-search .result-type-icon.communication {
  background:#e8f7f1;
  color:#087757;
}

.ve-caseaid-search .result-avatar.document,
.ve-caseaid-search .result-type-icon.document {
  background:#fff1d8;
  color:#8a5a0b;
}

.ve-caseaid-search .result-avatar.task,
.ve-caseaid-search .result-type-icon.task {
  background:#f1eaff;
  color:#6d47b1;
}

.ve-caseaid-search .result-avatar.signed-case,
.ve-caseaid-search .result-type-icon.signed-case {
  background:#e3f8f0;
  color:#077454;
}

.ve-caseaid-search .result-avatar.integration,
.ve-caseaid-search .result-type-icon.integration {
  background:#ffebe9;
  color:#b42318;
}

.ve-caseaid-search .result-avatar.automation,
.ve-caseaid-search .result-type-icon.automation {
  background:#ede9ff;
  color:#5a44b3;
}

.ve-caseaid-search .search-result>span:nth-child(2) {
  min-width:0;
}

.ve-caseaid-search .search-result strong,
.ve-caseaid-search .search-result small,
.ve-caseaid-search .search-result p {
  display:block;
}

.ve-caseaid-search .search-result strong {
  font-size:14px;
}

.ve-caseaid-search .search-result small {
  margin-top:3px;
  color:#667389;
  font-size:13px!important;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.ve-caseaid-search .search-result p {
  margin:4px 0 0;
  color:#7a8597;
  font-size:13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.ve-caseaid-search .result-badge {
  max-width:145px;
  padding:5px 7px;
  border-radius:6px;
  background:#edf2f8;
  color:#4e5d73;
  font-size:12px;
  font-weight:850;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.ve-caseaid-search .result-open {
  color:#155eef;
  font-size:13px;
  font-weight:900;
}

.ve-caseaid-search .no-command-results {
  padding:80px 30px;
  display:grid;
  place-items:center;
  text-align:center;
}

.ve-caseaid-search .no-command-results>span {
  font-size:42px;
  color:#a0adbd;
}

.ve-caseaid-search .no-command-results strong {
  margin-top:10px;
  font-size:18px;
}

.ve-caseaid-search .no-command-results p {
  max-width:490px;
  margin:7px 0 0;
  color:#68758a;
  font-size:13px;
  line-height:1.55;
}

.ve-caseaid-search .command-sidebar {
  min-height:0;
  overflow-y:auto;
  border-left:1px solid #d7dee8;
  background:#f6f8fb;
}

.ve-caseaid-search .command-sidebar>section {
  padding:16px;
  border-bottom:1px solid #dce2ea;
}

.ve-caseaid-search .command-sidebar section>header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
}

.ve-caseaid-search .command-sidebar section>header>b {
  width:25px;
  height:25px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#e6eeff;
  color:#155eef;
  font-size:12px;
}

.ve-caseaid-search .command-sidebar section>button {
  width:100%;
  min-height:56px;
  padding:8px 4px;
  display:grid;
  grid-template-columns:24px 1fr auto;
  align-items:center;
  gap:8px;
  border:0;
  border-top:1px solid #e1e6ed;
  background:transparent;
  color:#24344c;
  text-align:left;
}

.ve-caseaid-search .command-sidebar section>button:hover {
  background:#fff;
}

.ve-caseaid-search .command-sidebar section>button>span {
  color:#155eef;
  font-size:15px;
}

.ve-caseaid-search .command-sidebar section>button strong,
.ve-caseaid-search .command-sidebar section>button small {
  display:block;
}

.ve-caseaid-search .command-sidebar section>button strong {
  font-size:13px;
}

.ve-caseaid-search .command-sidebar section>button small {
  margin-top:3px;
  color:#6c788b;
  font-size:13px!important;
  line-height:1.35;
}

.ve-caseaid-search .command-sidebar section>button>b {
  color:#6b778a;
  font-size:13px;
}

.ve-caseaid-search .command-permission {
  background:#eef8f4;
}

.ve-caseaid-search .command-permission span,
.ve-caseaid-search .command-permission strong {
  display:block;
}

.ve-caseaid-search .command-permission span {
  color:#087757;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
}

.ve-caseaid-search .command-permission strong {
  margin-top:4px;
  font-size:13px;
}

.ve-caseaid-search .command-permission p {
  margin:5px 0 0;
  color:#567065;
  font-size:13px;
  line-height:1.5;
}

.ve-caseaid-search .command-footer {
  height:46px;
  padding:0 18px;
  display:flex;
  align-items:center;
  gap:22px;
  border-top:1px solid #d8dfe8;
  background:#fff;
  color:#6b778a;
  font-size:13px;
}

.ve-caseaid-search .command-footer span {
  display:flex;
  align-items:center;
  gap:5px;
}

.ve-caseaid-search .command-footer kbd {
  padding:3px 5px;
  border:1px solid #cbd4df;
  border-radius:4px;
  background:#f5f7fa;
  font-size:12px;
}

.ve-caseaid-search .command-footer strong {
  margin-left:auto;
  color:#44536a;
  font-size:13px;
  text-transform:capitalize;
}

.ve-caseaid-search .ca-search-kicker {
  color: #627086;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ve-caseaid-search [hidden] { display: none !important; }
.ve-caseaid-search button { cursor: pointer; }
.ve-caseaid-search button:focus-visible { outline: 2px solid #155eef; outline-offset: -2px; }
.ve-caseaid-search .search-result.is-highlighted {
  background: #edf4ff;
  box-shadow: inset 4px 0 0 #155eef;
}
.ve-caseaid-search .result-avatar.message,
.ve-caseaid-search .result-type-icon.message { background: #e8f7f1; color: #087757; }
.ve-caseaid-search .result-avatar.deadline,
.ve-caseaid-search .result-type-icon.deadline { background: #ffebe9; color: #b42318; }
.ve-caseaid-search .ca-search-limit { padding: 14px 18px; color: #68758a; }

@media (min-width: 901px) and (max-width: 1550px) {
  .ca-search-launch { width: 42px; padding: 0; justify-content: center; }
  .ca-search-launch > span:not(.action-search-icon), .ca-search-launch kbd { display: none; }
}
@media (max-width: 1180px) {
  .ve-caseaid-search.command-overlay[open] { padding: 10px; }
  .ve-caseaid-search .command-center { width: 100%; height: calc(100dvh - 20px); }
  .ve-caseaid-search .command-layout { grid-template-columns: minmax(0, 1fr) 290px; }
}
@media (max-width: 900px) {
  .ca-search-launch { width: 42px; padding: 0; justify-content: center; }
  .ca-search-launch > span:not(.action-search-icon), .ca-search-launch kbd { display: none; }
  .ve-caseaid-search .command-layout { display: block; overflow-y: auto; background: #fff; }
  .ve-caseaid-search .command-results, .ve-caseaid-search .command-sidebar { overflow: visible; }
  .ve-caseaid-search .command-sidebar { border-left: 0; border-top: 1px solid #d7dee8; }
}
@media (max-width: 640px) {
  .ve-caseaid-search.command-overlay[open] { padding: 0; }
  .ve-caseaid-search .command-center { height: 100dvh; border-radius: 0; }
  .ve-caseaid-search .command-searchbar { height: 62px; padding: 0 10px; grid-template-columns: 24px minmax(0, 1fr) 38px; gap: 7px; }
  .ve-caseaid-search .command-searchbar input { font-size: 16px; }
  .ve-caseaid-search .command-searchbar kbd { display: none; }
  .ve-caseaid-search .command-result-heading { padding: 16px 12px; gap: 8px; }
  .ve-caseaid-search .command-result-heading h2 { font-size: 19px; overflow-wrap: anywhere; }
  .ve-caseaid-search .command-result-heading > button { flex-shrink: 0; }
  .ve-caseaid-search .search-result { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 8px; padding-inline: 10px; }
  .ve-caseaid-search .result-avatar { width: 34px; height: 34px; }
  .ve-caseaid-search .result-badge { max-width: 100px; }
  .ve-caseaid-search .result-open { display: none; }
  .ve-caseaid-search .save-search-row { margin-inline: 12px; grid-template-columns: 1fr; }
  .ve-caseaid-search .command-footer { gap: 8px; padding-inline: 9px; justify-content: space-between; font-size: 11px; }
  .ve-caseaid-search .command-footer kbd { font-size: 10px; }
}
