/* Lucas Lawn — Starter AI widget + form status */

.lh-widget {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  font-family: var(--font-body);
}

.lh-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: var(--green);
  color: var(--white);
  font: inherit;
  font-weight: 650;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 160ms ease, transform 160ms ease;
}

.lh-toggle:hover {
  background: var(--green-deep);
  transform: translateY(-1px);
}

.lh-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-weight: 700;
  font-size: 0.82rem;
}

.lh-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.65rem);
  width: min(340px, calc(100vw - 2rem));
  max-height: min(420px, 70vh);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* The [hidden] attribute only carries the UA default `display: none`, which the
   `display: flex` above outranks — so the close button set the flag and the
   panel stayed on screen. This makes hidden actually hide. */
.lh-panel[hidden] {
  display: none;
}

.lh-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(42, 90, 58, 0.06);
}

.lh-panel-head strong {
  font-family: var(--font-brand);
  font-size: 0.92rem;
  color: var(--green-deep);
}

.lh-close {
  border: 0;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0.15rem 0.35rem;
}

.lh-panel-lede {
  margin: 0;
  padding: 0.65rem 1rem 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.lh-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
}

.lh-chip {
  border: 1px solid rgba(42, 90, 58, 0.25);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: rgba(42, 90, 58, 0.06);
  color: var(--green-deep);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.lh-chip:hover {
  background: rgba(42, 90, 58, 0.12);
}

.lh-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0 1rem;
  min-height: 4rem;
  max-height: 12rem;
}

.lh-msg {
  margin-bottom: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.75rem;
  font-size: 0.84rem;
  line-height: 1.4;
}

.lh-msg-user {
  margin-left: 1.5rem;
  background: rgba(42, 90, 58, 0.1);
  color: var(--ink);
}

.lh-msg-bot {
  margin-right: 1rem;
  background: var(--char);
  color: rgba(255, 255, 255, 0.92);
}

.lh-form {
  display: flex;
  gap: 0.45rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--line);
}

.lh-form input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.84rem;
}

.lh-send {
  border: 0;
  border-radius: 0.65rem;
  padding: 0.55rem 0.75rem;
  background: var(--green);
  color: var(--white);
  font: inherit;
  font-weight: 650;
  font-size: 0.82rem;
  cursor: pointer;
}

.lh-send:hover {
  background: var(--green-deep);
}

.form-note-pending {
  color: var(--muted);
}

.form-note-success {
  color: var(--green-deep);
  font-weight: 600;
}

.form-note-error {
  color: #8b2e2e;
}

/* Review tool page */
.tool-banner {
  padding: 0.65rem 0;
  background: linear-gradient(135deg, var(--green-deep), var(--green));
  color: var(--white);
  font-size: 0.86rem;
  text-align: center;
}

.tool-banner strong {
  font-family: var(--font-brand);
}

.review-tool {
  display: grid;
  gap: 1.25rem;
}

.review-tool textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.85rem;
  font: inherit;
  resize: vertical;
}

.draft-card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.8);
}

.draft-card p {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

.draft-card .btn-copy {
  font-size: 0.82rem;
  padding: 0.55rem 0.9rem;
}

.draft-tone {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--leaf);
}

@media (max-width: 480px) {
  .lh-toggle-label {
    display: none;
  }

  .lh-toggle {
    width: 3rem;
    height: 3rem;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
}
