/* DeeDee — SimpleDeeds chat assistant (launcher, panel, homepage section).
   Launcher styling from the "Ask DeeDee" button handoff, in the site's green. */

/* ---------- Launcher ---------- */
.deedee-launcher {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: inline-flex; align-items: center; gap: 9px;
  border: 0; border-radius: 999px; padding: 4px 16px 4px 4px; min-height: 46px;
  background: #15795B; color: #fff;
  box-shadow: 0 7px 17px rgba(18, 66, 47, .25);
  font: 700 15px/1.1 "Hanken Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  white-space: nowrap; cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.deedee-launcher:hover { background: #0E5A43; box-shadow: 0 9px 19px rgba(18,66,47,.3); transform: translateY(-1px); }
.deedee-launcher:focus-visible { outline: 3px solid #f0c65f; outline-offset: 3px; }
.deedee-launcher:active { transform: translateY(0); }
.deedee-launcher__avatar { width: 38px; height: 38px; display: block; border-radius: 50%; object-fit: cover; flex: none; background: #fff; }

/* ---------- Panel ---------- */
#chat-panel {
  position: fixed; right: 22px; bottom: 82px; z-index: 61;
  width: 380px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 110px);
  background: #fff; border: 1px solid #DCE1DB; border-radius: 18px;
  box-shadow: 0 24px 60px -20px rgba(22,32,27,.45);
  display: none; flex-direction: column; overflow: hidden;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
}
#chat-panel.open { display: flex; }
.dd-head { background: #0E5A43; color: #fff; padding: 12px 14px; display: flex; align-items: center; gap: 11px; }
.dd-head img { width: 42px; height: 42px; border-radius: 50%; background: #fff; flex: none; }
.dd-head .dd-name { font-weight: 800; font-size: 16px; line-height: 1.2; }
.dd-head .dd-sub { font-size: 12px; color: #BFE3D2; }
.dd-head .dd-close { margin-left: auto; background: transparent; border: none; color: #BFE3D2; font-size: 26px; cursor: pointer; line-height: 1; padding: 0 4px; }
.dd-head .dd-close:hover { color: #fff; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; background: #F5F6F3; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.bot { background: #fff; border: 1px solid #DCE1DB; align-self: flex-start; border-bottom-left-radius: 4px; color: #16201B; }
.msg.user { background: #15795B; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg a { color: inherit; text-decoration: underline; }
.msg.typing { color: #7C857F; letter-spacing: 2px; }

/* Disclaimer gate */
.dd-gate { background: #fff; border: 1.5px solid #15795B; border-radius: 14px; padding: 13px 14px; font-size: 13.5px; line-height: 1.5; color: #16201B; }
.dd-gate p { margin: 0 0 10px; }
.dd-gate button { width: 100%; border: 0; border-radius: 10px; background: #15795B; color: #fff; font: inherit; font-weight: 800; font-size: 15px; padding: 11px; cursor: pointer; }
.dd-gate button:hover { background: #0E5A43; }
.dd-resume { display: grid; gap: 8px; }
.dd-gate button.dd-alt { background: #fff; color: #0E5A43; border: 1.5px solid #15795B; }
.dd-gate button.dd-alt:hover { background: #E6F1EB; }

/* Quick replies */
.dd-chips { display: flex; flex-wrap: wrap; gap: 7px; align-self: flex-start; max-width: 100%; }
.dd-chips button { border: 1.5px solid #15795B; background: #fff; color: #0E5A43; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; text-align: left; }
.dd-chips button:hover { background: #E6F1EB; }

.chat-input { display: flex; gap: 8px; padding: 10px 12px 6px; border-top: 1px solid #E8ECE6; background: #fff; }
.chat-input input { flex: 1; min-width: 0; padding: 11px 13px; border: 1px solid #DCE1DB; border-radius: 999px; font: inherit; font-size: 15px; }
.chat-input input:disabled { background: #F5F6F3; }
.chat-input button { background: #15795B; color: #fff; border: none; border-radius: 999px; padding: 0 18px; font-weight: 700; cursor: pointer; font: inherit; }
.chat-input button:disabled { opacity: .5; cursor: default; }
.dd-fine { background: #fff; padding: 0 14px 10px; font-size: 11px; line-height: 1.4; color: #7C857F; text-align: center; }

@media (max-width: 480px) {
  #chat-panel { right: 8px; left: 8px; width: auto; max-width: none; bottom: 78px; height: calc(100vh - 100px); height: calc(100dvh - 100px); }
  .deedee-launcher { right: 14px; bottom: 14px; }
}

/* ---------- Homepage section: "Not sure what you need? Ask DeeDee!" ---------- */
.dd-section .dd-card {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: center;
  background: linear-gradient(135deg, #E6F1EB, #F5F6F3 70%); border: 1px solid #DCE1DB; border-radius: 22px; padding: 34px 38px;
}
.dd-section .dd-avatar { width: 220px; height: 220px; border-radius: 50%; display: block; }
.dd-section h2 { margin: 6px 0 10px; font-size: clamp(28px, 3.2vw, 40px); }
.dd-section .dd-lede { margin: 0 0 18px; color: #4C5751; font-size: 17px; max-width: 46em; }
.dd-section .dd-qs { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 18px; }
.dd-section .dd-qs button {
  border: 1.5px solid #15795B; background: #fff; color: #0E5A43; border-radius: 999px;
  padding: 10px 15px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; text-align: left;
}
.dd-section .dd-qs button:hover { background: #15795B; color: #fff; }
.dd-section .dd-disclaimer { margin: 16px 0 0; font-size: 12.5px; line-height: 1.55; color: #7C857F; max-width: 52em; }
@media (max-width: 760px) {
  .dd-section .dd-card { grid-template-columns: 1fr; text-align: center; padding: 26px 20px; gap: 14px; }
  .dd-section .dd-avatar { width: 150px; height: 150px; margin: 0 auto; }
  .dd-section .dd-qs { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) { .deedee-launcher { transition: none; } }
