/* === AI Designer page styles - extends site.css === */

.ai-hero-badge {
  display: inline-block;
  background: rgba(214, 31, 38, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}

.ai-hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.ai-hero-stats > div {
  display: flex;
  flex-direction: column;
}
.ai-hero-stats strong {
  font-size: 1.8rem;
  color: #fff;
  font-weight: 800;
}
.ai-hero-stats span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

/* === Card === */
.ai-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  max-width: 760px;
  margin: 0 auto;
}

.ai-step-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.ai-step-title {
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
  color: var(--charcoal);
  line-height: 1.25;
}
.ai-step-sub {
  color: var(--muted);
  margin: 0 0 1.5rem;
  font-size: 0.96rem;
}

/* === Dropzone === */
.ai-dropzone {
  border: 2px dashed var(--line);
  border-radius: 14px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg);
  margin-bottom: 1.5rem;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-dropzone:hover { border-color: var(--primary); background: rgba(214, 31, 38, 0.04); }
.ai-dropzone.dragover { border-color: var(--primary); background: rgba(214, 31, 38, 0.08); }
.ai-dropzone.has-image {
  padding: 0.5rem;
  border-style: solid;
  border-color: var(--primary);
  background: var(--card);
}
.dropzone-content { color: var(--muted); }
.dropzone-content svg { color: var(--muted); margin-bottom: 0.75rem; }
.dropzone-headline { margin: 0 0 1rem; font-weight: 600; color: var(--charcoal); }

#previewImage {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}
.ai-clear-photo {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-clear-photo:hover { background: rgba(214, 31, 38, 0.9); }

/* === Forms === */
.ai-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.ai-form-grid > .ai-full { grid-column: 1 / -1; }
@media (max-width: 600px) {
  .ai-form-grid { grid-template-columns: 1fr; }
}

.ai-label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--charcoal);
  margin-bottom: 6px;
}
.ai-label-hint {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 8px;
}

.ai-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--charcoal);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}
.ai-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(214, 31, 38, 0.12);
}
.ai-textarea { resize: vertical; min-height: 80px; }

/* === Style Grid === */
.ai-style-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin: 0.5rem 0 1.5rem;
}
@media (max-width: 600px) {
  .ai-style-grid { grid-template-columns: repeat(2, 1fr); }
}
.ai-style-card {
  position: relative;
  padding: 0.9rem 0.6rem;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}
.ai-style-card:hover { border-color: var(--muted); transform: translateY(-1px); }
.ai-style-card.selected {
  border-color: var(--primary);
  background: rgba(214, 31, 38, 0.05);
}
.ai-style-card.disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.ai-style-name { font-weight: 700; font-size: 0.86rem; color: var(--charcoal); }
.ai-style-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.ai-style-badge.trending { background: #131313; }

/* === CTA === */
.ai-cta-row {
  margin-top: 1.5rem;
  text-align: center;
}
.ai-cta {
  font-size: 1.05rem;
  padding: 1.1rem 2rem;
  width: 100%;
  max-width: 460px;
}
.ai-cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--muted);
  box-shadow: none;
}
.ai-trust {
  margin-top: 0.85rem;
  text-align: center;
  font-size: 0.84rem;
  color: var(--muted);
}

/* === Modal === */
.ai-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}
.ai-modal.is-open { display: flex; }
.ai-modal-content {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 540px;
  width: 100%;
  position: relative;
  max-height: 92vh;
  overflow-y: auto;
}
.ai-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  color: var(--charcoal);
  font-size: 22px;
  cursor: pointer;
  padding: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-modal-close:hover { background: var(--line); color: var(--primary); }

.ai-form-error {
  background: rgba(214, 31, 38, 0.08);
  border: 1px solid rgba(214, 31, 38, 0.3);
  color: var(--primary-dark);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

/* === Loading === */
.ai-progress-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}
.ai-progress-card {
  background: var(--bg);
  border-radius: 12px;
  padding: 1rem 1.2rem;
}
.ai-progress-label {
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 8px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-progress-label.done::before { content: '✓'; color: var(--success); font-weight: 800; }
.ai-progress-bar {
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.ai-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  width: 0%;
  transition: width 0.5s ease;
}

.ai-loading-dot::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  margin-left: 6px;
  animation: aiPulse 1.2s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes aiPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* === Social Proof === */
.ai-social-proof {
  margin-top: 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 0.92rem;
  color: var(--slate);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.ai-social-proof.visible {
  opacity: 1;
  transform: translateY(0);
}
.ai-social-proof::before {
  content: '✓';
  background: var(--success);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

/* === Before / After Toggle === */
.ba-toggle {
  display: none;            /* default hidden, JS shows it once render is ready */
  background: #f5f6f8;
  border-radius: 999px;
  padding: 4px;
  margin: 0 auto 1rem;
  max-width: 280px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}
.ba-toggle.is-active { display: flex; }
.ba-tab {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: transparent;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #667085;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  letter-spacing: 0.02em;
}
.ba-tab:hover { color: #131313; }
.ba-tab.is-active {
  background: #131313;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}
.ba-tab.is-active[data-view="after"] {
  background: #d61f26;
  box-shadow: 0 4px 12px rgba(214,31,38,0.32);
}

.ba-image-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #f5f6f8;
  border: 1px solid #e8e8ed;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}
.ba-image {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  background: #f5f6f8;
}
.ba-label {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  padding: 6px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  pointer-events: none;
}
.ba-label.ba-label-after { background: #d61f26; }

.ba-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}

/* === Done === */
.ai-done-checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 42px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  animation: aiBounceIn 0.5s ease-out;
}
@keyframes aiBounceIn {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.ai-done-cta {
  margin-top: 2rem;
  background: var(--bg);
  border-radius: 14px;
  padding: 1.5rem;
}
.ai-done-cta h3 { margin: 0 0 0.5rem; color: var(--charcoal); }
.ai-done-cta p { margin: 0 0 1.2rem; color: var(--slate); font-size: 0.96rem; }

/* === Error === */
.ai-error-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(214, 31, 38, 0.12);
  color: var(--primary);
  font-size: 36px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

/* === Step number for "How it works" === */
.ai-step-num {
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 16px rgba(214, 31, 38, 0.25);
}
