/* PROBOT + float call — Tesla dark chrome */

.prob-site-float {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  max-width: min(100vw - 0.75rem, 17.5rem);
}

/* Legacy card → same Tesla pill chrome as the new call control */
.prob-site-float__card {
  pointer-events: auto;
  display: flex !important;
  align-items: center;
  padding: 0.55rem 0.85rem 0.55rem 0.55rem !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background:
    linear-gradient(165deg, rgba(36, 38, 48, 0.92) 0%, rgba(12, 13, 18, 0.96) 100%) !important;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 18px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

body.prob-site.light-mode .prob-site-float__card,
html.prob-theme-light body.prob-site .prob-site-float__card {
  border-color: rgba(15, 18, 32, 0.12) !important;
  background: linear-gradient(165deg, #fff 0%, #f3f1ec 100%) !important;
  box-shadow: 0 14px 32px rgba(15, 18, 32, 0.12), inset 0 1px 0 #fff !important;
}

body.prob-site .prob-site-float__card .prob-site-float__phone {
  gap: 0.65rem;
  color: #fff;
  font-weight: 650;
  font-size: 0.9rem;
}

body.prob-site.light-mode .prob-site-float__card .prob-site-float__phone,
html.prob-theme-light body.prob-site .prob-site-float__card .prob-site-float__phone {
  color: #0f1220;
}

body.prob-site .prob-site-float__card .prob-site-float__phone-icon {
  width: 2.1rem;
  height: 2.1rem;
  padding: 0.45rem;
  border-radius: 50%;
  background: #fff;
  color: #0a0b10;
  box-sizing: border-box;
}

body.prob-site.light-mode .prob-site-float__card .prob-site-float__phone-icon,
html.prob-theme-light body.prob-site .prob-site-float__card .prob-site-float__phone-icon {
  background: #0f1220;
  color: #fff;
}

/* Index uses the new call control — hide empty legacy card wrapper if present */
.pb-tesla-float > .prob-site-float__card {
  display: none !important;
}

/* ——— Phone call pill ——— */
.pb-tesla-float__call,
a.pb-tesla-float__call {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0.55rem 0.85rem 0.55rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(165deg, rgba(36, 38, 48, 0.92) 0%, rgba(12, 13, 18, 0.96) 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 18px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  color: #fff;
  text-decoration: none;
  transition: border-color 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.pb-tesla-float__call:hover,
.pb-tesla-float__call:focus-visible {
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 22px 48px rgba(0, 0, 0, 0.55),
    0 0 28px rgba(255, 255, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  outline: none;
}

.pb-tesla-float__orb {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: #fff;
  color: #0a0b10;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.pb-tesla-float__orb svg {
  width: 1.05rem;
  height: 1.05rem;
}

.pb-tesla-float__copy {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.pb-tesla-float__label {
  font-size: 0.58rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.pb-tesla-float__num,
.pb-tesla-float__call .prob-site-float__phone-num {
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1.15;
}

body.prob-site.light-mode .pb-tesla-float__call,
html.prob-theme-light body.prob-site .pb-tesla-float__call {
  border-color: rgba(15, 18, 32, 0.12);
  background: linear-gradient(165deg, #fff 0%, #f3f1ec 100%);
  color: #0f1220;
  box-shadow: 0 14px 32px rgba(15, 18, 32, 0.12), inset 0 1px 0 #fff;
}

body.prob-site.light-mode .pb-tesla-float__orb,
html.prob-theme-light body.prob-site .pb-tesla-float__orb {
  background: #0f1220;
  color: #fff;
}

body.prob-site.light-mode .pb-tesla-float__label,
html.prob-theme-light body.prob-site .pb-tesla-float__label {
  color: rgba(15, 18, 32, 0.45);
}

body.prob-site.light-mode .pb-tesla-float__num,
html.prob-theme-light body.prob-site .pb-tesla-float__num {
  color: #0f1220;
}

@media (max-width: 1099px) {
  .pb-tesla-float__call {
    padding: 0.4rem 0.65rem 0.4rem 0.4rem;
    gap: 0.55rem;
  }
  .pb-tesla-float__orb {
    width: 1.9rem;
    height: 1.9rem;
  }
  .pb-tesla-float__orb svg {
    width: 0.9rem;
    height: 0.9rem;
  }
  .pb-tesla-float__label {
    font-size: 0.5rem;
  }
  .pb-tesla-float__num {
    font-size: 0.78rem;
  }
}

/* ——— Launcher (Tesla) ——— */
.pb-ai-launch {
  appearance: none;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  width: 100%;
  padding: 0.55rem 0.7rem 0.55rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, 0.1), transparent 42%),
    linear-gradient(165deg, rgba(28, 30, 38, 0.96), rgba(8, 9, 14, 0.98));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 18px 40px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  color: rgba(255, 255, 255, 0.96);
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

body.prob-site.light-mode .pb-ai-launch,
html.prob-theme-light body.prob-site .pb-ai-launch {
  border-color: rgba(15, 18, 32, 0.12);
  background: linear-gradient(165deg, #fff, #f2f0eb);
  color: #0f1220;
  box-shadow: 0 14px 32px rgba(15, 18, 32, 0.12), inset 0 1px 0 #fff;
}

.pb-ai-launch:hover,
.pb-ai-launch:focus-visible {
  border-color: rgba(255, 255, 255, 0.34);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 24px 52px rgba(0, 0, 0, 0.55),
    0 0 36px rgba(255, 255, 255, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  outline: none;
}

body.prob-site.light-mode .pb-ai-launch:hover,
html.prob-theme-light body.prob-site .pb-ai-launch:hover {
  border-color: rgba(15, 18, 32, 0.28);
}

.pb-ai-launch__orb {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #e8e8ea 55%, #c8c8cc 100%);
  color: #0a0b10;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.prob-site.light-mode .pb-ai-launch__orb,
html.prob-theme-light body.prob-site .pb-ai-launch__orb {
  background: radial-gradient(circle at 35% 30%, #2a2d3a 0%, #0f1220 100%);
  color: #fff;
}

.pb-ai-launch__flame {
  display: inline-flex;
  width: 1.05rem;
  height: 1.05rem;
  color: inherit;
  line-height: 0;
}

.pb-ai-launch__flame svg {
  width: 100%;
  height: 100%;
}

.pb-ai-launch__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  min-width: 0;
}

.pb-ai-launch__name {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.1;
}

.pb-ai-launch__tag {
  flex: none;
  padding: 0;
  border: 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.prob-site.light-mode .pb-ai-launch__tag,
html.prob-theme-light body.prob-site .pb-ai-launch__tag {
  color: rgba(15, 18, 32, 0.45);
}

.pb-ai-launch__plus {
  display: inline-grid;
  place-items: center;
  flex: none;
  margin-left: auto;
  width: 1.55rem;
  height: 1.55rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), background 0.28s ease;
}

body.prob-site.light-mode .pb-ai-launch__plus,
html.prob-theme-light body.prob-site .pb-ai-launch__plus {
  background: rgba(15, 18, 32, 0.06);
}

.pb-ai-launch.is-open .pb-ai-launch__plus {
  transform: rotate(45deg);
  background: rgba(255, 255, 255, 0.16);
}

@media (max-width: 1099px) {
  .pb-ai-launch {
    padding: 0.4rem 0.55rem 0.4rem 0.4rem;
    gap: 0.5rem;
  }
  .pb-ai-launch__orb {
    width: 1.9rem;
    height: 1.9rem;
  }
  .pb-ai-launch__name {
    font-size: 0.72rem;
  }
  .pb-ai-launch__tag {
    font-size: 0.5rem;
  }
  .pb-ai-launch__plus {
    width: 1.3rem;
    height: 1.3rem;
  }
}

/* ——— Panel ——— */
.pb-ai-panel {
  --ai-bg: #0c0d12;
  --ai-ink: rgba(255, 255, 255, 0.93);
  --ai-muted: rgba(255, 255, 255, 0.55);
  --ai-champagne: #e8e8ea;
  --ai-purple: #ffffff;
  --ai-line: rgba(255, 255, 255, 0.14);
  --ai-rule: rgba(255, 255, 255, 0.1);
  position: fixed;
  z-index: 930;
  bottom: max(8.6rem, env(safe-area-inset-bottom, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  width: min(27rem, calc(100vw - 1.4rem));
  height: min(36rem, calc(100dvh - 10rem));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ai-line);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 1.35rem;
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(255, 255, 255, 0.08), transparent 55%),
    linear-gradient(180deg, #16171d 0%, var(--ai-bg) 40%);
  color: var(--ai-ink);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 30px 70px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1), transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

body.prob-site.light-mode .pb-ai-panel,
html.prob-theme-light body.prob-site .pb-ai-panel {
  --ai-bg: #fffdf8;
  --ai-ink: #0f1220;
  --ai-muted: rgba(15, 18, 32, 0.6);
  --ai-champagne: #7a5720;
  --ai-line: rgba(122, 87, 32, 0.26);
  --ai-rule: rgba(110, 101, 195, 0.24);
  box-shadow: 0 26px 60px rgba(15, 18, 32, 0.18);
}

.pb-ai-panel.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.pb-ai-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.05rem 0.9rem;
  background: transparent;
  border-bottom: 1px solid var(--ai-rule);
}

.pb-ai-panel__who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.pb-ai-panel__badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid var(--ai-line);
  border-radius: 0;
  background: transparent;
  color: var(--ai-champagne);
}

.pb-ai-panel__badge svg {
  width: 1.15rem;
  height: 1.15rem;
}

.pb-ai-panel__title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--ai-champagne);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.pb-ai-panel__tag {
  padding: 0.06rem 0.28rem;
  border: 1px solid var(--ai-line);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.pb-ai-panel__sub {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.3rem 0 0;
  color: var(--ai-muted);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pb-ai-panel__dot {
  width: 0.35rem;
  height: 0.35rem;
  flex: none;
  background: var(--ai-purple);
}

.pb-ai-panel__close {
  appearance: none;
  flex: none;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--ai-rule);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.25s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.pb-ai-panel__close:hover {
  border-color: var(--ai-champagne);
  color: var(--ai-champagne);
  background: transparent;
}

/* ——— Log ——— */
.pb-ai-log {
  flex: 1;
  overflow: auto;
  padding: 1.05rem 1.05rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.85rem;
  scrollbar-width: thin;
}

.pb-ai-msg {
  max-width: 92%;
  padding: 0.8rem 0.95rem;
  border-radius: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.pb-ai-msg--bot {
  align-self: stretch;
  border-left: 1px solid var(--ai-champagne);
  background: linear-gradient(90deg, rgba(110, 101, 195, 0.12), transparent 70%);
}

.pb-ai-msg--user {
  align-self: flex-end;
  border: 1px solid var(--ai-purple);
  background: var(--ai-purple);
  color: #0f1220;
  -webkit-text-fill-color: #0f1220;
}

.pb-ai-msg a {
  color: var(--ai-champagne);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--ai-line);
}

.pb-ai-msg--user a {
  color: #0f1220;
  -webkit-text-fill-color: #0f1220;
  border-bottom-color: rgba(15, 18, 32, 0.35);
}

.pb-ai-msg a:hover {
  border-bottom-color: currentColor;
}

.pb-ai-typing {
  align-self: flex-start;
  color: var(--ai-champagne);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pb-ai-typing::after {
  content: "";
  display: inline-block;
  width: 2.15rem;
  height: 1px;
  margin-left: 0.5rem;
  vertical-align: middle;
  background: currentColor;
  animation: pb-ai-draw 1.5s cubic-bezier(0.22, 1, 0.36, 1) infinite;
  transform-origin: left center;
}

@keyframes pb-ai-draw {
  0%,
  100% {
    transform: scaleX(0.15);
    opacity: 0.4;
  }
  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pb-ai-typing::after {
    animation: none;
  }
}

/* ——— Suggestions ——— */
.pb-ai-sugs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1.05rem 0.7rem;
}

.pb-ai-sugs button {
  appearance: none;
  border: 1px solid var(--ai-line);
  border-radius: 0;
  background: transparent;
  color: var(--ai-champagne);
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.pb-ai-sugs button:hover {
  border-color: var(--ai-champagne);
  background: transparent;
}

/* ——— Composer ——— */
.pb-ai-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.8rem 0.85rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--ai-rule);
}

.pb-ai-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--ai-line);
  border-radius: 0;
  background: transparent;
  color: var(--ai-ink);
  padding: 0.7rem 0.8rem;
  font: inherit;
  font-size: 0.88rem;
}

.pb-ai-form input::placeholder {
  color: var(--ai-muted);
}

.pb-ai-form input:focus {
  outline: 1px solid var(--ai-purple);
  outline-offset: 1px;
  border-color: var(--ai-purple);
}

.pb-ai-form button[type="submit"] {
  appearance: none;
  flex: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--ai-purple);
  border-radius: 0;
  background: var(--ai-purple);
  color: #0f1220;
  -webkit-text-fill-color: #0f1220;
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.25s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.pb-ai-form button[type="submit"]:hover {
  background: #5850a8;
  color: #f7f5ff;
  -webkit-text-fill-color: #f7f5ff;
}

.pb-ai-form button[type="submit"]:disabled {
  opacity: 0.45;
  cursor: wait;
}

@media (max-width: 1099px) {
  .pb-ai-launch {
    padding: 0.55rem 0.7rem;
  }

  .pb-ai-launch__name {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }
}

@media (max-width: 700px) {
  .pb-ai-panel {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: min(82dvh, 38rem);
    border-radius: 0;
  }

  /* Icon-only pills so the phone and Probot do not cover the reading column. The number stays in the header. */
  .prob-site-float {
    max-width: 3.4rem;
    align-items: flex-end;
  }

  .pb-tesla-float__copy,
  .pb-ai-launch__name,
  .pb-ai-launch__tag {
    display: none;
  }

  .pb-tesla-float__call,
  a.pb-tesla-float__call,
  .pb-ai-launch {
    width: 3.1rem;
    height: 3.1rem;
    padding: 0;
    justify-content: center;
    gap: 0;
  }

  .pb-ai-launch__plus {
    display: none;
  }
}
