/* ═══════════════════════════════════════════════════════════════
   ZAR~KA · JEWELLERY CONCIERGE
   Inherits the site's tokens only — no new colours, no new fonts.
   The house style is square (the site defines no border-radius
   anywhere but 50% circles), so nothing here is rounded either.
   ═══════════════════════════════════════════════════════════════ */

.zk-cc,
.zk-cc *,
.zk-cc *::before,
.zk-cc *::after { box-sizing: border-box; }

.zk-cc {
  --cc-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --cc-hair: rgba(194, 151, 90, 0.28);      /* brass hairline   */
  --cc-hair-soft: rgba(28, 26, 24, 0.10);
  --cc-ink: #2B2724;
  font-family: var(--sans);
}

/* ─────────────────────────────────────────────
   LAUNCHER — the portrait emerges above the card
   ───────────────────────────────────────────── */
.zk-cc-launcher {
  position: fixed;
  right: 28px;
  bottom: 26px;
  z-index: 190;                 /* under cart(200) / modal(300) */
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--sans);
  transition: transform 0.3s var(--cc-ease), opacity 0.3s var(--cc-ease);
}

.zk-cc-launcher[hidden] { display: none; }

.zk-cc-launcher__portrait {
  width: 104px;
  height: auto;
  display: block;
  margin-bottom: -16px;         /* she sits into the card */
  pointer-events: none;
  filter: drop-shadow(0 10px 22px rgba(28, 26, 24, 0.34));
  /* bottom edge dissolves so she reads as emerging, not pasted on */
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  transform: translateY(0);
  transition: transform 0.35s var(--cc-ease);
  animation: zk-cc-breathe 7s ease-in-out infinite;
}

.zk-cc-launcher__card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px 11px 16px;
  background: var(--charcoal);
  border: 1px solid var(--cc-hair);
  box-shadow: 0 14px 34px rgba(28, 26, 24, 0.30);
  transition: box-shadow 0.3s var(--cc-ease), transform 0.3s var(--cc-ease),
              border-color 0.3s var(--cc-ease);
}

.zk-cc-launcher__label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivory);
  white-space: nowrap;
  transition: color 0.3s var(--cc-ease);
}

.zk-cc-launcher__rule {
  width: 18px;
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
  transition: width 0.35s var(--cc-ease), opacity 0.3s var(--cc-ease);
}

.zk-cc-launcher:hover .zk-cc-launcher__card,
.zk-cc-launcher:focus-visible .zk-cc-launcher__card {
  transform: translateY(-2px);
  border-color: rgba(194, 151, 90, 0.55);
  box-shadow: 0 18px 40px rgba(28, 26, 24, 0.36),
              0 0 0 1px rgba(194, 151, 90, 0.16),
              0 0 26px rgba(194, 151, 90, 0.16);   /* restrained brass glow */
}
.zk-cc-launcher:hover .zk-cc-launcher__portrait,
.zk-cc-launcher:focus-visible .zk-cc-launcher__portrait { transform: translateY(-3px); }
.zk-cc-launcher:hover .zk-cc-launcher__label { color: var(--gold-light); }
.zk-cc-launcher:hover .zk-cc-launcher__rule  { width: 26px; opacity: 1; }

@keyframes zk-cc-breathe {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2.5px); }
}

/* unread-style invitation dot, used once per session */
.zk-cc-launcher__dot {
  position: absolute;
  top: -4px; right: -4px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px var(--charcoal);
}

/* ─────────────────────────────────────────────
   PANEL — dark lid, ivory interior
   ───────────────────────────────────────────── */
.zk-cc-panel {
  position: fixed;
  right: 28px;
  bottom: 26px;
  z-index: 195;
  width: 424px;
  height: min(716px, calc(100vh - 52px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--ivory);
  border: 1px solid var(--cc-hair);
  box-shadow: 0 30px 80px rgba(28, 26, 24, 0.34),
              0 2px 10px rgba(28, 26, 24, 0.14);
  opacity: 0;
  transform: translateY(16px) scale(0.995);
  pointer-events: none;
  transition: opacity 0.28s var(--cc-ease), transform 0.28s var(--cc-ease);
}

.zk-cc-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* HEADER */
.zk-cc-header {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 16px 16px 18px;
  background: var(--charcoal);
  border-bottom: 1px solid var(--cc-hair);
}

.zk-cc-header__avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
  background: #2A2724;
  box-shadow: 0 0 0 1px rgba(194, 151, 90, 0.45);
  flex-shrink: 0;
}

.zk-cc-header__text { flex: 1; min-width: 0; }

.zk-cc-header__name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ivory);
  line-height: 1.2;
}

.zk-cc-header__role {
  margin-top: 3px;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.zk-cc-close {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: none;
  border: none;
  color: var(--grey);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.25s var(--cc-ease);
  flex-shrink: 0;
}
.zk-cc-close:hover { color: var(--ivory); }

/* THREAD */
.zk-cc-thread {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 20px 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--grey-border) transparent;
}
.zk-cc-thread::-webkit-scrollbar { width: 7px; }
.zk-cc-thread::-webkit-scrollbar-thumb { background: var(--grey-border); }
.zk-cc-thread::-webkit-scrollbar-track { background: transparent; }

.zk-cc-node {
  animation: zk-cc-rise 0.32s var(--cc-ease) both;
}
@keyframes zk-cc-rise {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── concierge speech: editorial text, not a bubble ── */
.zk-cc-say { margin-bottom: 22px; }

.zk-cc-say__who {
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 7px;
}

.zk-cc-say__body {
  font-size: 13.5px;
  line-height: 1.78;
  color: var(--cc-ink);
}
.zk-cc-say__body p + p { margin-top: 11px; }

/* the serif register, for concierge "moments" */
.zk-cc-say--feature .zk-cc-say__body {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.4;
  color: var(--charcoal);
  letter-spacing: 0.005em;
}

/* ── customer: a restrained taupe block ── */
.zk-cc-user {
  margin: 0 0 22px auto;
  max-width: 84%;
  padding: 10px 14px;
  background: var(--ivory-deep);
  border-right: 2px solid var(--gold);
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--cc-ink);
  width: fit-content;
}

/* ── quick actions ── */
.zk-cc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 24px;
}

.zk-cc-chip {
  padding: 9px 14px;
  background: transparent;
  border: 1px solid var(--grey-border);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cc-ink);
  cursor: pointer;
  transition: border-color 0.25s var(--cc-ease), color 0.25s var(--cc-ease),
              background 0.25s var(--cc-ease);
}
.zk-cc-chip:hover,
.zk-cc-chip:focus-visible {
  border-color: var(--gold);
  color: var(--charcoal);
  background: rgba(194, 151, 90, 0.07);
}
.zk-cc-chip--primary {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: var(--ivory);
}
.zk-cc-chip--primary:hover { background: #2A2724; border-color: var(--gold); color: var(--gold-light); }

/* ─────────────────────────────────────────────
   PRODUCT RECOMMENDATION CARD
   ───────────────────────────────────────────── */
.zk-cc-card {
  margin-bottom: 12px;
  background: var(--white);
  border: 1px solid var(--cc-hair-soft);
  transition: border-color 0.28s var(--cc-ease), box-shadow 0.28s var(--cc-ease);
}
.zk-cc-card:hover {
  border-color: var(--cc-hair);
  box-shadow: 0 8px 22px rgba(28, 26, 24, 0.08);
}

.zk-cc-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #fff;         /* matches the studio backdrop */
  overflow: hidden;
}
.zk-cc-card__img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.zk-cc-card__flag {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 8px;
  background: var(--charcoal);
  color: var(--gold-light);
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.zk-cc-card__flag--low { background: #7A3B32; color: #F4E4DC; }

.zk-cc-card__body { padding: 14px 15px 15px; }

.zk-cc-card__cat {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey);
}

.zk-cc-card__name {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.24;
  color: var(--charcoal);
}

.zk-cc-card__material {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--grey);
}

.zk-cc-card__note {
  margin-top: 9px;
  font-size: 12.5px;
  line-height: 1.62;
  color: var(--cc-ink);
}

.zk-cc-card__price {
  margin-top: 11px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--charcoal);
}

.zk-cc-card__actions {
  display: flex;
  gap: 7px;
  margin-top: 13px;
}

.zk-cc-btn {
  flex: 1;
  height: 36px;
  padding: 0 10px;
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--charcoal);
  background: transparent;
  color: var(--charcoal);
  transition: background 0.25s var(--cc-ease), color 0.25s var(--cc-ease),
              border-color 0.25s var(--cc-ease);
  white-space: nowrap;
}
.zk-cc-btn:hover { border-color: var(--gold); color: var(--gold); }

.zk-cc-btn--solid {
  background: var(--charcoal);
  color: var(--ivory);
}
.zk-cc-btn--solid:hover { background: #2A2724; color: var(--gold-light); border-color: var(--gold); }
.zk-cc-btn--solid.is-done { background: var(--gold); border-color: var(--gold); color: var(--charcoal); }

/* ─────────────────────────────────────────────
   CAMPAIGN IMAGERY — scale, not object
   ───────────────────────────────────────────── */
.zk-cc-campaign { margin-bottom: 20px; }

.zk-cc-campaign__frame {
  position: relative;
  overflow: hidden;
  background: var(--ivory-deep);
  border: 1px solid var(--cc-hair-soft);
}
.zk-cc-campaign__frame img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.zk-cc-campaign__cap {
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ─────────────────────────────────────────────
   HERITAGE STORY
   ───────────────────────────────────────────── */
.zk-cc-heritage {
  margin-bottom: 22px;
  padding: 18px 18px 19px;
  background: var(--charcoal);
  border-left: 2px solid var(--gold);
}

.zk-cc-heritage__eyebrow {
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.zk-cc-heritage__title {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.18;
  color: var(--ivory);
}

.zk-cc-heritage__sub {
  margin-top: 5px;
  font-size: 11px;
  font-style: italic;
  color: var(--grey);
  font-family: var(--serif);
}

.zk-cc-heritage__quote {
  margin: 14px 0 0;
  padding-left: 13px;
  border-left: 1px solid rgba(194, 151, 90, 0.4);
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
  line-height: 1.55;
  color: var(--gold-pale);
}

.zk-cc-heritage__body {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.8;
  color: rgba(248, 245, 239, 0.82);
}
.zk-cc-heritage__body p + p { margin-top: 10px; }

.zk-cc-heritage__src {
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid rgba(248, 245, 239, 0.1);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ─────────────────────────────────────────────
   FACTS — materials, care, provenance
   ───────────────────────────────────────────── */
.zk-cc-facts {
  margin-bottom: 22px;
  border-top: 1px solid var(--cc-hair);
}
.zk-cc-facts__row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--cc-hair-soft);
}
.zk-cc-facts__k {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  padding-top: 2px;
}
.zk-cc-facts__v {
  font-size: 12.5px;
  line-height: 1.62;
  color: var(--cc-ink);
}

/* ─────────────────────────────────────────────
   LOADER — three brass arcs, slow
   ───────────────────────────────────────────── */
.zk-cc-loader {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 22px;
}
.zk-cc-loader__ring { width: 22px; height: 22px; flex-shrink: 0; }
.zk-cc-loader__ring circle {
  fill: none;
  stroke: var(--gold);
  stroke-linecap: round;
  transform-origin: 50% 50%;
}
.zk-cc-loader__ring .a1 {
  stroke-width: 1.1; stroke-dasharray: 26 60;
  animation: zk-cc-spin 2.6s linear infinite;
}
.zk-cc-loader__ring .a2 {
  stroke-width: 0.9; stroke-dasharray: 14 46; opacity: 0.68;
  animation: zk-cc-spin 3.9s linear infinite reverse;
}
.zk-cc-loader__ring .a3 {
  stroke-width: 0.8; stroke-dasharray: 7 30; opacity: 0.45;
  animation: zk-cc-spin 5.4s linear infinite;
}
@keyframes zk-cc-spin { to { transform: rotate(360deg); } }

.zk-cc-loader__word {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ─────────────────────────────────────────────
   COMPOSER
   ───────────────────────────────────────────── */
.zk-cc-composer {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding: 13px 16px 14px;
  background: var(--ivory);
  border-top: 1px solid var(--cc-hair);
}

.zk-cc-composer__input {
  flex: 1;
  min-height: 22px;
  max-height: 96px;
  padding: 6px 0;
  background: none;
  border: none;
  resize: none;
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--cc-ink);
  outline: none;
}
.zk-cc-composer__input::placeholder { color: var(--grey); }

.zk-cc-send {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--charcoal);
  border: 1px solid var(--charcoal);
  color: var(--ivory);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.25s var(--cc-ease), color 0.25s var(--cc-ease),
              border-color 0.25s var(--cc-ease), opacity 0.25s var(--cc-ease);
}
.zk-cc-send:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-light); }
.zk-cc-send:disabled { opacity: 0.34; cursor: default; }
.zk-cc-send svg { width: 14px; height: 14px; }

/* ─────────────────────────────────────────────
   FOCUS — visible, on brand
   ───────────────────────────────────────────── */
.zk-cc :focus-visible,
.zk-cc-launcher:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 2px;
}

/* the composer is a field, not a control — it gets a hairline, not a box */
.zk-cc-composer__input:focus-visible { outline: none; }
.zk-cc-composer:focus-within {
  border-top-color: var(--gold);
  box-shadow: inset 0 1px 0 0 rgba(194, 151, 90, 0.18);
}

/* ─────────────────────────────────────────────
   MOBILE — near full screen, not a shrunk widget
   ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .zk-cc-launcher {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .zk-cc-launcher__card { display: none; }         /* compact: portrait only */
  .zk-cc-launcher__portrait {
    width: 62px;
    margin-bottom: 0;
    border-radius: 50%;
    background: var(--charcoal);
    box-shadow: 0 0 0 1px var(--gold), 0 10px 24px rgba(28, 26, 24, 0.38);
    -webkit-mask-image: none;
            mask-image: none;
    object-fit: cover;
    object-position: center 20%;
    height: 62px;
  }

  .zk-cc-panel {
    right: 0; bottom: 0; left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    border: none;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    grid-template-rows: auto 1fr auto;
  }
  .zk-cc-header { padding-top: calc(17px + env(safe-area-inset-top, 0px)); }
  .zk-cc-thread { padding: 22px 18px 8px; }

  /* touch targets */
  .zk-cc-btn   { height: 44px; font-size: 10px; }
  .zk-cc-chip  { padding: 12px 15px; font-size: 10.5px; }
  .zk-cc-send  { width: 42px; height: 42px; }
  .zk-cc-composer { padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
  .zk-cc-card__media { aspect-ratio: 1 / 1; }
}

/* ─────────────────────────────────────────────
   REDUCED MOTION
   ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .zk-cc-launcher__portrait { animation: none; }
  .zk-cc-node { animation: none; }
  .zk-cc-panel { transition: opacity 0.01ms; transform: none; }
  .zk-cc-panel.is-open { transform: none; }
  .zk-cc-loader__ring .a1,
  .zk-cc-loader__ring .a2,
  .zk-cc-loader__ring .a3 { animation-duration: 0s; }
  .zk-cc-loader__ring .a1 { stroke-dasharray: 26 60; }
  .zk-cc,
  .zk-cc * { transition-duration: 0.01ms !important; }
}
