/* WohlAura customer chat: warm support header, quick topics, compact composer. */
.chat-panel {
  width: min(440px, calc(100vw - 28px)) !important;
  max-height: min(640px, calc(100vh - var(--header-h, 72px) - 110px)) !important;
  border: 1px solid #eee6df !important;
  border-radius: 22px !important;
  background: #fff !important;
  box-shadow: 0 22px 64px rgba(42, 25, 14, .22) !important;
}
@media (min-width: 769px) {
  #chatPanel.chat-panel:not(.is-expanded) {
    height: min(640px, calc(100vh - var(--header-h, 72px) - 110px)) !important;
    min-height: min(420px, calc(100vh - 200px)) !important;
  }
}
.chat-panel-header {
  display: flex !important;
  min-height: 86px;
  gap: 12px;
  padding: 16px 18px !important;
  background: linear-gradient(112deg, #f4772c 0%, #ef5b19 58%, #e94a0b 100%) !important;
  color: #fff;
}
.chat-agent { min-width: 0; gap: 13px; }
.agent-avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.75);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 12px rgba(122, 47, 12, .18);
}
.agent-avatar img, .chat-promo-avatar img { display: block; width: 100%; height: 100%; object-fit: contain; }
.agent-name { color: #fff; font-size: 16px; font-weight: 800; line-height: 1.25; }
.chat-header-tagline { margin-top: 3px; color: rgba(255,255,255,.94); font-size: 12px; line-height: 1.3; }
.chat-panel-header .agent-status { margin-top: 3px; color: #fff; font-size: 11px; }
.chat-panel-header .admin-online-dot { width: 7px; height: 7px; background: #49e078; }
.chat-header-actions { display: flex; flex: 0 0 auto; align-items: flex-start; gap: 9px; }
.chat-minimize-btn, .chat-close-btn {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.chat-minimize-btn { font-size: 27px; line-height: 1; }
.chat-close-btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2.2; }
.chat-minimize-btn:hover, .chat-close-btn:hover { background: rgba(255,255,255,.18); transform: translateY(-1px); }
.chat-start-screen {
  display: flex !important;
  flex: 1 1 auto;
  min-height: 0;
  gap: 0 !important;
  overflow-y: auto;
  background: #fff;
}
.chat-start-hero { padding: 18px 18px 6px !important; background: #fff !important; color: #20242a !important; }
.chat-start-message { padding: 16px 17px 13px; border: 1px solid #eceef1; border-radius: 19px 19px 19px 6px; background: #f3f4f6; }
.chat-start-message h3 { margin: 0 0 7px !important; color: #252a32 !important; font-size: 17px !important; font-weight: 750 !important; line-height: 1.3 !important; }
.chat-start-message p { margin: 0 !important; color: #363b44 !important; font-size: 14px !important; line-height: 1.55 !important; }
.chat-start-time { display: block; margin-top: 7px; color: #89909b; font-size: 11px; }
.quick-replies { padding: 12px 18px 17px !important; }
.quick-replies h4 { margin: 0 0 10px !important; color: #68717c !important; font-size: 12px !important; font-weight: 700 !important; text-align: left !important; }
.chat-topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick-replies .chat-topic-grid button {
  display: flex;
  min-width: 0;
  min-height: 54px;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #ffd5c0;
  border-radius: 999px;
  background: linear-gradient(120deg, #fffaf7, #fff);
  color: #d84b12;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.quick-replies .chat-topic-grid button:hover { transform: translateY(-1px); border-color: #f47b43; background: #fff5ee; box-shadow: 0 4px 12px rgba(220, 81, 23, .08); }
.quick-replies .chat-topic-grid button:focus-visible, .chat-start-btn:focus-visible { outline: 3px solid rgba(238, 91, 25, .24); outline-offset: 2px; }
.chat-topic-grid img { width: 29px; height: 29px; flex: 0 0 29px; object-fit: contain; }
.chat-start-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(110deg, #f4772c, #e94d0c);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(226, 77, 13, .2);
  transition: transform .18s ease, box-shadow .18s ease;
}
.chat-start-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(226, 77, 13, .26); }
.chat-messages {
  min-height: 180px !important;
  padding: 16px !important;
  gap: 11px !important;
  background: #fff !important;
}
.chat-msg { font-size: 13px; }
.chat-msg.admin { border-color: #eceef1; border-radius: 17px 17px 17px 5px; background: #f3f4f6; color: #29313b; }
.chat-msg.customer { border-radius: 17px 17px 5px 17px; background: linear-gradient(115deg, #ed5b1c, #d9470d); }
#chatInputArea.chat-input-area { gap: 0; padding: 10px 14px 0 !important; border-top: 1px solid #f0eeeb; background: #fff; }
.chat-compose-card { padding: 8px 10px 7px; border: 1px solid #d9dde3; border-radius: 20px; box-shadow: none; }
.chat-compose-card:focus-within { border-color: #ee7b48; box-shadow: 0 0 0 3px rgba(238, 91, 25, .08); }
.chat-compose-field > textarea#chatInput { min-height: 42px !important; padding: 8px 5px !important; color: #252a32; font-size: 14px; }
.chat-compose-actions { min-height: 42px; gap: 8px; padding-top: 6px; }
.chat-compose-icon, .chat-end-inline, .chat-compose-actions .chat-voice-btn { min-height: 36px; border-radius: 11px; }
.chat-compose-icon img { display: block; width: 23px; height: 23px; object-fit: contain; }
.chat-compose-icon:hover, .chat-end-inline:hover { background: #fff4ed; }
.chat-end-inline { gap: 4px; padding: 0 6px; color: #8a9099; font-size: 10px; font-weight: 650; }
.chat-end-inline img { width: 17px; height: 17px; object-fit: contain; }
.chat-compose-actions .chat-voice-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-basis: 38px; border: 0; background: #f3f4f6; }
.chat-compose-actions .chat-voice-btn img { display: block; width: 23px; height: 23px; object-fit: contain; }
.chat-compose-actions .chat-voice-btn:hover { background: #fff1e7; }
.chat-compose-actions .chat-voice-btn.is-recording img { filter: brightness(0) invert(1); }
.chat-compose-actions .chat-send-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 42px; border: 0; border-radius: 50%; background: linear-gradient(135deg, #f87831, #eb4c0d); box-shadow: 0 4px 12px rgba(224, 76, 13, .22); }
.chat-compose-actions .chat-send-btn:hover { background: linear-gradient(135deg, #f87831, #d83f08); transform: translateY(-1px); }
.chat-compose-actions .chat-send-btn img { display: block; width: 22px; height: 22px; object-fit: contain; filter: brightness(0) invert(1); }
.chat-response-note { display: none; align-items: center; gap: 8px; padding: 6px 8px; color: #718097; font-size: 11px; line-height: 1.35; }
.chat-response-note.is-visible { display: flex; }

/* Match the restored mockup while keeping every chat control in the widget. */
#chatInitForm .chat-start-btn { display: none !important; }
.quick-replies h4 { display: none !important; }
.chat-panel-header { align-items: center !important; }
.chat-header-actions { align-items: center !important; gap: 6px !important; }
.chat-expand-btn { display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.chat-expand-btn:hover { background: rgba(255,255,255,.18); }
.chat-expand-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat-expand-btn .chat-collapse-icon { display: none; }
#chatPanel.is-expanded .chat-expand-icon { display: none; }
#chatPanel.is-expanded .chat-collapse-icon { display: block; }
.chat-start-hero { padding: 16px 18px 5px !important; }
.chat-start-message { padding: 15px 16px 13px; border-radius: 19px; background: linear-gradient(145deg,#f4f5f7,#eef0f3); }
.chat-start-message p { line-height: 1.48 !important; }
.quick-replies { padding: 8px 18px 14px !important; }
#chatInputArea.chat-input-area { display: flex !important; flex: 0 0 auto; padding: 10px 14px 0 !important; background: #fff; }
.chat-panel #chatInputArea.chat-input-area { flex-direction: column !important; align-items: stretch !important; }
.chat-compose-card { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 1px; padding: 5px 7px 4px; border: 1.5px solid #cbd0d8; border-radius: 17px; background: #fff; box-shadow: 0 2px 8px rgba(31,41,55,.06); }
.chat-panel .chat-compose-card { box-sizing: border-box; width: 100%; min-width: 0; }
.chat-compose-card:focus-within { border-color: #c4cad3; box-shadow: 0 0 0 3px rgba(103,114,130,.08); }
.chat-compose-field { align-items: stretch; width: 100%; min-height: 40px; }
.chat-compose-field > textarea#chatInput { min-width: 0; min-height: 38px !important; max-height: 100px !important; padding: 5px 4px !important; color: #273244; font-size: 14px; line-height: 1.4; resize: none; }
.chat-compose-field > textarea#chatInput::placeholder { color: #7d89a1; opacity: 1; }
.chat-compose-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; min-height: 31px; padding: 3px 0 0; border: 0; border-top: 1px solid #edf0f3; }
.chat-compose-actions > #chatImgBtn { width: 29px; height: 29px; border: 0; border-radius: 9px; background: #f3f4f6; transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease; }
.chat-compose-actions > #chatImgBtn:hover { transform: translateY(-2px) rotate(-4deg); background: #fff1e8; box-shadow: 0 4px 10px rgba(220,81,23,.15); }
.chat-compose-actions > #chatImgBtn:active { transform: scale(.94); }
.chat-compose-actions .chat-voice-btn { width: 31px; height: 29px; flex: 0 0 31px; padding: 0; border: 1px solid #d7dbe1; border-radius: 9px; background: #fff; }
.chat-compose-actions .chat-voice-btn img { width: 19px; height: 19px; }
.chat-compose-actions .chat-voice-btn svg { width: 17px; height: 17px; flex: 0 0 17px; }
.chat-compose-actions .chat-voice-btn.is-recording { width: 31px; min-width: 31px; height: 29px; flex: 0 0 31px; justify-content: center; gap: 0; padding: 0; border: 1px solid #b92e27; border-radius: 9px; background: #c9342c; color: #fff; box-shadow: 0 3px 10px rgba(185,46,39,.26); animation: none; }
.chat-compose-actions .chat-voice-btn.is-recording:hover { border-color: #9f241f; background: #ad2924; color: #fff; }
.chat-compose-actions .chat-voice-btn.is-recording svg { fill: currentColor; stroke: none; }
.chat-compose-actions .chat-send-btn { width: 34px; height: 32px; flex: 0 0 34px; border-radius: 10px; }
.chat-compose-actions .chat-send-btn img { width: 20px; height: 20px; }
.chat-compose-spacer { flex: 1 1 auto; min-width: 0; }
.chat-compose-field .chat-voice-visualizer { padding: 0 13px; }
.chat-end-wrap { flex: 0 0 auto; }
.chat-end-inline { min-height: 28px; padding: 0 6px; color: #858b95; font-size: 10px; }
.chat-compose-actions .chat-end-inline { display: inline-flex; height: 28px; min-height: 28px; align-items: center; justify-content: center; gap: 4px; padding: 0 6px; border: 0; border-radius: 9px; background: #f3f4f6; color: #656d79; font-size: 9px; font-weight: 650; white-space: nowrap; }
.chat-compose-actions .chat-end-inline:hover { background: #fff1e8; color: #d84b12; }
.chat-start-screen { flex: 1 1 0 !important; min-height: 0; }
.chat-start-hero { padding: 10px 14px 3px !important; }
.chat-start-message { padding: 11px 13px 9px; }
.chat-start-message h3 { margin-bottom: 4px !important; font-size: 15px !important; }
.chat-start-message p { font-size: 12px !important; line-height: 1.35 !important; }
.chat-start-time { display: none; }
.quick-replies { padding: 5px 14px 8px !important; }
.chat-topic-grid { gap: 6px; }
.quick-replies .chat-topic-grid button { min-height: 44px; gap: 7px; padding: 7px 9px; font-size: 11px; }
.chat-topic-grid img { width: 24px; height: 24px; pointer-events: none; }
.chat-response-note.is-error { color: #a93420; }
.chat-response-note.is-error > span { background: #df4c31; box-shadow: 0 0 0 3px rgba(223,76,49,.12); }
@media (max-width: 600px) {
  #chatInputArea.chat-input-area { padding: 9px 10px 0 !important; }
  .chat-compose-card { gap: 1px; padding: 5px 6px 4px; border-radius: 16px; }
  .chat-compose-field { min-height: 44px; }
  .chat-compose-field > textarea#chatInput { min-height: 42px !important; }
  .chat-compose-actions { gap: 4px; min-height: 35px; padding-top: 3px; }
  .chat-compose-actions > #chatImgBtn { width: 32px; height: 32px; }
  .chat-compose-actions .chat-voice-btn { width: 34px; height: 32px; flex-basis: 34px; }
  .chat-compose-actions .chat-voice-btn.is-recording { width: 34px; min-width: 34px; height: 32px; flex: 0 0 34px; }
  .chat-compose-actions .chat-send-btn { width: 36px; height: 34px; flex-basis: 36px; }
  .chat-compose-actions .chat-voice-btn img { width: 22px; height: 22px; }
  .chat-compose-actions .chat-send-btn img { width: 20px; height: 20px; }
  .chat-compose-actions .chat-end-inline { height: 28px; min-height: 28px; padding-inline: 5px; font-size: 8.5px; }
}
@media (max-width: 365px) {
  .chat-compose-card { padding: 4px; }
  .chat-compose-actions { gap: 3px; }
  .chat-compose-actions > #chatImgBtn { width: 29px; height: 29px; }
  .chat-compose-actions .chat-voice-btn { width: 30px; height: 29px; flex-basis: 30px; }
  .chat-compose-actions .chat-voice-btn.is-recording { width: 30px; min-width: 30px; height: 29px; flex: 0 0 30px; padding: 0; }
  .chat-compose-actions .chat-send-btn { width: 32px; height: 31px; flex-basis: 32px; }
}
