/* ── Contact form ── */
.contact-form {
  max-width: 560px;
  margin: 1.5rem 0 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 1.05rem;
  font-family: inherit;
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.7rem 1.75rem;
  font-size: 1.05rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.85;
}

/* ── Newsletter Section ── */
.section-newsletter {
  background: var(--bg-alt);
}

.newsletter-wrap {
  max-width: 560px;
  margin: 2.5rem auto 0;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.newsletter-row {
  display: flex;
  width: 100%;
  gap: 0.75rem;
}

.newsletter-row input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s;
}

.newsletter-row input[type="email"]:focus {
  outline: none;
  border-color: var(--primary);
}

.newsletter-row .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.newsletter-confirm {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: #4caf50;
  text-align: center;
}

.newsletter-confirm.is-error {
  color: #f44336;
}

@media (max-width: 480px) {
  .newsletter-row {
    flex-direction: column;
  }
}


/* ── Contact Section (Chat Style) ── */
.section-contact {
  min-height: auto;
  padding: 4rem 2rem;
}

.section-contact .section-title {
  margin-bottom: 1rem;
}

.section-contact .section-desc {
  margin-bottom: 2.5rem;
}

.chat-container {
  max-width: 680px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
}

/* Dark canvas area at top — always visible */
.chat-canvas-area {
  background: #0a0a0c;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  overflow: hidden;
}

.chat-canvas-area.chat-canvas-thinking canvas {
  animation: none; /* speed override handled in JS */
}

.chat-canvas-area canvas {
  max-width: 120px;
  max-height: 120px;
}

/* Messages area */
.chat-messages {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 360px;
  overflow-y: auto;
}

.chat-bubble {
  max-width: 85%;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  font-size: 1rem;
  line-height: 1.5;
  animation: chatFadeIn 0.3s ease-out;
}

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

.chat-bubble-bot {
  align-self: flex-start;
  background: rgba(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.15);
  color: var(--text);
  text-align: left;
}

.chat-bubble-user {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
}

[data-theme="light"] .chat-bubble-user {
  background: rgba(0, 0, 0, 0.04);
}

.chat-author {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.chat-bubble p {
  margin: 0;
}

.chat-bubble a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.chat-bubble a:hover {
  text-decoration: underline;
}

/* Action buttons */
.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1.25rem 1.25rem;
}

.chat-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(var(--primary-rgb), 0.08);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.chat-action:hover {
  background: rgba(var(--primary-rgb), 0.18);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.chat-action svg {
  width: 15px;
  height: 15px;
  color: var(--primary);
  flex-shrink: 0;
}

[data-theme="light"] .chat-action {
  background: rgba(var(--primary-rgb), 0.05);
}

/* Newsletter input inside chat */
.chat-newsletter-input {
  padding: 0 1.25rem 1.25rem;
  animation: chatFadeIn 0.3s ease-out;
}

.chat-newsletter-input .newsletter-row {
  display: flex;
  gap: 0.5rem;
}

.chat-newsletter-input .newsletter-row input[type="email"] {
  flex: 1;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s;
}

.chat-newsletter-input .newsletter-row input[type="email"]:focus {
  outline: none;
  border-color: var(--primary);
}

.chat-newsletter-input .btn {
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
}

/* Feedback input */
.chat-feedback-input {
  padding: 0 1.25rem 1.25rem;
  animation: chatFadeIn 0.3s ease-out;
}

.chat-feedback-form {
  display: flex;
  gap: 0.5rem;
}

.chat-input {
  flex: 1;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s;
}

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

.chat-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.chat-send-btn:hover { opacity: 0.85; }

.chat-send-btn svg {
  width: 16px;
  height: 16px;
  color: #fff;
}

/* General chat text input */
.chat-text-input {
  padding: 0 1.25rem 1.25rem;
}

.chat-text-form {
  display: flex;
  gap: 0.5rem;
}

.chat-disclaimer {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.4;
  text-align: center;
  opacity: 0.7;
}

.chat-disclaimer a {
  color: var(--primary);
  text-decoration: none;
}

.chat-disclaimer a:hover { text-decoration: underline; }

/* Chat link display */
.chat-link-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.25rem 0.75rem;
  animation: chatFadeIn 0.3s ease-out;
}

.chat-link-row a {
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  word-break: break-all;
}

.chat-link-row a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .chat-actions { flex-direction: column; }
  .chat-action { justify-content: center; }
  .chat-container { border-radius: 12px; }
}

