/* Noura Skin Secrets — Hudassistent widget */

.ha-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 990;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: none;
  border-radius: 999px;
  background: var(--plum, #392430);
  color: #fff;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(34, 16, 25, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.ha-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(34, 16, 25, 0.45); }
.ha-fab.hidden { opacity: 0; pointer-events: none; }
.ha-fab-label {
  font-size: 0.92rem;
  font-weight: 500;
  font-family: inherit;
}

.ha-panel {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 995;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: var(--cream, #F7F1E8);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(34, 16, 25, 0.3);
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.ha-panel.open { opacity: 1; transform: none; pointer-events: auto; }

.ha-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--plum-deep, #1E0D15), var(--plum, #392430));
  color: #fff;
}
.ha-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.6); }
.ha-title { font-weight: 700; font-size: 1rem; }
.ha-sub { font-size: 0.78rem; opacity: 0.85; }
.ha-close {
  margin-left: auto;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
}
html[dir="rtl"] .ha-close { margin-left: 0; margin-right: auto; }
.ha-close:hover { background: rgba(255,255,255,0.3); }

.ha-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }

.ha-msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 0.88rem; line-height: 1.5; animation: ha-in 0.25s ease; }
@keyframes ha-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ha-msg--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--blush, #F2E6DF);
  border-bottom-left-radius: 4px;
  box-shadow: 0 3px 10px rgba(34, 16, 25, 0.07);
}
.ha-msg--user { align-self: flex-end; background: var(--plum, #392430); color: #fff; border-bottom-right-radius: 4px; }

.ha-options { padding: 10px 12px 14px; display: flex; flex-wrap: wrap; gap: 8px; border-top: none; background: #fff; padding-top: 6px; }
.ha-opt {
  border: 1.5px solid var(--gold-soft, #D9BE93);
  background: #fff;
  color: var(--plum, #392430);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.ha-opt:hover { background: var(--plum, #392430); border-color: var(--plum, #392430); color: #fff; }

.ha-p { margin: 0 0 8px; }

.ha-treatment { background: var(--blush, #F2E6DF); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.ha-treatment-name { font-weight: 700; color: var(--plum, #392430); font-size: 0.86rem; }
.ha-treatment-meta { font-size: 0.8rem; color: var(--taupe, #6E5A4D); margin: 2px 0 4px; }
.ha-treatment-why { font-size: 0.8rem; margin-bottom: 6px; }
.ha-book-btn {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff !important;
  background: var(--gold-ink, #7A5C28);
  padding: 6px 12px;
  border-radius: 999px;
  margin-top: 2px;
}
.ha-book-btn:hover { background: var(--plum, #392430); }

.ha-note { background: #fdf6ec; border: 1px solid #f0e2c8; border-radius: 10px; padding: 8px 12px; font-size: 0.8rem; margin: 8px 0; }
.ha-disclaimer { font-size: 0.7rem; color: var(--taupe, #6E5A4D); margin-top: 8px; }

.ha-care { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 8px 0; }
.ha-care-col { background: var(--blush, #F2E6DF); border-radius: 12px; padding: 10px 12px; }
.ha-care-col h5 { margin: 0 0 6px; font-size: 0.82rem; color: var(--plum, #392430); }
.ha-care-col ul { margin: 0; padding-left: 18px; font-size: 0.79rem; }
.ha-care-col li { margin-bottom: 3px; }

@media (max-width: 480px) {
  .ha-panel { left: 8px; right: 8px; bottom: 8px; width: auto; height: 80vh; }
  .ha-fab { bottom: 16px; left: 16px; padding: 12px 18px; }
}

.ha-inputrow { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--blush, #F2E6DF); background: #fff; }
.ha-input {
  flex: 1;
  border: 1.5px solid var(--blush, #F2E6DF);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.86rem;
  outline: none;
  font-family: inherit;
  color: var(--ink, #221019);
  background: var(--cream, #F7F1E8);
}
.ha-input:focus { border-color: var(--gold-soft, #D9BE93); background: #fff; }
.ha-send {
  border: none;
  background: var(--plum, #392430);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
}
.ha-send:hover { background: var(--gold-ink, #7A5C28); }
.ha-msg--user { direction: auto; unicode-bidi: plaintext; }
