/* ============================================================
   AVTAJ.COM — components.css
   Supplementary component styles
   ============================================================ */

/* ─── Post body typography ───────────────────────────────── */
.post-body h2 {
  font-family: var(--font-body);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin: 2rem 0 1rem;
}

.post-body h3 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 1.5rem 0 0.75rem;
}

.post-body p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.post-body ul, .post-body ol {
  list-style: revert;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.post-body li { margin-bottom: 0.5rem; }

.post-body a {
  color: var(--navy-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body a:hover { color: var(--navy); }

.post-body strong { color: var(--text-primary); font-weight: 600; }

.post-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 1rem 1.25rem;
  background: var(--gold-pale);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

.post-body img {
  width: 100%;
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.post-body th {
  background: var(--navy);
  color: white;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}

.post-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.post-body tr:nth-child(even) td { background: var(--gray-50); }

/* ─── Travelpayouts widget overrides ─────────────────────── */
#tpwl-search, #tpwl-tickets {
  width: 100%;
  min-height: 60px;
}

/* ─── Loading skeleton ───────────────────────────────────── */
.skeleton {
  background: var(--gray-200);
  border-radius: var(--radius-md);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ─── Route page highlights grid ────────────────────────── */
.route-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .route-highlights { grid-template-columns: repeat(4, 1fr); }
}

/* ─── Smooth page transitions ────────────────────────────── */
main {
  animation: fadeIn 0.2s ease;
}

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

/* ─── Search widget container ────────────────────────────── */
.search-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  border: 1px solid var(--border);
}

/* ─── Community thread styles (Phase 3) ─────────────────── */
.thread-list { display: flex; flex-direction: column; gap: 2px; }

.thread-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition);
}

.thread-item:hover { border-color: var(--gold); }

.thread-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.thread-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── Form styles ────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-family: var(--font-ui);
  color: var(--text-primary);
  background: var(--bg-card);
  transition: border-color var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── Tags/chips ─────────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--gray-100);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
}

.tag-gold {
  background: var(--gold-pale);
  color: var(--gold);
}

.tag-navy {
  background: rgba(10,22,40,0.08);
  color: var(--navy);
}

/* ─── Pagination ─────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  flex-wrap: wrap;
}

/* ─── Back to top ────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 90px;
  right: var(--space-lg);
  width: 40px;
  height: 40px;
  background: var(--navy);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 99;
  border: none;
  font-size: 1.2rem;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
