/* Power Path Counseling — Chat Widget v2 */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@400;500&display=swap');

:root { --ppc-color: #1D9E75; --ppc-color-dark: #0F6E56; --ppc-color-light: #E1F5EE; }

#ppc-launcher {
  position: fixed; bottom: 24px; width: 54px; height: 54px; border-radius: 50%;
  background: var(--ppc-color); border: none; cursor: pointer; z-index: 99998;
  box-shadow: 0 4px 18px rgba(0,0,0,0.18); display: flex; align-items: center;
  justify-content: center; transition: transform 0.18s, background 0.18s;
}
#ppc-launcher:hover { background: var(--ppc-color-dark); transform: scale(1.06); }
#ppc-launcher.ppc-right { right: 24px; }
#ppc-launcher.ppc-left  { left:  24px; }

#ppc-launcher svg { width: 24px; height: 24px; fill: white; transition: opacity 0.15s; }
#ppc-launcher .ico-close { display: none; }
#ppc-launcher.open .ico-chat  { display: none; }
#ppc-launcher.open .ico-close { display: block; }

#ppc-badge {
  position: absolute; top: -3px; right: -3px; width: 18px; height: 18px;
  background: #D85A30; border-radius: 50%; font-size: 10px; color: white;
  font-family: 'DM Sans', sans-serif; font-weight: 500; display: none;
  align-items: center; justify-content: center;
}

#ppc-window {
  position: fixed; bottom: 90px; width: 360px; max-width: calc(100vw - 28px);
  height: 530px; max-height: calc(100vh - 110px); background: #fff;
  border-radius: 16px; box-shadow: 0 10px 44px rgba(0,0,0,0.13); z-index: 99997;
  display: none; flex-direction: column; overflow: hidden;
  font-family: 'DM Sans', sans-serif; border: 1px solid rgba(0,0,0,0.07);
}
#ppc-window.ppc-right { right: 24px; }
#ppc-window.ppc-left  { left:  24px; }
#ppc-window.visible { display: flex; animation: ppcUp 0.2s ease; }

@keyframes ppcUp { from { opacity:0; transform:translateY(12px) } to { opacity:1; transform:translateY(0) } }

/* Header */
#ppc-head {
  padding: 12px 14px; display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; background: var(--ppc-color);
}
.ppc-av {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.22); display: flex; align-items: center;
  justify-content: center; font-family: 'DM Serif Display', serif;
  font-size: 15px; color: white; flex-shrink: 0;
}
.ppc-head-name { font-size: 13.5px; font-weight: 500; color: white; margin: 0 0 1px; }
.ppc-head-sub  { font-size: 11px; color: rgba(255,255,255,0.75); display: flex; align-items: center; gap: 4px; }
.ppc-dot { width: 6px; height: 6px; background: #9FE1CB; border-radius: 50%; display: inline-block; }

/* Lead screen */
#ppc-lead {
  padding: 18px 16px; display: flex; flex-direction: column;
  gap: 11px; flex: 1; overflow-y: auto;
}
.ppc-intro-title { font-family: 'DM Serif Display', serif; font-size: 17px; font-weight: 400; color: #1a1a1a; margin-bottom: 2px; }
.ppc-intro-sub   { font-size: 13.5px; line-height: 1.6; color: #555; }
.ppc-lf label    { display: block; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: #999; margin-bottom: 4px; }
.ppc-lf input    {
  width: 100%; padding: 9px 11px; border: 1px solid #ddd; border-radius: 8px;
  font-size: 14px; font-family: 'DM Sans', sans-serif; outline: none;
  transition: border-color 0.15s; box-sizing: border-box; color: #1a1a1a;
}
.ppc-lf input:focus { border-color: var(--ppc-color); }
.ppc-lf input.err   { border-color: #D85A30; }

.ppc-start {
  width: 100%; padding: 11px; background: var(--ppc-color); color: white;
  border: none; border-radius: 8px; font-size: 14px; font-weight: 500;
  font-family: 'DM Sans', sans-serif; cursor: pointer; transition: background 0.15s; margin-top: 2px;
}
.ppc-start:hover { background: var(--ppc-color-dark); }
.ppc-privacy { font-size: 11px; color: #bbb; text-align: center; line-height: 1.5; }

/* Messages */
#ppc-msgs {
  flex: 1; overflow-y: auto; padding: 14px 13px 8px;
  display: none; flex-direction: column; gap: 9px;
}
#ppc-msgs::-webkit-scrollbar { width: 3px; }
#ppc-msgs::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

.msg { max-width: 84%; font-size: 13.5px; line-height: 1.65; padding: 9px 13px; border-radius: 14px; word-break: break-word; }
.msg.bot  { background: #f2f2f0; color: #1a1a1a; align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.user { background: var(--ppc-color); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }

.typing { display: flex; gap: 4px; padding: 10px 13px; background: #f2f2f0; border-radius: 14px 14px 14px 4px; align-self: flex-start; }
.typing span { width: 6px; height: 6px; background: #bbb; border-radius: 50%; animation: tdot 1.2s infinite; }
.typing span:nth-child(2) { animation-delay:.2s }
.typing span:nth-child(3) { animation-delay:.4s }
@keyframes tdot { 0%,60%,100%{transform:translateY(0);opacity:.5} 30%{transform:translateY(-4px);opacity:1} }

.book-cta {
  background: var(--ppc-color-light); border-radius: 10px; padding: 10px 12px;
  font-size: 13px; color: #085041; align-self: flex-start; max-width: 88%; line-height: 1.5;
}
.book-cta a {
  display: inline-block; margin-top: 7px; background: var(--ppc-color); color: white;
  text-decoration: none; padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 500;
}
.book-cta a:hover { background: var(--ppc-color-dark); }

/* Input */
#ppc-bar {
  padding: 10px 11px; border-top: 1px solid #f0f0f0;
  display: none; align-items: flex-end; gap: 8px; flex-shrink: 0;
}
#ppc-bar textarea {
  flex: 1; border: 1px solid #e2e2e2; border-radius: 10px; padding: 9px 11px;
  font-size: 13.5px; font-family: 'DM Sans', sans-serif; resize: none; outline: none;
  line-height: 1.5; max-height: 100px; overflow-y: auto; color: #1a1a1a;
  transition: border-color 0.15s;
}
#ppc-bar textarea:focus { border-color: var(--ppc-color); }
#ppc-bar textarea::placeholder { color: #c0c0c0; }
#ppc-send {
  width: 35px; height: 35px; border-radius: 50%; background: var(--ppc-color);
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.15s; margin-bottom: 1px;
}
#ppc-send:hover    { background: var(--ppc-color-dark); }
#ppc-send:disabled { background: #9FE1CB; cursor: not-allowed; }
#ppc-send svg { width: 15px; height: 15px; fill: white; }

#ppc-foot { text-align: center; font-size: 10px; color: #ccc; padding: 0 0 7px; display: none; font-family: 'DM Sans', sans-serif; }

@media (max-width:480px) {
  #ppc-window { width: calc(100vw - 20px); right: 10px !important; left: 10px !important; }
  #ppc-launcher.ppc-right { right: 16px; }
  #ppc-launcher.ppc-left  { left:  16px; }
}
