/* public/css/app.css — App-specific styles for Focal research tool.
   Extends theme.css tokens. */

/* Research Hero */
.research-hero {
  padding: 64px 48px 48px;
  border-bottom: 1px solid var(--border);
}

.research-hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-sep {
  color: var(--border);
  font-size: 18px;
}

.nav-page {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-link:hover {
  color: var(--fg);
}

/* Form Section */
.research-form-section {
  padding: 64px 48px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.research-form-inner {
  max-width: 720px;
  margin: 0 auto;
}

.research-form .form-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.research-form input[type="text"] {
  flex: 1;
  height: 52px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--fg);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.research-form input[type="text"]::placeholder {
  color: var(--muted);
}

.research-form input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.1);
}

.btn-research {
  height: 52px;
  padding: 0 28px;
  background: var(--fg);
  color: var(--bg);
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-research:hover {
  background: #2a2a26;
}

.btn-research:active {
  transform: scale(0.98);
}

.btn-research:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Loading dots */
.btn-loading {
  display: flex;
  gap: 4px;
  align-items: center;
}

.loading-dot {
  width: 6px;
  height: 6px;
  background: var(--bg);
  border-radius: 50%;
  animation: dot-pulse 1.2s ease-in-out infinite;
}

.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-pulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

.form-hint {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* Results Section */
.results-section {
  padding: 64px 48px;
  border-bottom: 1px solid var(--border);
}

.results-inner {
  max-width: 860px;
  margin: 0 auto;
}

.results-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.results-meta .guest-label {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.results-meta .meta-tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.results-meta .meta-tag.success {
  background: rgba(39, 174, 96, 0.1);
  color: #27ae60;
}

.results-meta .meta-time {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}

/* Skeleton */
.skeleton-wrap {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.skeleton-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-line {
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--surface) 0%, var(--border) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-line.long { width: 70%; }
.skeleton-line.medium { width: 50%; }
.skeleton-line.short { width: 30%; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Error */
.error-state {
  text-align: center;
  padding: 48px;
}

.error-state p {
  color: var(--muted);
  margin-bottom: 24px;
}

.btn-retry {
  padding: 10px 24px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--fg);
  transition: border-color 0.15s;
}

.btn-retry:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Prep Document */
.prep-doc {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Section blocks within prep doc */
.prep-section {
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}

.prep-section:last-child {
  border-bottom: none;
}

.prep-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.prep-exec-summary {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.6;
  color: var(--fg);
  font-weight: 400;
}

/* Compelling Why */
.prep-compelling {
  background: var(--surface);
  border-radius: 12px;
  padding: 24px 28px;
  border-left: 3px solid var(--accent);
  margin-bottom: 4px;
}

.prep-compelling-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.prep-compelling p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg);
}

/* Angles grid */
.angles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.angle-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  transition: border-color 0.15s;
}

.angle-card:hover {
  border-color: var(--accent);
}

.angle-type {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.angle-label {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.2;
}

.angle-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.angle-hook {
  font-size: 13px;
  color: var(--fg);
  font-style: italic;
  border-left: 2px solid var(--accent-warm);
  padding-left: 12px;
  line-height: 1.5;
}

/* Questions */
.questions-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.question-item {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.question-item:last-child {
  border-bottom: none;
}

.question-num {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  margin-top: 2px;
}

.question-body {
  flex: 1;
}

.question-text {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--fg);
}

.question-context {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 6px;
}

.question-angle-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--surface);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Red Flags */
.red-flags {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.red-flag-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(192, 57, 43, 0.05);
  border: 1px solid rgba(192, 57, 43, 0.15);
  border-radius: 8px;
}

.red-flag-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--red);
}

.red-flag-text {
  font-size: 14px;
  color: var(--fg);
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
  .research-hero, .research-form-section, .results-section { padding: 48px 24px; }
  .research-form .form-row { flex-direction: column; }
  .btn-research { width: 100%; justify-content: center; height: 48px; }
  .angles-grid { grid-template-columns: 1fr; }
  .nav { padding: 16px 24px; }
  .results-meta { flex-wrap: wrap; }
  .results-meta .meta-time { margin-left: 0; width: 100%; }
}

@media (max-width: 480px) {
  .research-hero, .research-form-section, .results-section { padding: 40px 20px; }
}