/* AI Design Page v2 — Specific styles */

.design-workspace {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 var(--gutter) 6rem;
}

.design-chat-window {
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  min-height: 540px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-thread {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  max-height: 70vh;
}

.chat-thread::-webkit-scrollbar {
  width: 6px;
}
.chat-thread::-webkit-scrollbar-track {
  background: var(--cream);
}
.chat-thread::-webkit-scrollbar-thumb {
  background: var(--tan);
  border-radius: 3px;
}

/* Messages */
.msg {
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
}

.msg.ai {
  align-items: flex-start;
}

.msg.user {
  align-items: flex-end;
}

.msg-bubble {
  max-width: 85%;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  line-height: 1.6;
  border-radius: 16px;
}

.msg.ai .msg-bubble {
  background: var(--cream);
  color: var(--ink);
  border-radius: 16px 16px 16px 4px;
}

.msg.user .msg-bubble {
  background: var(--ink);
  color: var(--cream-light);
  border-radius: 16px 16px 4px 16px;
}

.msg-bubble strong {
  font-weight: 600;
}

.msg-bubble em {
  font-family: var(--font-serif);
  font-style: italic;
}

.msg-meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.5rem;
  letter-spacing: 0.05em;
}

.msg-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.msg-typing span {
  width: 6px;
  height: 6px;
  background: var(--muted);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.msg-typing span:nth-child(2) { animation-delay: 0.2s; }
.msg-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* Quick options */
.quick-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  max-width: 85%;
}

.quick-opt {
  padding: 0.6rem 1.1rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.quick-opt:hover {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

/* Design cards (3 options in chat) */
.design-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
  max-width: 100%;
}

.design-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.design-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(44, 40, 38, 0.08);
}

.design-card.selected {
  border-color: var(--accent);
  border-width: 2px;
  background: var(--cream-light);
}

.design-card-viz {
  aspect-ratio: 1;
  position: relative;
  background: radial-gradient(circle, var(--cream-light), white);
  border-radius: 50%;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
}

.design-card-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.design-card-spec {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  min-height: 2.4em;
}

.design-card-price {
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 500;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

/* Design viz beads (smaller version of DIY beads) */
.viz-bead {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 3px rgba(44, 40, 38, 0.15), inset -2px -2px 3px rgba(0,0,0,0.15), inset 2px 2px 3px rgba(255,255,255,0.4);
}

.viz-bead.spacer {
  width: 12px;
  height: 12px;
}

/* Designer note in expanded design */
.design-expand {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--cream);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
}

.design-expand-label {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.design-expand-note {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
}

.design-expand-sig {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--accent);
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.design-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.design-actions .btn {
  font-size: 0.8rem;
  padding: 0.7rem 1.2rem;
}

/* Input area */
.chat-input-area {
  border-top: 1px solid var(--line);
  padding: 1.25rem 1.5rem;
  background: var(--cream-light);
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  background: white;
  border-radius: 22px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--ink);
  resize: none;
  line-height: 1.4;
  transition: border 0.2s ease;
}

.chat-input:focus {
  outline: none;
  border-color: var(--ink);
}

.chat-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chat-send:hover:not(:disabled) {
  background: var(--accent);
}

.chat-send:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Side panel: state we've gathered */
.design-state-panel {
  background: var(--cream);
  padding: 1.5rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.design-state-panel h4 {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.state-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.state-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 0.8rem;
  color: var(--ink);
}

.state-tag-remove {
  cursor: pointer;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
}

.state-empty {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

/* Disclaimer banner */
.chat-disclaimer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
  .design-cards {
    grid-template-columns: 1fr;
  }
  .chat-thread {
    padding: 1.25rem;
  }
  .msg-bubble {
    max-width: 92%;
  }
}
