/* ainutri widget — hub + chat + reviews */
.aw-btn {
  position: fixed; right: 22px; bottom: 22px; z-index: 9998;
  width: 60px; height: 60px; border-radius: 50%; border: none;
  background: #1c6a5b; color: #fff; cursor: pointer;
  box-shadow: 0 6px 20px rgba(28,106,91,.35);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease, box-shadow .2s ease;
}
.aw-btn:hover { transform: scale(1.06); box-shadow: 0 8px 24px rgba(28,106,91,.5); }
.aw-btn svg { width: 28px; height: 28px; fill: #fff; }
.aw-btn .aw-dot {
  position: absolute; top: 6px; right: 6px; width: 12px; height: 12px;
  background: #ff6b6b; border-radius: 50%; border: 2px solid #fff;
  display: none;
}
.aw-btn.has-msg .aw-dot { display: block; }

.aw-panel {
  position: fixed; right: 22px; bottom: 94px; z-index: 9999;
  width: 360px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 14px;
  box-shadow: 0 16px 50px rgba(0,0,0,.18);
  overflow: hidden; display: none;
  font-family: inherit; color: #0b1c2c;
}
.aw-panel.open { display: flex; flex-direction: column; max-height: calc(100vh - 120px); animation: awSlide .2s ease; }
@keyframes awSlide { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.aw-head {
  background: linear-gradient(135deg, #1c6a5b 0%, #0f4d41 100%);
  color: #fff; padding: 14px 18px; position: relative;
  flex-shrink: 0;
}
.aw-head h4 { margin: 0; font-size: 15px; font-weight: 600; }
.aw-head p { margin: 3px 0 0; font-size: 12px; opacity: .85; }
.aw-head-back {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,.15); border: none; color: #fff;
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 14px;
  display: none;
}
.aw-head.with-back { padding-left: 46px; }
.aw-head.with-back .aw-head-back { display: block; }
.aw-close {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,.15); border: none; color: #fff;
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 14px;
}

.aw-body { overflow-y: auto; padding: 0; flex: 1; min-height: 0; }

/* меню */
.aw-menu-item {
  display: flex; align-items: center; padding: 14px 18px;
  border-bottom: 1px solid #f0eee5; cursor: pointer;
  background: #fff; transition: background .15s;
  text-decoration: none; color: inherit;
}
.aw-menu-item:hover { background: #f7f6f1; }
.aw-menu-item:last-child { border-bottom: none; }
.aw-menu-icon {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-right: 12px; font-size: 18px; flex-shrink: 0;
}
.aw-mi-chat   { background: #e8f5f0; color: #1c6a5b; }
.aw-mi-list   { background: #fff3e0; color: #c46900; }
.aw-mi-add    { background: #e8f0fc; color: #1565c0; }
.aw-mi-call   { background: #fde8ea; color: #b00020; }
.aw-menu-title { font-weight: 600; font-size: 14px; margin: 0; }
.aw-menu-sub { font-size: 12px; color: #8593a4; margin: 2px 0 0; }

/* чат */
.aw-chat-stream {
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.aw-msg {
  max-width: 85%; padding: 9px 13px; border-radius: 14px;
  font-size: 13.5px; line-height: 1.45; word-wrap: break-word;
}
.aw-msg-bot { background: #f0eee5; align-self: flex-start; border-bottom-left-radius: 4px; }
.aw-msg-user { background: #1c6a5b; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.aw-msg-system { background: #fff8e8; color: #8a4a00; align-self: center; font-size: 12px; padding: 6px 12px; }
.aw-msg-time { font-size: 10px; color: #8593a4; margin-top: 3px; }
.aw-quick {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px;
}
.aw-quick button {
  border: 1px solid #1c6a5b; background: #fff; color: #1c6a5b;
  padding: 7px 12px; border-radius: 16px; font-size: 12.5px; cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.aw-quick button:hover { background: #e8f5f0; }
.aw-fb { display: inline-flex; gap: 4px; margin-left: 8px; }
.aw-fb button {
  background: transparent; border: none; cursor: pointer; font-size: 14px; opacity: .5;
  padding: 0 4px; transition: opacity .15s;
}
.aw-fb button:hover, .aw-fb button.active { opacity: 1; }

.aw-input-row {
  display: flex; gap: 8px; padding: 10px 14px;
  border-top: 1px solid #f0eee5; background: #fafbfc;
  flex-shrink: 0;
}
.aw-input-row textarea {
  flex: 1; resize: none; border: 1px solid #d8e0e8; border-radius: 8px;
  padding: 8px 10px; font-size: 13px; font-family: inherit;
  min-height: 36px; max-height: 100px; background: #fff;
}
.aw-input-row textarea:focus { outline: none; border-color: #1c6a5b; }
.aw-input-row button {
  background: #1c6a5b; border: none; color: #fff; border-radius: 8px;
  width: 36px; height: 36px; cursor: pointer; font-size: 16px;
  align-self: flex-end;
}
.aw-input-row button:disabled { background: #8593a4; cursor: wait; }

/* контактная форма (раскрывается в чате если нет email/телефона) */
.aw-contact-form {
  background: #fff8e8; padding: 12px 14px; margin: 8px 14px;
  border-radius: 8px; border: 1px solid #f0d59d;
}
.aw-contact-form p { margin: 0 0 8px; font-size: 12.5px; color: #8a4a00; }
.aw-contact-form .aw-cf-grid { display: grid; gap: 6px; }
.aw-contact-form input {
  width: 100%; box-sizing: border-box; padding: 7px 10px;
  border: 1px solid #f0d59d; border-radius: 6px; font-size: 12.5px;
  background: #fff; font-family: inherit;
}
.aw-contact-form input:focus { outline: none; border-color: #c46900; }
.aw-contact-form .aw-cf-btn {
  width: 100%; padding: 7px; background: #c46900; color: #fff;
  border: none; border-radius: 6px; font-size: 12.5px; cursor: pointer; margin-top: 4px;
  font-family: inherit;
}

/* отзывы */
.aw-reviews-list { padding: 14px; }
.aw-review {
  background: #f7f6f1; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px;
}
.aw-review-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.aw-review-name { font-weight: 600; font-size: 13px; }
.aw-review-date { font-size: 11px; color: #8593a4; }
.aw-review-stars { color: #f4a623; font-size: 13px; margin: 2px 0 5px; letter-spacing: 1px; }
.aw-review-text { font-size: 13px; line-height: 1.45; color: #45556c; margin: 0; }
.aw-review-empty {
  padding: 24px 16px; text-align: center; color: #8593a4; font-size: 13px;
}
.aw-cta-bottom {
  padding: 12px 14px; border-top: 1px solid #f0eee5; background: #fafbfc;
}
.aw-cta-bottom button {
  width: 100%; padding: 10px; background: #1c6a5b; color: #fff;
  border: none; border-radius: 8px; font-weight: 600; cursor: pointer;
  font-size: 13.5px; font-family: inherit;
}

/* форма отзыва */
.aw-form { padding: 16px 18px; }
.aw-form label { display: block; margin-bottom: 11px; font-size: 13px; color: #45556c; }
.aw-form input, .aw-form textarea {
  width: 100%; box-sizing: border-box; padding: 9px 11px;
  border: 1px solid #d8e0e8; border-radius: 8px; font-size: 13px;
  background: #fafbfc; margin-top: 3px; font-family: inherit;
}
.aw-form input:focus, .aw-form textarea:focus { outline: none; border-color: #1c6a5b; background: #fff; }
.aw-form textarea { min-height: 80px; resize: vertical; }
.aw-stars-input {
  display: flex; gap: 4px; margin-top: 4px;
}
.aw-stars-input span {
  font-size: 26px; cursor: pointer; color: #d8e0e8; transition: color .1s;
}
.aw-stars-input span.active { color: #f4a623; }
.aw-submit {
  width: 100%; padding: 11px; border: none; border-radius: 8px;
  background: #1c6a5b; color: #fff; font-weight: 600; cursor: pointer;
  font-size: 14px; margin-top: 6px; font-family: inherit;
}
.aw-submit:disabled { background: #8593a4; cursor: wait; }
.aw-note { font-size: 11px; color: #8593a4; margin-top: 8px; line-height: 1.4; }
.aw-honey { position: absolute; left: -9999px; }
.aw-ok {
  padding: 18px; text-align: center; color: #0f4d41;
}
.aw-ok-icon { font-size: 38px; margin-bottom: 6px; }
.aw-ok-text { font-size: 14px; line-height: 1.5; }
.aw-err {
  background: #fdecec; color: #b00020; padding: 10px 14px;
  border-radius: 8px; margin: 10px 14px; font-size: 12.5px; text-align: center;
}

@media (max-width: 480px) {
  .aw-panel { right: 8px; left: 8px; width: auto; bottom: 80px; max-height: calc(100vh - 100px); }
  .aw-btn { right: 12px; bottom: 12px; width: 52px; height: 52px; }
}
