/* Ember Assistant Styles */
.ember-asst-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", "Apple Color Emoji", "Segoe UI Emoji";
}

.ember-asst-avatar {
  width: 84px;
  height: 84px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 25px rgba(15,23,42,.35);
  cursor: pointer;
  position: relative;
  transition: transform .2s ease, box-shadow .2s ease;
}
.ember-asst-avatar:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 14px 30px rgba(15,23,42,.45); }
.ember-asst-avatar.small { width: 38px; height: 38px; box-shadow: none; background: transparent; }

.ember-asst-notif {
  position: absolute;
  top: 6px; right: 6px;
  width: 10px; height: 10px;
  background: #22c55e;
  border-radius: 9999px;
  box-shadow: 0 0 0 0 rgba(34,197,94,.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,.7); }
  70% { box-shadow: 0 0 0 12px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.ember-asst-panel {
  position: absolute;
  bottom: 100%;
  right: 0;
  width: min(420px, calc(100vw - 24px));
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: #0b1220;
  color: #e5e7eb;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}

.ember-asst-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: linear-gradient(180deg, #0f172a, #0b1220);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.ember-asst-header-info { display: flex; gap: 10px; align-items: center; }
.ember-asst-name { font-weight: 700; letter-spacing: .2px; }
.ember-asst-role { font-size: 12px; opacity: .7; }
.ember-asst-close { background: transparent; border: 0; color:#fff; font-size: 22px; cursor: pointer; }

.ember-asst-body { display: flex; flex-direction: column; gap: 10px; min-height: 260px; }
.ember-asst-messages {
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 52vh;
}
.ember-msg { display: flex; }
.ember-msg.user { justify-content: flex-end; }
.ember-msg .bubble {
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.35;
  font-size: 14px;
  background: #101826;
  border: 1px solid rgba(255,255,255,.06);
}
.ember-msg.user .bubble { background: #1f2937; }

.ember-asst-input {
  display: grid;
  grid-template-columns: 42px 1fr 46px;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.ember-asst-input input {
  width: 100%;
  background: #0f172a;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 10px 12px;
  color: #e5e7eb;
}
.ember-asst-send, .ember-asst-mic {
  border: 0; border-radius: 12px; cursor: pointer;
  background: #334155; color: #fff; font-size: 16px;
}
.ember-asst-mic.rec { background: #16a34a; }

/* Cards */
.ember-cards { display: grid; gap: 10px; margin: 8px 12px 12px; }
.ember-card {
  background: #0f172a;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 12px;
}
.ember-card .card-title { font-weight: 700; margin-bottom: 4px; }
.ember-card .card-title a { color: #fff; text-decoration: none; }
.ember-card .card-addr { font-size: 13px; opacity: .8; margin-bottom: 4px; }
.ember-card .card-phone, .ember-card .card-link {
  display: inline-block; font-size: 13px; margin-right: 8px; color: #60a5fa;
}

/* Avatar animation */
.ember-avatar-svg { transform-origin: 50% 60%; animation: subtleFloat 6s ease-in-out infinite; }
@keyframes subtleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.5px); }
}
.ember-eye { animation: blink 6s infinite; transform-origin: center; }
@keyframes blink {
  0%, 96%, 100% { transform: scaleY(1); }
  97%, 99% { transform: scaleY(0.1); }
}
.ember-breath { animation: breath 4s ease-in-out infinite; }
@keyframes breath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.01); }
}
.ember-mouth { transition: d .1s ease, stroke-width .1s ease; }
.ember-mouth.talk { stroke-width: 4; }

/* State */
.ember-asst-widget.open .ember-asst-notif { display: none; }
