/* Kori AI chat — shop mock-up. Colours match the grey/orange house style and are sized for WCAG 2.2 AA. */
:root {
  --kori-bottom: 1.25rem;
}

.kori-launch {
  position: fixed;
  right: 1.25rem;
  bottom: var(--kori-bottom);
  z-index: 180;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 1.15rem;
  background: #424242;
  color: #FFA94D;
  border: 2px solid #FFA94D;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.kori-launch:hover,
.kori-launch:focus-visible {
  color: #FFD19A;
  border-color: #FFD19A;
}

.kori-launch:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.kori-launch-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #FFA94D;
  box-shadow: 0 0 0 3px rgba(255, 169, 77, 0.25);
  flex: none;
}

.kori-launch[aria-expanded="true"] .kori-launch-dot {
  background: #FFD19A;
}

.kori-launch[aria-expanded="true"] {
  display: none;
}

.kori {
  position: fixed;
  right: 1.25rem;
  bottom: var(--kori-bottom);
  z-index: 181;
  width: min(420px, calc(100vw - 2.5rem));
  height: min(640px, calc(100vh - var(--kori-bottom) - 1rem));
  max-height: calc(100vh - var(--kori-bottom) - 1rem);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  color: #090909;
  border: 1px solid #424242;
  border-radius: 14px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.kori[hidden] {
  display: none;
}

.k-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  background: #424242;
  color: #FFA94D;
  padding: 0.75rem 1rem;
  flex: none;
}

.k-head h2 {
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0;
  color: #FFA94D;
  font-weight: 700;
}

.k-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #ffffff;
  color: #424242;
  border-radius: 5px;
  padding: 0.05rem 0.4rem;
  vertical-align: middle;
  margin-left: 0.3rem;
}

.k-close {
  background: transparent;
  border: 2px solid #ffffff;
  color: #ffffff;
  border-radius: 8px;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 44px;
  min-height: 44px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  flex: none;
}

.k-close:hover {
  color: #FFD19A;
  border-color: #FFD19A;
}

.k-head :focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

.k-disclose {
  flex: none;
  margin: 0;
  background: #F0F0F0;
  color: #090909;
  border-bottom: 1px solid #d0d0d0;
  padding: 0.55rem 1rem;
  font-size: 0.8rem;
  line-height: 1.42;
  max-height: 32vh;
  overflow-y: auto;
}

.k-disclose p {
  margin: 0 0 0.35rem;
}

.k-disclose p:last-child {
  margin: 0;
}

.k-disclose a,
.k-before a,
.k-foot a {
  color: #9A5200;
  text-decoration: underline;
}

.k-legal {
  font-weight: 600;
}

.k-log {
  flex: 1 1 auto;
  min-height: 7.5rem;
  overflow-y: auto;
  padding: 0.8rem 1rem;
  background: #F7F7F7;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.k-log:focus-visible {
  outline: 3px solid #424242;
  outline-offset: -3px;
}

.k-msg {
  width: 88%;
  max-width: 88%;
  box-sizing: border-box;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-line;
}

.k-bot {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid #d0d0d0;
  color: #090909;
}

.k-user {
  align-self: flex-end;
  background: #424242;
  color: #F0F0F0;
}

.k-who {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #4A4A4A;
  margin-bottom: 0.15rem;
}

.k-user .k-who {
  color: #FFA94D;
}

.k-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-top: 1px solid #d0d0d0;
  background: #ffffff;
  max-height: 42%;
  overflow-y: auto;
  flex: none;
}

.k-actions:empty {
  display: none;
}

.k-chip {
  background: #ffffff;
  color: #090909;
  border: 2px solid #424242;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}

.k-chip:hover,
.k-chip:focus-visible {
  border-color: #F7911D;
}

.k-chip.k-primary {
  background: #F7911D;
  color: #090909;
  border-color: #F7911D;
}

.k-chip.k-primary:hover,
.k-chip.k-primary:focus-visible {
  background: #FFA94D;
  border-color: #FFA94D;
}

.k-before {
  flex: none;
  margin: 0;
  padding: 0.4rem 1rem 0;
  font-size: 0.8rem;
  color: #090909;
  background: #ffffff;
  border-top: 1px solid #d0d0d0;
}

.k-ask {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem 1rem 0.8rem;
  border-top: 0;
  background: #ffffff;
  flex: none;
}

.k-ask input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid #767676;
  border-radius: 8px;
  color: #090909;
  background: #ffffff;
}

.k-send {
  min-height: 44px;
  min-width: 44px;
  padding: 0.45rem 0.9rem;
  background: #F7911D;
  color: #090909;
  border: 2px solid #F7911D;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.k-send:hover,
.k-send:focus-visible {
  background: #FFA94D;
  border-color: #FFA94D;
}

.k-foot {
  flex: none;
  padding: 0.4rem 1rem 0.55rem;
  background: #F0F0F0;
  border-top: 1px solid #d0d0d0;
  font-size: 0.76rem;
  line-height: 1.4;
  color: #090909;
}

.k-foot p {
  margin: 0 0 0.25rem;
}

.k-foot p:last-child {
  margin: 0;
}

.k-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.kori-launch:focus-visible,
.k-close:focus-visible,
.k-chip:focus-visible,
.k-send:focus-visible,
.k-ask input:focus-visible,
.k-disclose a:focus-visible,
.k-before a:focus-visible,
.k-foot a:focus-visible {
  outline: 3px solid #424242;
  outline-offset: 2px;
}

.kori-launch:focus-visible,
.k-head :focus-visible {
  outline-color: #ffffff;
}

@media (max-width: 600px) {
  .kori {
    left: 0.5rem;
    right: 0.5rem;
    width: auto;
  }
  .kori-launch {
    right: 0.75rem;
  }
  .k-msg {
    width: 92%;
    max-width: 92%;
  }
}

.k-disclose details {
  margin: 0.3rem 0 0;
}
.k-disclose summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  color: #090909;
  text-decoration: underline;
}
.k-disclose summary:focus-visible {
  outline: 3px solid #424242;
  outline-offset: 2px;
}
.k-disclose details[open] summary {
  margin-bottom: 0.3rem;
}
