/* ============================================
   AI INPUT STYLES — css/pages/ai-input.css
   Quick Post input, confirmation modal,
   AI-detected filter chip.
   ============================================ */

/* ---- Hero AI Search Box ---- */
.ai-search-box {
  background: var(--white);
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.08);
  border: 1px solid var(--border-mid);
  max-width: 720px;
  margin: 0 auto;
  transition: box-shadow 0.2s ease;
}
.ai-search-box:focus-within {
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  border-color: #fed7aa;
}

.ai-search-row {
  display: flex;
  align-items: center;
  gap: 0;
}

.ai-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  flex: 1;
  min-width: 0;
}
.ai-input-group .hero-input-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--primary);
  opacity: 0.8;
}
.ai-input-group input {
  flex: 1;
  border: none;
  padding: 8px 0;
  font-size: 1.05rem;
  outline: none;
  font-family: inherit;
  min-width: 0;
  background: transparent;
  color: var(--foreground);
}
.ai-input-group input::placeholder {
  color: var(--muted-light);
  font-weight: 400;
}

.ai-btn-group {
  display: flex;
  gap: 6px;
  padding: 6px;
  flex-shrink: 0;
}

.hero-post-btn {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  line-height: 1;
}
.hero-post-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,122,0,0.3);
}
.hero-post-btn:active {
  transform: translateY(0);
}
.hero-post-btn svg {
  width: 16px;
  height: 16px;
}

.ai-input-hint {
  text-align: center;
  font-size: 0.76rem;
  color: var(--muted);
  padding: 6px 16px 2px;
  opacity: 0.7;
  line-height: 1.4;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .ai-search-row {
    flex-wrap: wrap;
  }
  .ai-input-group {
    flex: 1 1 100%;
    border-bottom: 1px solid var(--border);
    padding: 10px 14px;
  }
  .ai-btn-group {
    flex: 1 1 100%;
    padding: 6px;
    gap: 6px;
  }
  .ai-btn-group .hero-post-btn {
    flex: 1;
    justify-content: center;
    padding: 12px 16px;
  }
}

@media (max-width: 480px) {
  .ai-input-group input {
    font-size: 0.95rem;
  }
  .ai-input-hint {
    font-size: 0.7rem;
    padding: 4px 12px 0;
  }
}

/* ---- Confirmation Modal ---- */
.ai-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: aiFadeIn 0.2s ease;
}
@keyframes aiFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ai-confirm-card {
  background: var(--white);
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  position: relative;
  padding: 32px;
  animation: aiSlideUp 0.25s ease;
}
@keyframes aiSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.ai-confirm-header {
  text-align: center;
  margin-bottom: 24px;
}
.ai-confirm-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--foreground);
  margin: 12px 0 6px;
}
.ai-confirm-subtitle {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.ai-confirm-icon {
  width: 48px;
  height: 48px;
  background: var(--warm-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: var(--primary);
}

.ai-confirm-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.ai-confirm-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.ai-confirm-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.ai-confirm-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--foreground);
}
.ai-confirm-field-preview {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.ai-confirm-title-preview {
  font-size: 0.95rem;
  color: var(--primary);
}

.ai-confirm-actions {
  display: flex;
  gap: 10px;
}
.ai-confirm-proceed {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ai-confirm-edit {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ai-confirm-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 6px;
  transition: background 0.15s;
}
.ai-confirm-close:hover {
  background: #f3f4f6;
  color: var(--foreground);
}

@media (max-width: 480px) {
  .ai-confirm-card {
    padding: 24px 18px;
  }
  .ai-confirm-actions {
    flex-direction: column;
  }
}

/* ---- AI-Detected Filter Chip (search page) ---- */
.filter-chip-ai {
  background: linear-gradient(135deg, #f0f9ff, #eff6ff);
  border-color: #93c5fd;
  color: #1d4ed8;
  cursor: default;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  border: 1px solid #93c5fd;
  margin-right: 4px;
}
.filter-chip-ai svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
