/* Search overlay + assistant chrome. Loaded by both themes so Original's
   frozen CSS/JS stay untouched. */

.cc-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  color: #1e3a5f;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
}
.cc-search-btn--labeled {
  width: auto;
  min-height: 2.5rem;
  padding: 0 0.65rem 0 0.55rem;
  border-color: #e2e8f0;
  background: #fff;
}
.cc-search-btn:hover,
.cc-search-btn:focus-visible {
  background: #eff6ff;
  color: #1d4ed8;
  outline: none;
}
.cc-search-btn--labeled:hover,
.cc-search-btn--labeled:focus-visible {
  border-color: #bfdbfe;
}
.cc-search-btn svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.cc-search-btn__label {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
}
.cc-search-btn__kbd {
  display: none;
  font-size: 0.65rem;
  font-weight: 600;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 0.35rem;
  padding: 0.12rem 0.35rem;
  line-height: 1.2;
}
@media (min-width: 640px) {
  .cc-search-btn__kbd { display: inline-block; }
}

/* Mobile MENU drawer search */
.cc-menu-search {
  position: relative;
}
.cc-menu-search__form {
  margin: 0;
}
.cc-menu-search__row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.45rem 0.35rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  background: #f8fafc;
}
.cc-menu-search__row:focus-within {
  border-color: #93c5fd;
  background: #fff;
  box-shadow: 0 0 0 3px rgb(147 197 253 / 0.35);
}
.cc-menu-search__icon {
  display: inline-flex;
  color: #64748b;
  flex-shrink: 0;
}
.cc-menu-search__row input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 0.95rem;
  color: #0f172a;
  outline: none;
}
.cc-menu-search__ask {
  flex-shrink: 0;
  border: 0;
  border-radius: 0.65rem;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  white-space: nowrap;
}
.cc-menu-search__ask:hover,
.cc-menu-search__ask:focus-visible {
  background: #dbeafe;
  outline: none;
}
.cc-menu-search__results {
  margin-top: 0.5rem;
  max-height: min(40vh, 18rem);
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 10px 25px -12px rgb(15 23 42 / 0.25);
}
.cc-menu-search__results[hidden] {
  display: none;
}
.cc-menu-search__results .cc-search__empty {
  padding: 0.85rem;
}

.cc-search {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}
.cc-search.is-open { display: block; }
.cc-search__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(15 23 42 / 0.55);
}
.cc-search__panel {
  position: relative;
  z-index: 1;
  width: min(40rem, calc(100% - 1.5rem));
  margin: 12vh auto 0;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgb(15 23 42 / 0.35);
  overflow: hidden;
  max-height: min(70vh, 36rem);
  display: flex;
  flex-direction: column;
}
.cc-search__form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}
.cc-search__form input {
  flex: 1;
  border: 0;
  font-size: 1rem;
  outline: none;
  background: transparent;
  color: #0f172a;
}
.cc-search__kbd {
  font-size: 0.7rem;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 0.4rem;
  padding: 0.15rem 0.4rem;
}
.cc-search__results {
  overflow: auto;
  padding: 0.5rem;
}
.cc-search__group-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  padding: 0.5rem 0.65rem 0.25rem;
}
.cc-search__item,
.cc-search__ask {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 0.65rem;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}
.cc-search__item:hover,
.cc-search__item.is-active,
.cc-search__ask:hover,
.cc-search__ask.is-active {
  background: #eff6ff;
}
.cc-search__item mark {
  background: #dbeafe;
  color: inherit;
  padding: 0;
}
.cc-search__title { font-weight: 700; color: #0f172a; font-size: 0.95rem; }
.cc-search__snippet { margin-top: 0.15rem; font-size: 0.8rem; color: #64748b; line-height: 1.4; }
.cc-search__empty { padding: 1.25rem; color: #64748b; font-size: 0.9rem; }

/* Assistant */
.cc-asst-launch {
  position: fixed;
  right: 1rem;
  bottom: 5.25rem;
  z-index: 45;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: linear-gradient(145deg, #2563eb, #1e3a8a);
  color: #fff;
  box-shadow: 0 12px 28px -10px rgb(37 99 235 / 0.65);
  display: grid;
  place-items: center;
}
.cc-asst-launch:hover { transform: scale(1.04); }
.cc-asst-launch:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.cc-asst-launch svg { width: 1.55rem; height: 1.55rem; }
@media (min-width: 640px) {
  .cc-asst-launch { right: 1.25rem; bottom: 5.5rem; }
}

.cc-asst {
  position: fixed;
  z-index: 55;
  right: 1rem;
  bottom: 9.5rem;
  width: min(22.5rem, calc(100vw - 1.5rem));
  height: min(34rem, calc(100vh - 11rem));
  display: none;
  flex-direction: column;
  background: #0c1226;
  color: #e2e8f0;
  border-radius: 1.1rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgb(2 6 23 / 0.65);
  border: 1px solid rgb(147 197 253 / 0.22);
}
.cc-asst.is-open { display: flex; }
@media (min-width: 640px) {
  .cc-asst { right: 1.25rem; bottom: 9.75rem; }
}

.cc-asst__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgb(148 163 184 / 0.2);
  background: linear-gradient(180deg, #132044, #0c1226);
}
.cc-asst__avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: #16245c;
  position: relative;
  overflow: hidden;
  flex: none;
}
.cc-asst__avatar canvas,
.cc-asst__avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.cc-asst__title { font-weight: 800; font-size: 0.95rem; color: #fff; }
.cc-asst__sub { font-size: 0.72rem; color: #93c5fd; }
.cc-asst__head-actions { margin-left: auto; display: flex; gap: 0.25rem; }
.cc-asst__iconbtn {
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 0.6rem;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
}
.cc-asst__iconbtn[aria-pressed="true"] { color: #fbbf24; background: rgb(251 191 36 / 0.12); }
.cc-asst__iconbtn:hover { background: rgb(148 163 184 / 0.15); color: #fff; }

.cc-asst__messages {
  flex: 1;
  overflow: auto;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.cc-asst__bubble {
  max-width: 92%;
  padding: 0.7rem 0.85rem;
  border-radius: 0.9rem;
  font-size: 0.9rem;
  line-height: 1.45;
}
.cc-asst__bubble--bot {
  align-self: flex-start;
  background: #16245c;
  color: #e2e8f0;
}
.cc-asst__bubble--user {
  align-self: flex-end;
  background: #2563eb;
  color: #fff;
}
.cc-asst__links {
  margin-top: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.cc-asst__links a {
  color: #93c5fd;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}
.cc-asst__links a:hover { color: #fff; text-decoration: underline; }

.cc-asst__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1rem 0.5rem;
}
.cc-asst__chip-heading {
  flex: 1 0 100%;
  margin: 0.15rem 0 0.1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #93c5fd;
}
.cc-asst__chip {
  border: 1px solid rgb(147 197 253 / 0.35);
  background: rgb(37 99 235 / 0.18);
  color: #fff;
  border-radius: 0.65rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  line-height: 1.35;
  max-width: 100%;
}
.cc-asst__chip:hover { background: rgb(37 99 235 / 0.35); }

.cc-asst__composer {
  border-top: 1px solid rgb(148 163 184 / 0.2);
  padding: 0.75rem 1rem 0.9rem;
  background: #0a1020;
}
.cc-asst__row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}
.cc-asst__row input {
  flex: 1;
  min-width: 0;
  border-radius: 0.75rem;
  border: 1px solid rgb(148 163 184 / 0.3);
  background: #121a33;
  color: #fff;
  padding: 0.65rem 0.8rem;
  font-size: 0.9rem;
}
.cc-asst__row input:focus { outline: 2px solid #3b82f6; border-color: transparent; }
.cc-asst__send,
.cc-asst__mic {
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 0.75rem;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
}
.cc-asst__mic { background: #1e3a8a; }
.cc-asst__mic[aria-pressed="true"] { background: #dc2626; }
.cc-asst__send:disabled { opacity: 0.5; cursor: wait; }
.cc-asst__note {
  margin-top: 0.45rem;
  font-size: 0.68rem;
  color: #94a3b8;
  line-height: 1.35;
}

@media (max-width: 389px) {
  .cc-asst {
    right: 0.5rem;
    left: 0.5rem;
    width: auto;
    bottom: 8.75rem;
  }
}

.cc-asst__bubble p { margin: 0 0 0.45rem; }
.cc-asst__bubble p:last-child { margin-bottom: 0; }
.cc-asst__bubble ul {
  margin: 0.35rem 0 0.55rem;
  padding-left: 1.15rem;
}
.cc-asst__bubble li { margin: 0.15rem 0; }
