/* =========================================
   LIVE CHAT (Convai) + OPENING HOURS POP-UP
   Used by chat.js and hours-popup.js.
   Relies on the colour tokens in style.css.
   ========================================= */

/* ================= LIVE CHAT ================= */
.sade-chat {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
}

.sade-chat-toggle {
  width: 58px;
  height: 58px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  padding: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sade-chat-toggle:hover { transform: scale(1.06); }

.sade-chat-toggle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sade-chat-box {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 340px;
  height: 480px;
  max-height: calc(100vh - 140px);
  background: var(--white);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
  display: none;
  flex-direction: column;
  border-top: 2px solid var(--black);
  animation: pop 0.22s ease;
}

.sade-chat.open .sade-chat-box { display: flex; }

.sade-chat-header {
  background: var(--black);
  color: var(--white);
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.sade-chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--white);
  object-fit: contain;
  padding: 4px;
}

.sade-chat-title {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sade-chat-title span {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sade-chat-title small {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
}

.sade-chat-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.sade-chat-close:hover { color: var(--white); }

.sade-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--off-white);
}

.sade-chat-msg {
  max-width: 82%;
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.sade-chat-msg.bot {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--black);
}

.sade-chat-msg.user {
  align-self: flex-end;
  background: var(--black);
  color: var(--white);
}

.sade-chat-msg.typing {
  display: flex;
  gap: 4px;
  padding: 0.75rem 0.9rem;
}

.sade-chat-msg.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray);
  animation: chatDot 1.2s infinite ease-in-out;
}

.sade-chat-msg.typing span:nth-child(2) { animation-delay: 0.15s; }
.sade-chat-msg.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes chatDot {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40%           { opacity: 1;   transform: translateY(-3px); }
}

.sade-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: var(--off-white);
  border-top: 1px solid var(--border);
}

.sade-chat-chip {
  background: var(--white);
  border: 1px solid var(--border);
  font-family: 'Barlow', sans-serif;
  font-size: 0.74rem;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.sade-chat-chip:hover { border-color: var(--black); }

.sade-chat-form {
  display: flex;
  border-top: 1px solid var(--border);
}

.sade-chat-input {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 0.85rem 1rem;
  font-family: 'Barlow', sans-serif;
  font-size: 0.88rem;
  outline: none;
}

.sade-chat-send {
  border: none;
  background: var(--black);
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0 1.2rem;
  cursor: pointer;
}

.sade-chat-send:disabled { opacity: 0.5; cursor: default; }

@media (max-width: 600px) {
  .sade-chat { bottom: 16px; right: 16px; }
  .sade-chat-box {
    position: fixed;
    right: 16px;
    left: 16px;
    bottom: 84px;
    width: auto;
    height: min(480px, calc(100vh - 120px));
  }
}

/* ================= OPENING HOURS POP-UP ================= */
.hours-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 16px;
}

.hours-modal.show { display: flex; }

.hours-card {
  position: relative;
  background: var(--white);
  border-top: 2px solid var(--black);
  width: 100%;
  max-width: 360px;
  padding: 2.4rem 2rem 2rem;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  animation: pop 0.25s ease;
}

.hours-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--gray);
  cursor: pointer;
}

.hours-close:hover { color: var(--black); }

.hours-logo {
  height: 46px;
  margin-bottom: 0.8rem;
}

.hours-card h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}

.hours-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.hours-row:last-of-type { border-bottom: none; }

.hours-day {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.hours-closed {
  text-align: right;
}

.hours-lords-day {
  display: block;
  font-style: italic;
  font-weight: 300;
  font-size: 0.8rem;
  color: var(--gray);
  margin-top: 0.15rem;
}

.hours-ok {
  margin-top: 1.4rem;
  width: 100%;
  border: none;
  background: var(--black);
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.85rem;
  cursor: pointer;
}

.hours-ok:hover { opacity: 0.8; }
