@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&family=Spectral:wght@400;600&display=swap');

.listing-rewriter {
  --lr-ink: #1a1a1a;
  --lr-muted: #555b63;
  --lr-accent: #d97a2b;
  --lr-accent-dark: #b85f15;
  --lr-bg: #f6f4f0;
  --lr-card: #ffffff;
  --lr-border: #e6e0d9;
  --lr-shadow: 0 18px 35px rgba(24, 18, 12, 0.15);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  color: var(--lr-ink);
  padding: 32px 18px 48px;
}

.listing-rewriter .lr-card {
  max-width: 900px;
  margin: 0 auto 28px;
  background: var(--lr-card);
  border-radius: 18px;
  box-shadow: var(--lr-shadow);
  padding: 28px;
  border: 1px solid var(--lr-border);
}

.listing-rewriter h2 {
  font-family: 'Spectral', serif;
  font-size: 30px;
  margin: 0 0 8px;
}

.listing-rewriter .lr-subtitle {
  color: var(--lr-muted);
  margin: 0 0 20px;
}

.listing-rewriter .lr-label {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  color: var(--lr-muted);
}

.listing-rewriter .lr-textarea,
.listing-rewriter .lr-input,
.listing-rewriter .lr-select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--lr-border);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  background: #fbfaf8;
}

.listing-rewriter .lr-textarea {
  resize: vertical;
}

.listing-rewriter .lr-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin: 18px 0 20px;
}

.listing-rewriter .lr-button {
  background: var(--lr-accent);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 10px 20px rgba(217, 122, 43, 0.25);
}

.listing-rewriter .lr-button:hover {
  background: var(--lr-accent-dark);
  transform: translateY(-1px);
}

.listing-rewriter .lr-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.listing-rewriter .lr-status {
  margin-top: 12px;
  color: var(--lr-muted);
}

.listing-rewriter .lr-status.is-error {
  color: #b63b31;
}

.listing-rewriter .lr-results {
  max-width: 980px;
  margin: 0 auto;
  animation: lrFadeIn 0.4s ease;
}

.listing-rewriter .lr-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.listing-rewriter .lr-tab {
  border: 1px solid var(--lr-border);
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.listing-rewriter .lr-tab.is-active {
  background: var(--lr-ink);
  color: #fff;
}

.listing-rewriter .lr-output-panel {
  display: none;
  background: #fff;
  border: 1px solid var(--lr-border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 12px;
}

.listing-rewriter .lr-output-panel.is-active {
  display: block;
}

.listing-rewriter .lr-output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.listing-rewriter .lr-output-header h3 {
  margin: 0;
  font-size: 18px;
}

.listing-rewriter .lr-copy {
  border: 1px solid var(--lr-border);
  background: #fefcf8;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}

.listing-rewriter .lr-output {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

.listing-rewriter .lr-output p {
  margin: 0 0 12px;
}

.listing-rewriter .lr-output p:last-child {
  margin-bottom: 0;
}

.listing-rewriter .lr-output a {
  color: var(--lr-accent-dark);
}

.listing-rewriter .lr-output strong {
  font-weight: 600;
}

.listing-rewriter .lr-note {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--lr-muted);
}

.listing-rewriter .lr-compliance {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 4px solid #e0a158;
  background: #fff8ef;
  border-radius: 10px;
  font-size: 13px;
}

.listing-rewriter .lr-compliance-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.listing-rewriter .lr-compliance-label {
  margin-top: 6px;
  font-weight: 600;
}

.listing-rewriter .lr-compliance ul {
  margin: 6px 0 0 18px;
}

.listing-rewriter .lr-optin {
  margin-top: 28px;
  background: #fffaf3;
  border: 1px dashed #e0a158;
  border-radius: 16px;
  padding: 18px;
}

.listing-rewriter .lr-optin h4 {
  margin: 0 0 6px;
  font-size: 18px;
}

.listing-rewriter .lr-optin-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.listing-rewriter .lr-optin-row input {
  flex: 1 1 220px;
  border-radius: 999px;
  border: 1px solid var(--lr-border);
  padding: 10px 14px;
  font-family: inherit;
}

.listing-rewriter .lr-optin-row button {
  border-radius: 999px;
  border: none;
  background: var(--lr-ink);
  color: #fff;
  padding: 10px 18px;
  cursor: pointer;
}

.listing-rewriter .lr-optin-status {
  margin-top: 8px;
  color: var(--lr-muted);
}

@keyframes lrFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .listing-rewriter {
    padding: 24px 12px 36px;
  }

  .listing-rewriter .lr-card {
    padding: 20px;
  }

  .listing-rewriter .lr-tabs {
    flex-direction: column;
    align-items: stretch;
  }
}
