.helpybot-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(49, 62, 255, .14);
  background: linear-gradient(180deg, #ffffff 0%, #f7f8ff 100%);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(22, 28, 45, .06);
}

.helpybot-panel__text {
  min-width: 0;
  display: grid;
  gap: 4px;
  color: #172033;
}

.helpybot-panel__text strong {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 800;
}

.helpybot-panel__text span {
  font-size: 13px;
  line-height: 1.35;
  color: #667085;
}

.helpybot-panel__button,
.helpybot-btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.helpybot-panel__button {
  padding: 12px 15px;
  color: #ffffff;
  background: #6f2dbd;
  box-shadow: 0 10px 20px rgba(49, 62, 255, .22);
}

.helpybot-panel__button:hover,
.helpybot-btn:hover {
  transform: translateY(-1px);
}

.helpybot-project-location-field {
  margin-bottom: 16px;
}

.helpybot-project-location-help {
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #667085;
}

.helpybot-input-warning {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .10) !important;
}

.helpybot-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
}

.helpybot-modal.is-open {
  display: block;
}

.helpybot-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 32, .52);
  backdrop-filter: blur(3px);
}

.helpybot-modal__dialog {
  position: relative;
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  margin: 16px auto;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

.helpybot-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 14px;
  border-bottom: 1px solid #eef0f4;
}

.helpybot-modal__head h3 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.15;
  color: #172033;
}

.helpybot-modal__head p {
  margin: 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.45;
}

.helpybot-modal__x {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: #6f2dbd;
  color: #ffffff !important;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.helpybot-modal__x:hover,
.helpybot-modal__x:focus {
  background: #5f24a8;
  color: #ffffff !important;
}

.helpybot-modal__body {
  padding: 18px 24px 4px;
}

.helpybot-brief-label {
  display: block;
  margin: 0 0 8px;
  color: #172033;
  font-size: 14px;
  font-weight: 800;
}

.helpybot-brief,
.helpybot-result-field textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #dde2eb;
  border-radius: 14px;
  background: #ffffff;
  color: #172033;
  font-size: 15px;
  line-height: 1.45;
  padding: 12px 14px;
  resize: vertical;
  outline: none;
}

.helpybot-brief:focus,
.helpybot-result-field textarea:focus {
  border-color: rgba(49, 62, 255, .55);
  box-shadow: 0 0 0 4px rgba(49, 62, 255, .08);
}

.helpybot-brief-meta {
  text-align: right;
  margin: 6px 2px 0;
  color: #8a94a6;
  font-size: 12px;
}

.helpybot-error {
  margin: 12px 0 0;
  padding: 11px 13px;
  border-radius: 12px;
  background: #fff1f0;
  color: #a8071a;
  border: 1px solid #ffccc7;
  font-size: 14px;
  font-weight: 700;
}

.helpybot-result {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid #eef0f4;
}

.helpybot-result__head,
.helpybot-result-field__top,
.helpybot-modal__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.helpybot-result__head {
  margin-bottom: 14px;
}

.helpybot-result__head strong {
  color: #172033;
  font-size: 16px;
}

.helpybot-result-field {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.helpybot-result-field__top label {
  color: #172033;
  font-size: 14px;
  font-weight: 800;
}

.helpybot-result-field__top label span {
  color: #8a94a6;
  font-size: 12px;
  font-weight: 700;
}

.helpybot-suggestions {
  display: grid;
  gap: 8px;
  margin: 16px 0 6px;
  padding: 14px 15px;
  border-radius: 16px;
  background: #f7f8fb;
  border: 1px solid #edf0f5;
  color: #293043;
  font-size: 14px;
  line-height: 1.45;
}

.helpybot-suggestions strong {
  color: #172033;
}

.helpybot-suggestions ul {
  margin: 0 0 4px 18px;
  padding: 0;
}

.helpybot-modal__actions {
  position: sticky;
  bottom: 0;
  padding: 16px 24px 22px;
  border-top: 1px solid #eef0f4;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(4px);
}

.helpybot-modal__action-main {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.helpybot-btn {
  padding: 12px 16px;
}

.helpybot-btn--small {
  padding: 9px 12px;
  font-size: 13px;
}

.helpybot-btn--primary {
  color: #ffffff;
  background: #313eff;
  box-shadow: 0 10px 20px rgba(49, 62, 255, .2);
}

.helpybot-btn--ghost {
  color: #293043;
  background: #f2f4f8;
}

.helpybot-btn[disabled] {
  cursor: wait;
  opacity: .72;
  transform: none;
}

@media (max-width: 640px) {
  .helpybot-panel {
    align-items: stretch;
    flex-direction: column;
    border-radius: 16px;
  }

  .helpybot-panel__button {
    width: 100%;
  }

  .helpybot-modal__dialog {
    width: calc(100vw - 20px);
    margin: 10px auto;
    border-radius: 20px;
  }

  .helpybot-modal__head,
  .helpybot-modal__body,
  .helpybot-modal__actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  .helpybot-result-field__top,
  .helpybot-result__head,
  .helpybot-modal__actions,
  .helpybot-modal__action-main {
    align-items: stretch;
    flex-direction: column;
  }

  .helpybot-modal__action-main {
    width: 100%;
  }

  .helpybot-btn {
    width: 100%;
  }
}

.helpybot-ai-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.helpybot-ai-summary span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 10px;
  border: 1px solid rgba(49, 62, 255, .12);
  border-radius: 999px;
  background: #f7f8ff;
  color: #344054;
  font-size: 12px;
  line-height: 1.2;
}

.helpybot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0 12px;
}

.helpybot-tags span {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #344054;
  font-size: 12px;
  line-height: 1.2;
}

.helpybot-checklist {
  list-style: none !important;
  padding-left: 0 !important;
}

.helpybot-checklist li {
  position: relative;
  padding-left: 24px;
}

.helpybot-checklist li::before {
  content: "□";
  position: absolute;
  left: 0;
  top: 0;
  color: #667085;
}

.helpybot-applied-notice {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(22, 163, 74, .18);
  background: #f0fdf4;
  color: #166534;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.35;
}

/* 0.2.5: cleaner client-facing project AI output */
.helpybot-ai-summary--public {
  margin-bottom: 14px;
}

.helpybot-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.helpybot-detail-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e2e7f0;
  color: #293043;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
}

.helpybot-questions {
  margin-top: 8px;
}

.helpybot-questions summary {
  cursor: pointer;
  color: #344054;
  font-weight: 800;
  font-size: 13px;
}

.helpybot-questions ul {
  margin-top: 8px;
}

/* 0.2.6: project assistant polish */
.helpybot-project-form-notice {
  margin: -6px 0 16px;
  padding: 11px 13px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}

.helpybot-project-form-notice.is-success {
  border: 1px solid rgba(22, 163, 74, .18);
  background: #f0fdf4;
  color: #166534;
}

.helpybot-project-form-notice.is-warning {
  border: 1px solid rgba(245, 158, 11, .24);
  background: #fffbeb;
  color: #92400e;
}

.helpybot-input-attention {
  animation: helpybotPulseInput 1.2s ease 0s 2;
}

@keyframes helpybotPulseInput {
  0%, 100% { box-shadow: 0 0 0 4px rgba(245, 158, 11, .10); }
  50% { box-shadow: 0 0 0 7px rgba(245, 158, 11, .18); }
}

.helpybot-questions summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 6px 0;
  color: #313eff;
}

.helpybot-questions[open] summary {
  color: #293043;
}

/* Fix Apply all button contrast in HelpyBot modal */
.helpybot-modal .helpybot-btn[data-helpybot-apply-all] {
  background: #f2f4f8 !important;
  color: #293043 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.helpybot-modal .helpybot-btn[data-helpybot-apply-all]:hover,
.helpybot-modal .helpybot-btn[data-helpybot-apply-all]:focus {
  background: #e8ecf3 !important;
  color: #172033 !important;
  box-shadow: none !important;
}

/* 0.3.0: Project-view Find Pros choice + recommendations */
.helpybot-finder-modal__dialog {
  width: min(680px, calc(100vw - 28px));
}

.helpybot-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: 18px;
}

.helpybot-choice-card {
  appearance: none;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  width: 100%;
  min-height: 132px;
  padding: 18px;
  border: 1px solid rgba(49, 62, 255, .16);
  border-radius: 20px;
  background: #ffffff;
  color: #172033;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(22, 28, 45, .06);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.helpybot-choice-card:hover,
.helpybot-choice-card:focus {
  transform: translateY(-1px);
  border-color: rgba(49, 62, 255, .36);
  background: #fafbff;
  box-shadow: 0 14px 34px rgba(22, 28, 45, .10);
  outline: none;
}

.helpybot-choice-card__icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #f4f1ff;
  color: #6f2dbd;
  font-size: 18px;
  font-weight: 900;
}

.helpybot-choice-card__body {
  display: grid;
  gap: 7px;
}

.helpybot-choice-card__body strong {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 900;
}

.helpybot-choice-card__body small {
  color: #667085;
  font-size: 13px;
  line-height: 1.4;
}

.helpybot-recommendations-card {
  margin-top: 20px;
}

.helpybot-recommendations-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.helpybot-recommendations-head p {
  margin: 6px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.45;
}

.helpybot-recommendations-search {
  flex: 0 0 auto;
  padding: 11px 14px;
}

.helpybot-recommendations-notice {
  margin: 0 0 14px;
  padding: 11px 13px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
}

.helpybot-recommendations-notice.is-success {
  border: 1px solid rgba(22, 163, 74, .18);
  background: #f0fdf4;
  color: #166534;
}

.helpybot-recommendations-notice.is-warning {
  border: 1px solid rgba(49, 62, 255, .14);
  background: #f7f8ff;
  color: #344054;
}

.helpybot-recommendations-notice.is-error {
  border: 1px solid #ffccc7;
  background: #fff1f0;
  color: #a8071a;
}

.helpybot-inline-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: #313eff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  padding: 0 0 0 4px;
  text-decoration: underline;
}

.helpybot-recommendations-loading {
  padding: 16px;
  border: 1px dashed #d9deea;
  border-radius: 16px;
  color: #667085;
  background: #fafbff;
  font-size: 14px;
  font-weight: 700;
}

.helpybot-recommendations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.helpybot-pro-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #e6eaf2;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(22, 28, 45, .05);
}

.helpybot-pro-card.is-invited {
  border-color: rgba(22, 163, 74, .24);
  background: #fbfffc;
}

.helpybot-pro-card h4 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 900;
}

.helpybot-pro-card h4 a {
  color: #172033;
  text-decoration: none;
}

.helpybot-pro-card h4 a:hover,
.helpybot-pro-card h4 a:focus {
  color: #313eff;
}

.helpybot-pro-card__meta {
  margin-bottom: 8px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.helpybot-pro-card__summary {
  margin: 0 0 10px;
  color: #344054;
  font-size: 13px;
  line-height: 1.45;
}

.helpybot-pro-card__reason {
  padding: 10px 11px;
  border-radius: 13px;
  background: #f7f8ff;
  color: #344054;
  font-size: 12.5px;
  line-height: 1.4;
}

.helpybot-pro-card__reason strong {
  color: #172033;
}

.helpybot-pro-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.helpybot-pro-card__actions .helpybot-btn {
  padding: 10px 13px;
  font-size: 13px;
}

.helpybot-pro-card__actions .helpybot-btn[disabled] {
  cursor: default;
  opacity: .72;
  transform: none;
}

.helpybot-btn--primary {
  background: #313eff;
  color: #ffffff !important;
}

.helpybot-btn--ghost {
  background: #f2f4f8;
  color: #293043 !important;
  text-decoration: none !important;
}

@media (max-width: 767px) {
  .helpybot-choice-grid,
  .helpybot-recommendations-grid {
    grid-template-columns: 1fr;
  }

  .helpybot-recommendations-head {
    display: grid;
  }

  .helpybot-recommendations-search,
  .helpybot-pro-card__actions .helpybot-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .helpybot-pro-card__actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.helpybot-ai-search-host {
  position: relative;
}

.helpybot-ai-search-host input.helpybot-ai-search-input-has-chip {
  padding-right: 72px !important;
}

.helpybot-ai-search-chip {
  display: none;
  position: absolute;
  right: 10px;
  top: 50%;
  z-index: 4;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(111, 44, 214, .18);
  border-radius: 999px;
  background: rgba(111, 44, 214, .08);
  color: #6f2cd6;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transform: translateY(-50%);
  box-shadow: none;
}

.helpybot-ai-search-chip.is-visible {
  display: inline-flex;
}

.helpybot-ai-search-chip:hover {
  background: rgba(111, 44, 214, .12);
  border-color: rgba(111, 44, 214, .28);
}

.helpybot-ai-search-chip.is-active {
  background: rgba(111, 44, 214, .11);
  border-color: rgba(111, 44, 214, .22);
  color: #6f2cd6;
}

.helpybot-ai-search-chip.is-off {
  background: #f4f5f7;
  border-color: #e4e7ec;
  color: #667085;
}

.helpybot-ai-search-chip[disabled],
.helpybot-ai-search-chip.is-loading {
  cursor: wait;
  opacity: .72;
}

@media (max-width: 767px) {
  .helpybot-ai-search-host input.helpybot-ai-search-input-has-chip {
    padding-right: 64px !important;
  }

  .helpybot-ai-search-chip {
    right: 8px;
    min-height: 26px;
    padding: 5px 8px;
    font-size: 11px;
  }
}
/* AI chip wrapper */
.helpybot-ai-search-chip-wrap {
  position: relative;
}

/* desktop can stay as is; just keep some room */
.helpybot-ai-search-input-has-chip {
  padding-right: 84px;
}
/* Helpy AI search chip: mobile compact emoji mode */
.helpybot-ai-search-host {
  position: relative;
}

/* Keep desktop behavior unchanged */
@media (min-width: 768px) {
  .helpybot-ai-search-host .helpybot-ai-search-input-has-chip {
    padding-right: 84px !important;
  }
}

/* Mobile: move AI chip to top-right corner and show emoji only */
@media (max-width: 767px) {
  .helpybot-ai-search-host .helpybot-ai-search-chip {
    position: absolute !important;
    top: 18px;
    right: 5px;
    z-index: 5;

    width: 22px;
    height: 22px;
    min-width: 22px;
    padding: 0 !important;
    margin: 0 !important;

    display: none;
    align-items: center;
    justify-content: center;

    border: 0 !important;
    border-radius: 999px;
    background: transparent !important;
    box-shadow: none !important;

    font-size: 0 !important;
    line-height: 1 !important;
    color: transparent !important;
  }

  .helpybot-ai-search-host .helpybot-ai-search-chip.is-visible {
    display: flex !important;
  }

  .helpybot-ai-search-host .helpybot-ai-search-chip::before {
    content: "✨";
    font-size: 14px;
    line-height: 1;
    color: #6f2cd6;
  }

  .helpybot-ai-search-host .helpybot-ai-search-chip.is-off::before {
    opacity: 0.35;
  }

  .helpybot-ai-search-host .helpybot-ai-search-chip.is-loading::before {
    content: "…";
    font-size: 14px;
    font-weight: 700;
  }

  .helpybot-ai-search-host .helpybot-ai-search-input-has-chip {
    padding-right: 36px !important;
  }
}
