/* /plan: Kaya's full-screen chat (09/2026 design, the homepage's navy theme). The page is one
   column the height of the visible viewport (--kvh, set from visualViewport by plan.js so the
   input stays above a phone keyboard): header, the scrolling conversation, the pinned input. */
body.kchat-page {
  margin: 0;
  background: var(--ivc-navy);
  color: #fff;
  font-family: var(--ivc-display);
  overflow: hidden;
}
.kchat {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--kvt, 0px);
  height: var(--kvh, 100dvh);
  display: flex;
  flex-direction: column;
  background-color: var(--ivc-navy);
  background-image: radial-gradient(rgba(62, 221, 191, 0.12) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
}
.kchat :focus-visible {
  outline: 3px solid var(--ivc-mint);
  outline-offset: 3px;
}

/* header */
.kchat-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) var(--ivc-gutter) 12px;
  background: rgba(6, 28, 56, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.kchat-who {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  min-width: 0;
}
.kchat-who b {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}
.kchat-who small {
  display: block;
  font-size: 13px;
  color: var(--ivc-soft2);
  white-space: nowrap;
}
.kchat-close {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.kchat-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Kaya's avatar: the badger, cropped to her face (same crop as the homepage) */
.kavatar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--ivc-mint);
  overflow: hidden;
  position: relative;
  display: block;
}
.kavatar img {
  position: absolute;
  width: 168%;
  height: auto;
  max-width: none;
  left: -42%;
  top: 2%;
}
.kchat-who .kavatar {
  width: 38px;
  height: 38px;
}

/* the conversation */
.kchat-main {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.kchat-log {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px var(--ivc-gutter) 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.kmsg {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: krise 0.35s ease both;
}
.kmsg.you {
  justify-content: flex-end;
}
.kbody {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.kbubble {
  margin: 0;
  color: #fff;
  align-self: flex-start;
  max-width: 720px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px 18px 18px 18px;
  padding: 13px 17px;
  font-size: 17px;
  line-height: 1.5;
}
.kbubble.warn {
  font-size: 15px;
  color: var(--ivc-soft);
}
.kmsg.you .kbubble {
  align-self: flex-end;
  background: var(--ivc-mint);
  border-color: var(--ivc-mint);
  color: var(--ivc-navy);
  font-weight: 600;
  border-radius: 18px 18px 4px 18px;
  max-width: min(560px, 85%);
  overflow-wrap: anywhere;
}
.kchips,
.kassume,
.kfollow,
.knext {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.kchip,
.kfollow button,
.knext button,
.knext a {
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: 600 14px/1.2 var(--ivc-display);
  cursor: pointer;
  text-decoration: none;
}
.kchip:hover,
.kfollow button:hover,
.knext button:hover {
  background: rgba(255, 255, 255, 0.14);
}
.kfollow span {
  color: var(--ivc-soft2);
  font-size: 14px;
  font-weight: 600;
  margin-right: 2px;
}
.knext .primary {
  background: var(--ivc-mint);
  border-color: var(--ivc-mint);
  color: var(--ivc-navy);
}
.kassume button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(62, 221, 191, 0.55);
  color: var(--ivc-mint);
  font: 600 14px/1.2 var(--ivc-display);
  cursor: pointer;
}
.kassume button[aria-expanded='true'] {
  background: rgba(62, 221, 191, 0.14);
}
.kassume button.guess::after {
  content: 'assumed';
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ivc-soft2);
}
button:disabled {
  opacity: 0.55;
  cursor: progress;
}

/* the assumption editor and the flight card share one form style */
.kform {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 16px;
  max-width: 640px;
}
.kform[hidden] {
  display: none;
}
.kform h2 {
  flex-basis: 100%;
  margin: 0;
  font-size: 17px;
  color: #fff; /* on the navy card: site.css would make it navy, nearly invisible */
}
.kform p {
  flex-basis: 100%;
  margin: 0;
  color: var(--ivc-soft);
  font-size: 14px;
}
.kform label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ivc-soft);
  flex: 1 1 180px;
}
.kform label.wide {
  flex-basis: 100%;
}
.kform label {
  justify-content: flex-end;
}
.kform label small {
  font-weight: 500;
  color: var(--ivc-soft2);
}
.kform input {
  font: 500 16px/1.3 var(--ivc-display);
  color: var(--ivc-ink);
  background: #fff;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
  min-width: 0;
}
.kform input[aria-invalid='true'] {
  border-color: #ff9f8f;
}
.kform .kerr {
  flex-basis: 100%;
  color: #ffb4a8;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
.kform .kerr:empty {
  display: none;
}
.kform .actions {
  display: flex;
  gap: 10px;
  flex-basis: 100%;
}
.kbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font: 700 15px/1.2 var(--ivc-display);
  cursor: pointer;
  text-decoration: none;
}
.kbtn.mint {
  background: var(--ivc-mint);
  color: var(--ivc-navy);
}
.kbtn.navy {
  background: var(--ivc-navy2);
  color: #fff;
}
.kbtn.ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* option cards: the real proposals, their real all-in totals */
.kopts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.kopt {
  background: #fff;
  color: var(--ivc-ink);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: krise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.kopt:nth-child(2) {
  animation-delay: 120ms;
}
.kopt:nth-child(3) {
  animation-delay: 240ms;
}
.kopt:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.5);
}
.kopt-top {
  height: 128px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 14px 18px;
  color: #fff;
  font-weight: 600;
  background: var(--ivc-navy2);
}
.kopt:nth-child(1) .kopt-top {
  background-color: var(--ivc-teal);
}
.kopt:nth-child(2) .kopt-top {
  background-color: var(--ivc-blue);
}
.kopt-top img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kopt-top.photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 28, 56, 0) 30%, rgba(6, 28, 56, 0.8) 100%);
}
.kopt-top .place {
  position: relative;
  z-index: 1;
}
.kopt-tag {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 12px;
  background: #fff;
  color: var(--ivc-navy2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
}
.kopt-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}
.kopt h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.kopt p {
  margin: 0;
  font-size: 15px;
  color: var(--ivc-muted);
}
.kopt .kopt-plus {
  color: var(--ivc-teal);
  font-weight: 700;
  font-size: 14px;
}
.kopt-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #e6eef3;
}
.kopt-price small {
  display: block;
  font-size: 12px;
  color: var(--ivc-muted);
  font-weight: 600;
}
.kopt-price b {
  font-size: 17px;
  color: var(--ivc-navy2);
}
.kopt-foot a {
  background: var(--ivc-navy2);
  color: #fff;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.kempty {
  background: #fff;
  color: var(--ivc-ink);
  border-radius: 20px;
  padding: 20px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: center;
  justify-content: space-between;
  max-width: 720px;
}
.kempty b {
  display: block;
  font-size: 17px;
}
.kempty span {
  color: var(--ivc-muted);
}

/* waiting: the typing dots, then the shimmer while real prices come in */
.ktyping {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px 18px 18px 18px;
  align-self: flex-start;
}
.ktyping i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ivc-mint);
  animation: kdot 1.2s ease-in-out infinite;
}
.ktyping i:nth-child(2) {
  animation-delay: 0.15s;
}
.ktyping i:nth-child(3) {
  animation-delay: 0.3s;
}
.kchecking {
  color: var(--ivc-soft2);
  font-weight: 600;
  margin: 0;
}
.kskel {
  height: 300px;
  border-radius: 20px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.14) 40%,
    rgba(255, 255, 255, 0.05) 80%
  );
  background-size: 200% 100%;
  animation: kshim 1.4s linear infinite;
}

/* the pinned input */
.kchat-input {
  flex: none;
  padding: 10px var(--ivc-gutter) calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(6, 28, 56, 0.97);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.kinput-row {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: #fff;
  border-radius: 18px;
  padding: 8px;
}
.kinput-row:focus-within {
  box-shadow: 0 0 0 3px var(--ivc-mint);
}
.kinput-row textarea {
  flex: 1;
  min-width: 0;
  border: 0;
  resize: none;
  font: 500 17px/1.4 var(--ivc-display);
  color: var(--ivc-ink);
  padding: 10px 6px;
  max-height: 140px;
  background: transparent;
}
.kinput-row textarea:focus {
  outline: none;
}
.kinput-row textarea::placeholder {
  color: var(--ivc-muted);
}
.kicon,
.ksend {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.kicon {
  border: 1px solid #d5e1ea;
  background: var(--ivc-ground);
  color: var(--ivc-navy2);
}
.kicon.on {
  background: var(--ivc-mint);
  border-color: var(--ivc-mint);
}
.kicon[hidden] {
  display: none;
}
.ksend {
  border: 0;
  background: var(--ivc-navy2);
  color: var(--ivc-mint);
}
.kinfo {
  max-width: 1080px;
  margin: 6px auto 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
}
.kinfo .beta-note {
  color: var(--ivc-soft);
}
.kquota {
  margin: 0;
  min-height: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ivc-mint);
}
.ktoast {
  position: fixed;
  left: 50%;
  top: calc(84px + env(safe-area-inset-top, 0px));
  transform: translate(-50%, -12px);
  opacity: 0;
  background: #fff;
  color: var(--ivc-ink);
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.25s ease;
  z-index: 80;
  max-width: calc(100% - 32px);
  pointer-events: none;
}
.ktoast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes krise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes kdot {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  40% {
    transform: translateY(-5px);
    opacity: 1;
  }
}
@keyframes kshim {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 860px) {
  .kopts {
    grid-template-columns: 1fr;
  }
  .kskel:nth-child(n + 2) {
    display: none;
  }
}
@media (max-width: 520px) {
  .kchat-head {
    gap: 10px;
  }
  .kchat-head .ivc-logo span {
    display: none;
  }
  .kbubble {
    font-size: 16px;
  }
  .kmsg .kavatar {
    width: 34px;
    height: 34px;
  }
  .kicon {
    width: 40px;
    height: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .kchat *,
  .kchat *::before,
  .kchat *::after,
  .ktoast {
    animation: none !important;
    transition: none !important;
  }
}
