/* Public HOA Copilot (pre-signup)
   - Floating button + modal chat (default)
   - Inline render when #ourhoa-public-copilot-inline is present
*/

.ourhoa-pc-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ourhoa-pc-fab .ourhoa-btn {
  border-radius: 999px;
  padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

.ourhoa-pc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 99998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ourhoa-pc-overlay.ourhoa-pc-open {
  display: flex;
}

.ourhoa-pc-panel {
  width: min(420px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 32px));
  background: rgba(255,255,255,0.98);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  border: 1px solid rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

.ourhoa-pc-head {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.ourhoa-pc-head-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ourhoa-pc-head-title strong {
  font-size: 14px;
}

.ourhoa-pc-head-title span {
  font-size: 12px;
  opacity: 0.75;
}

.ourhoa-pc-body {
  padding: 12px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ourhoa-pc-bubble {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.08);
  line-height: 1.35;
  font-size: 14px;
}

.ourhoa-pc-bubble.bot {
  background: rgba(0,0,0,0.03);
  align-self: flex-start;
}

.ourhoa-pc-bubble.user {
  background: rgba(30,92,255,0.10);
  align-self: flex-end;
}

.ourhoa-pc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.ourhoa-pc-actions .ourhoa-btn,
.ourhoa-pc-actions .ourhoa-btn-secondary {
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.ourhoa-pc-form {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.ourhoa-pc-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  opacity: 0.9;
}

.ourhoa-pc-form input,
.ourhoa-pc-form select {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.15);
}

.ourhoa-pc-inline {
  width: 100%;
}

.ourhoa-pc-muted {
  font-size: 12px;
  opacity: 0.75;
}

/* Pre-signup inline card: make the container a few shades bluer */
.ourhoa-wrap[data-ourhoa="public-copilot-inline"] .ourhoa-card{
  background: rgba(235, 245, 255, 0.97);
}



/* Modal layout + chat composer (visibility improvements) */
.ourhoa-pc-modal{
  width: min(560px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 32px));
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
  border: 1px solid rgba(0,0,0,0.10);
  display: flex;
  flex-direction: column;
}
.ourhoa-pc-modal-header{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 12px 14px;
  background: rgba(235, 245, 255, 0.98);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.ourhoa-pc-modal-title{
  font-weight: 700;
  letter-spacing: 0.2px;
}
.ourhoa-pc{
  flex: 1;
  display:flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.ourhoa-pc-body{
  padding: 14px;
  overflow:auto;
  flex: 1;
  min-height: 0;
}
.ourhoa-pc-composer{
  display:flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(0,0,0,0.08);
  background: rgba(245, 250, 255, 0.98);
}
.ourhoa-pc-composer input{
  flex:1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.18);
  outline: none;
}
.ourhoa-pc-composer input:focus{
  border-color: rgba(0,0,0,0.28);
}
.ourhoa-pc-composer .ourhoa-btn{
  border-radius: 12px;
  padding: 10px 12px;
}

.ourhoa-pc-modal-body{ flex:1; min-height:0; display:flex; padding:0; }

/* Message alignment helpers (JS uses ourhoa-pc-msg + ourhoa-pc-bot/user) */
.ourhoa-pc-msg{ display:flex; }
.ourhoa-pc-bot{ justify-content:flex-start; }
.ourhoa-pc-user{ justify-content:flex-end; }
.ourhoa-pc-bot .ourhoa-pc-bubble{ background: rgba(0,0,0,0.03); }
.ourhoa-pc-user .ourhoa-pc-bubble{ background: rgba(30,92,255,0.10); }


/* v0.3.49 - chat-like modal + visible tools */
.ourhoa-pc-modal{
  /* More "chat app" feel: wider and taller, clearer contrast */
  width: min(860px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.30);
  border: 1px solid rgba(0,0,0,0.10);
  display: flex;
  flex-direction: column;
}

.ourhoa-pc-modal-header{
  padding: 12px 14px;
  display:flex;
  align-items:center;
  gap:10px;
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.ourhoa-pc-modal-title{
  font-weight: 700;
  font-size: 14px;
}

.ourhoa-pc-modal-body{
  flex: 1;
  overflow: hidden; /* internal scroll handled by .ourhoa-pc-body */
  padding: 0;
}

.ourhoa-pc{
  height: 100%;
  display:flex;
  flex-direction:column;
}

.ourhoa-pc-body{
  flex: 1;
  overflow: auto;
  padding: 14px;
  background: rgba(240, 246, 255, 0.85);
}

.ourhoa-pc-composer{
  display:flex;
  gap:10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.99);
  border-top: 1px solid rgba(0,0,0,0.08);
}

.ourhoa-pc-composer input{
  flex:1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  outline: none;
}

.ourhoa-pc-composer input:focus{
  border-color: rgba(0,90,255,0.35);
  box-shadow: 0 0 0 3px rgba(0,90,255,0.12);
}

/* Icon-style tool buttons inside the composer (Mic / Speak) */
.ourhoa-icon-btn{
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  cursor: pointer;
  user-select: none;
}
.ourhoa-icon-btn:hover{
  border-color: rgba(0,0,0,0.22);
}
.ourhoa-icon-btn:active{
  transform: translateY(1px);
}
.ourhoa-disabled{
  opacity: 0.45;
  cursor: not-allowed;
}

/* Make bubbles feel more like a chat app */
.ourhoa-pc-bubble{
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
}

/* Icon buttons in the composer (Mic / Speak) */
.ourhoa-icon-btn{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.98);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.ourhoa-icon-btn:hover{ filter: brightness(0.98); }
.ourhoa-icon-btn:active{ transform: translateY(1px); }
.ourhoa-icon-btn.ourhoa-disabled,
.ourhoa-icon-btn:disabled{
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* Bubble polish to feel more like a chat app */
.ourhoa-pc-bubble{
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}


.ourhoa-pc-doc-draft{
  background: rgba(246,250,255,0.98);
  border: 1px solid rgba(30,92,255,0.18);
  border-radius: 14px;
  padding: 12px;
}
.ourhoa-pc-doc-badge{
  display:inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(30,92,255,0.10);
  border: 1px solid rgba(30,92,255,0.18);
}
.ourhoa-pc-doc-body p{ margin: 0 0 10px; }
