/* Converted from the inline style objects of the React PoC (poc/src/**). */

/* ---------------------------------------------------------------- page shell */

body {
  margin: 0;
}

.page {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  color: #1f2937;
}

.page-header {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.5rem;
}

.page-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.75rem;
  color: #111827;
}

.page-subtitle {
  margin: 0 0 0.75rem 0;
  color: #374151;
}

.inline-code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.page-tagline {
  margin: 0;
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.5;
}

.page-main {
  margin-top: 1rem;
}

.page-footer {
  margin: 2rem 0 1rem 0;
  text-align: center;
  color: #9ca3af;
  font-size: 0.85rem;
}

/* -------------------------------------------------------------- shared cards */

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.card-heading {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  color: #111827;
}

.card-note {
  margin: 0 0 1rem 0;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Status labels replace the per-state inline colors used in the React version. */
.status {
  font-weight: 700;
}

.status-pending {
  color: #6b7280;
  font-style: italic;
  font-weight: 400;
}

.status-ok {
  color: #059669;
}

.status-error {
  color: #dc2626;
}

/* ------------------------------------------------------------- photo gallery */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.photo {
  margin: 0;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
}

.photo-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 400 / 250;
  object-fit: cover;
}

.photo-caption {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: #374151;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.photo-host {
  color: #6b7280;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
}

/* ---------------------------------------------------------------- ads section */

.ads-section {
  background: #fff7ed;
  border-color: #fed7aa;
}

.ads-section .card-heading {
  color: #7c2d12;
}

.ads-section .card-note {
  color: #9a3412;
}

.detection-row {
  padding: 0.5rem 0.75rem;
  background: #fff;
  border: 1px dashed #fb923c;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.35rem 1rem;
}

.ad-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ad-box {
  background: #fff;
  border: 2px dashed #f59e0b;
  border-radius: 8px;
  padding: 0.75rem;
  position: relative;
}

.ad-box-top {
  min-height: 90px;
}

.ad-box-middle,
.ad-box-bottom {
  min-height: 250px;
}

.ad-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #92400e;
  margin-bottom: 0.5rem;
}

/* ------------------------------------------------------------- NoT.js section */

.notjs-section {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.notjs-section .card-heading {
  color: #312e81;
}

.notjs-section .card-note {
  color: #4338ca;
}

.boot-row {
  padding: 0.5rem 0.75rem;
  background: #fff;
  border: 1px dashed #a5b4fc;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.pattern {
  background: #fff;
  border: 1px solid #e0e7ff;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.pattern-title {
  margin: 0 0 0.35rem 0;
  font-size: 1.05rem;
  color: #1e1b4b;
}

.pattern-desc {
  margin: 0 0 0.75rem 0;
  color: #4b5563;
  font-size: 0.88rem;
  line-height: 1.45;
}

.pattern-meta {
  font-size: 0.85rem;
  color: #374151;
  display: grid;
  gap: 0.35rem;
}

.url-code {
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
}

.pattern-detail {
  padding: 0.35rem 0.5rem;
  background: #f9fafb;
  border-radius: 4px;
  font-size: 0.82rem;
  color: #6b7280;
}

/* ----------------------------------------------------------- comments section */

.comments-section {
  padding: 1.25rem;
}

.comments-count {
  color: #6b7280;
  font-weight: normal;
  font-size: 0.95rem;
}

.tracker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  font-size: 0.85rem;
  color: #374151;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.host-code {
  word-break: break-all;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.comment-input,
.comment-textarea {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
}

.comment-textarea {
  resize: vertical;
  font-family: inherit;
}

.comment-error {
  margin: 0;
  color: #dc2626;
  font-size: 0.85rem;
}

.form-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  border: none;
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-item {
  padding: 0.75rem 0;
  border-top: 1px solid #e5e7eb;
}

.comment-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.comment-date {
  color: #9ca3af;
  font-size: 0.8rem;
}

.comment-text {
  margin: 0.35rem 0 0.5rem 0;
  line-height: 1.5;
}

.comment-delete {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  background: transparent;
  border: 1px solid #fca5a5;
  color: #dc2626;
  border-radius: 4px;
  cursor: pointer;
}
