:root {
  --greenest-green: #11c76f;
  --greenest-dark: #06110f;
  --greenest-panel: #0d1c1a;
  --greenest-border: rgba(255, 255, 255, 0.08);
  --greenest-text: #f6fff8;
  --greenest-muted: #8ea39b;
  --greenest-assistant: rgba(255, 255, 255, 0.04);
  --greenest-user: linear-gradient(135deg, #11c76f, #06a356);
  --greenest-error: #ff6b6b;
}

[hidden] {
  display: none !important;
}

.greenest-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9998;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
}

.greenest-launcher {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: var(--greenest-green);
  color: #012714;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 28px 60px rgba(8, 109, 61, 0.45);
  transition: transform 0.2s ease;
}

.greenest-launcher.is-intro-bounce {
  animation: gw-bounce 1.2s ease;
}

.greenest-launcher.is-nudging {
  animation: gw-launcher-nudge 900ms ease-in-out;
}

@keyframes gw-bounce {
  0% {
    transform: translateY(0) scale(1);
  }
  20% {
    transform: translateY(-10px) scale(1.02);
  }
  40% {
    transform: translateY(0) scale(1);
  }
  60% {
    transform: translateY(-6px) scale(1.01);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes gw-launcher-nudge {
  0%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-6px);
  }
  55% {
    transform: translateY(0);
  }
  75% {
    transform: translateY(-3px);
  }
}

.greenest-intro-tooltip {
  position: fixed;
  right: 24px;
  bottom: 92px;
  max-width: 240px;
  padding: 10px 34px 10px 12px;
  border-radius: 14px;
  background: rgba(13, 28, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--greenest-text);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  font-size: 13px;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 240ms ease, transform 240ms ease;
  pointer-events: auto;
  z-index: 999999;
}

.greenest-intro-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.greenest-intro-tooltip::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -8px;
  width: 14px;
  height: 14px;
  background: rgba(13, 28, 26, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transform: rotate(45deg);
}

.greenest-intro-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--greenest-text);
  font-size: 14px;
  cursor: pointer;
}

.greenest-launcher svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.greenest-launcher:active {
  transform: translateY(2px);
}


.greenest-chat-panel {
  position: fixed;
  bottom: 36px;
  right: 36px;
  width: 480px;
  max-width: calc(100vw - 32px);
  height: 660px;
  max-height: calc(100vh - 64px);
  background: var(--greenest-panel);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 60px 120px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.98);
  transition: opacity 220ms ease, transform 220ms ease;
  color: var(--greenest-text);
  z-index: 9999;
  overflow: hidden;
}

.greenest-chat-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.greenest-chat-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--greenest-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.greenest-chat-header strong {
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

.greenest-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.greenest-icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--greenest-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--greenest-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.greenest-icon-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}


.greenest-close-btn {
  border-radius: 50%;
  border: 1px solid var(--greenest-border);
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  background: transparent;
  color: var(--greenest-text);
  cursor: pointer;
}

.greenest-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
  position: relative;
}

.greenest-message {
  display: flex;
}

.greenest-message.user {
  justify-content: flex-end;
}

.greenest-message.assistant {
  justify-content: flex-start;
}

.greenest-bubble {
  max-width: 90%;
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.greenest-bubble.user {
  background: var(--greenest-user);
  color: #021b13;
  border-bottom-right-radius: 6px;
}

.greenest-bubble.assistant {
  background: var(--greenest-assistant);
  color: var(--greenest-text);
  border-bottom-left-radius: 6px;
}

.greenest-bubble h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.greenest-bubble h4 {
  margin: 16px 0 6px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--greenest-muted);
}

.greenest-bubble ul,
.greenest-bubble ol {
  margin: 0;
  padding-left: 1.2rem;
}

.greenest-bubble li + li {
  margin-top: 4px;
}

.gw-fade-target {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms ease;
}

.gw-fade-out {
  opacity: 0 !important;
  transform: translateY(6px);
}

.greenest-inline-link {
  margin-top: 10px;
  background: none;
  border: none;
  color: var(--greenest-green);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.greenest-launcher,
.greenest-send-btn,
.greenest-recipes-trigger,
.greenest-icon-btn,
.greenest-recipe-card {
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease,
    border-color 160ms ease;
  will-change: transform;
}

.greenest-launcher:hover,
.greenest-send-btn:hover,
.greenest-recipes-trigger:hover,
.greenest-icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.greenest-launcher:active,
.greenest-send-btn:active,
.greenest-recipes-trigger:active,
.greenest-icon-btn:active {
  transform: translateY(0) scale(0.98);
}

.greenest-recipe-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  .greenest-launcher,
  .greenest-chat-panel,
  .greenest-recipe-drawer,
  .greenest-intro-tooltip,
  .greenest-send-btn,
  .greenest-recipes-trigger,
  .greenest-recipe-card,
  .greenest-icon-btn {
    animation: none !important;
    transition: none !important;
  }
}

.greenest-typing {
  padding: 0 24px 8px;
  font-size: 0.85rem;
  color: var(--greenest-muted);
  min-height: 24px;
}

.greenest-recipes-trigger-row {
  padding: 0 24px 10px;
  display: flex;
  justify-content: flex-end;
}

.greenest-recipes-trigger {
  border: 1px solid var(--greenest-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--greenest-text);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  cursor: pointer;
  position: relative;
  z-index: 3;
}

.greenest-recipe-drawer {
  position: absolute;
  inset: 0;
  background: #0b1715;
  border: 1px solid var(--greenest-border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.greenest-recipe-drawer.is-open {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.greenest-recipe-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
  border-bottom: 1px solid var(--greenest-border);
}

.greenest-recipes-close {
  border: none;
  background: transparent;
  color: var(--greenest-text);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 3;
}

.greenest-recipe-search-row {
  padding: 10px 16px 0;
}

.greenest-recipe-search {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--greenest-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--greenest-text);
  padding: 8px 10px;
  font-size: 0.85rem;
  outline: none;
}

.greenest-recipe-status {
  padding: 10px 16px 0;
  color: var(--greenest-muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.greenest-recipe-retry {
  border: none;
  background: none;
  color: var(--greenest-green);
  font-weight: 600;
  cursor: pointer;
}

.greenest-recipe-list {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
}

.greenest-recipe-card {
  border: 1px solid var(--greenest-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--greenest-text);
  border-radius: 16px;
  padding: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.greenest-recipe-thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
}

.greenest-recipe-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--greenest-muted);
  text-align: center;
  padding: 4px;
}

.greenest-recipe-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.greenest-recipe-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.greenest-recipe-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.greenest-recipe-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--greenest-muted);
}

.greenest-recipe-load-more {
  margin: 0 16px 16px;
  border: 1px solid var(--greenest-border);
  background: transparent;
  color: var(--greenest-text);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

.greenest-recipe-drawer-footer {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--greenest-border);
  display: flex;
  justify-content: flex-end;
}

.greenest-chip-section {
  padding: 0 24px 12px;
}

.greenest-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 160px;
  overflow: hidden;
  min-height: 40px;
  align-content: flex-start;
}

.greenest-chip-row.is-expanded {
  max-height: 220px;
  overflow-y: auto;
  padding-right: 6px;
}

.greenest-chip {
  border-radius: 999px;
  border: 1px solid var(--greenest-border);
  padding: 6px 14px;
  background: transparent;
  color: var(--greenest-text);
  font-size: 0.85rem;
  cursor: pointer;
}

.greenest-chip-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.greenest-chip-toggle {
  border: none;
  background: none;
  color: var(--greenest-green);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.greenest-chip-status {
  display: block;
  color: var(--greenest-muted);
  font-size: 0.85rem;
  margin-bottom: 6px;
  line-height: 1.3;
}

.greenest-filters {
  padding: 0 24px 10px;
  display: flex;
  gap: 16px;
  color: var(--greenest-muted);
  font-size: 0.85rem;
}

.greenest-filters label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.greenest-chat-form {
  padding: 0 24px 24px;
}

.greenest-powered-by {
  padding: 0 24px 18px;
  font-size: 0.75rem;
  text-align: center;
  color: var(--greenest-muted);
}

.greenest-powered-by a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.greenest-powered-by a:hover {
  color: var(--greenest-text);
  border-bottom-color: var(--greenest-text);
}

.greenest-textarea {
  width: 100%;
  min-height: 90px;
  border-radius: 18px;
  border: 1px solid var(--greenest-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--greenest-text);
  padding: 14px;
  resize: vertical;
  font: inherit;
  outline: none;
}

.greenest-input-row {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.greenest-textarea-wrap {
  flex: 1;
}

.greenest-send-btn {
  flex-shrink: 0;
  border: none;
  border-radius: 14px;
  padding: 0 24px;
  background: var(--greenest-green);
  color: #012714;
  font-weight: 600;
  cursor: pointer;
  height: 48px;
}

.greenest-send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.greenest-error {
  color: var(--greenest-error);
  font-size: 0.85rem;
  padding-top: 6px;
  min-height: 18px;
}

@media (max-width: 640px) {
  .greenest-chat-panel {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    right: 10px;
    bottom: 10px;
    border-radius: 20px;
  }

}
