/* ====================================================================
   BeautyChatDemo — animowany agent AI rezerwacji 24/7 (motyw JASNY)
   Odgrywa rozmowę: klientka pisze -> bot "myśli" -> odpowiada,
   na końcu karta rezerwacji z przyciskiem "Potwierdź wizytę".
   ==================================================================== */

.bc-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---- układ coveru: czat (strona www) obok telefonu Instagram ---- */
.bc-cover-pair {
  display: flex; flex-wrap: wrap;
  justify-content: center; align-items: flex-start;
  gap: clamp(22px, 4vw, 50px);
}
.bc-cover-item {
  margin: 0; display: flex; flex-direction: column;
  align-items: center; gap: 14px;
}
.bc-cover-item--chat { width: 392px; max-width: 100%; }
.bc-cover-ig {
  height: min(78vh, 680px); width: auto; max-width: 100%; display: block;
}
.bc-cover-cap {
  font-family: var(--f-mono, ui-monospace, monospace);
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--c-muted, #807a70);
}
@media (max-width: 860px) {
  .bc-cover-ig { height: auto; width: 280px; }
}

/* ---- wariant kompaktowy: para na stronie głównej (wiersz portfolio) ---- */
.bc-cover-pair--home { gap: 20px; flex-wrap: nowrap; }
.bc-cover-pair--home .bc-cover-item--chat { width: 312px; }
.bc-cover-pair--home .bc-phone { height: 544px; max-width: 312px; }
.bc-cover-pair--home .bc-cover-ig { height: 544px; width: auto; }
@media (max-width: 600px) {
  .bc-cover-pair--home { flex-wrap: wrap; }
  .bc-cover-pair--home .bc-phone { height: min(78vh, 600px); max-width: 100%; }
  .bc-cover-pair--home .bc-cover-item--chat { width: 320px; }
  .bc-cover-pair--home .bc-cover-ig { height: auto; width: 260px; }
}

.bc-phone {
  width: 100%;
  max-width: 392px;
  height: min(78vh, 680px);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(20, 18, 40, .08);
  box-shadow:
    0 2px 6px rgba(28, 24, 60, .06),
    0 28px 70px -22px rgba(60, 50, 110, .35);
}

/* ---- nagłówek ---- */
.bc-head {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 16px;
  background: #ffffff;
  border-bottom: 1px solid rgba(20, 18, 40, .07);
  flex: 0 0 auto;
}
.bc-head-avatar {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 50%;
  background: radial-gradient(120% 120% at 30% 20%, #efeafd 0%, #e1d8fa 100%);
  border: 1px solid rgba(108, 79, 208, .22);
  display: grid; place-items: center;
  color: #6c4fd0;
}
.bc-head-avatar svg { width: 21px; height: 21px; }
.bc-head-meta { flex: 1 1 auto; min-width: 0; line-height: 1.25; }
.bc-head-title { font-size: 15px; font-weight: 600; color: #1c1a26; letter-spacing: -.01em; }
.bc-head-sub { font-size: 12px; color: #8b8794; margin-top: 1px; }
.bc-head-actions { display: flex; gap: 10px; color: #b3b0bd; }
.bc-head-actions svg { width: 18px; height: 18px; }

/* ---- lista wiadomości ---- */
.bc-body {
  flex: 1 1 auto;
  min-height: 0; /* lista scrolluje się zamiast rozpychać stopkę */
  overflow: hidden;
  padding: 18px 16px 10px;
  display: flex; flex-direction: column; gap: 14px;
  background: #f5f4f8;
  scroll-behavior: smooth;
}

.bc-row { display: flex; gap: 8px; }
.bc-row--bot { justify-content: flex-start; }
.bc-row--user { justify-content: flex-end; }

.bc-msg-avatar {
  width: 26px; height: 26px; flex: 0 0 26px;
  border-radius: 50%;
  background: #efeafc;
  border: 1px solid rgba(108, 79, 208, .18);
  color: #6c4fd0;
  display: grid; place-items: center;
  align-self: flex-end;
}
.bc-msg-avatar svg { width: 14px; height: 14px; }

.bc-bubble {
  max-width: 76%;
  padding: 11px 14px;
  font-size: 13.5px; line-height: 1.5;
  border-radius: 16px;
}
.bc-row--bot .bc-bubble {
  background: #ffffff; color: #2a2833;
  border: 1px solid rgba(20, 18, 40, .05);
  border-bottom-left-radius: 5px;
}
.bc-row--user .bc-bubble {
  background: #6c4fd0; color: #fff;
  border-bottom-right-radius: 5px;
}

.bc-enter { animation: bc-in .3s cubic-bezier(.21,.9,.32,1.2) both; }
@keyframes bc-in {
  from { opacity: 0; transform: translateY(9px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- "pisze..." ---- */
.bc-typing {
  display: inline-flex; gap: 4px;
  padding: 14px;
  background: #ffffff; border: 1px solid rgba(20, 18, 40, .05);
  border-radius: 16px; border-bottom-left-radius: 5px;
}
.bc-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: #bdb9c9;
  animation: bc-bounce 1.2s infinite ease-in-out;
}
.bc-typing span:nth-child(2) { animation-delay: .18s; }
.bc-typing span:nth-child(3) { animation-delay: .36s; }

/* ---- karta rezerwacji ---- */
.bc-card {
  margin-left: 34px;
  background: #ffffff;
  border: 1px solid rgba(20, 18, 40, .08);
  border-radius: 14px;
  padding: 14px;
  display: flex; flex-direction: column; gap: 13px;
  box-shadow: 0 6px 18px -10px rgba(60, 50, 110, .25);
}
.bc-card-top { display: flex; gap: 13px; align-items: flex-start; }
.bc-card-cal {
  width: 46px; height: 46px; flex: 0 0 46px;
  border-radius: 11px;
  background: #f1ecfb;
  display: grid; place-items: center; color: #6c4fd0;
}
.bc-card-cal svg { width: 23px; height: 23px; }
.bc-card-title { font-size: 14px; font-weight: 600; color: #1c1a26; }
.bc-card-meta { font-size: 12.5px; color: #7c7889; line-height: 1.55; margin-top: 3px; }
.bc-confirm {
  display: block; width: 100%;
  background: #6c4fd0; color: #fff;
  border: 0; border-radius: 11px;
  padding: 12px; font-size: 13.5px; font-weight: 600;
  text-align: center; cursor: default;
}

/* ---- stopka (tryb demo) ---- */
.bc-input {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 14px 15px;
  background: #ffffff;
  border-top: 1px solid rgba(20, 18, 40, .07);
  flex: 0 0 auto; /* stała stopka, nie ściska się */
}
.bc-input-field {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 6px;
  background: #f3f2f7;
  border: 1px dashed rgba(20, 18, 40, .16);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 11px; font-weight: 500;
  color: #9a97a5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bc-input-field svg { width: 13px; height: 13px; flex: 0 0 13px; }
.bc-send {
  width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 50%;
  background: #ece9f4; color: #b0abc1;
  display: grid; place-items: center; cursor: not-allowed;
}
.bc-send svg { width: 17px; height: 17px; }

@keyframes bc-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .45; }
  30% { transform: translateY(-5px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .bc-enter, .bc-typing span { animation: none; }
  .bc-body { scroll-behavior: auto; }
}

@media (max-width: 520px) {
  .bc-phone { height: 80vh; max-width: 100%; }
}
