/* Post-transplant graft calculator — content specific to
   /post-transplant-graft-calculator. Shared header/drawer/footer/page-hero/
   cc-card/cc-field/disclaimer CSS lives in /static/base.css. */

.privacy-strip {
  background: #f0faf4;
  border: 1px solid #b7e4c7;
  border-radius: 8px;
  padding: 11px 20px;
  font-size: 0.82rem;
  color: #1a6b3a;
  width: 100%;
  text-align: center;
  margin-top: 16px;
}

.pt-main {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 40px 20px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.pt-col-form, .pt-col-timeline { display: flex; flex-direction: column; gap: 20px; }

.pt-col-form > #pt-upload-card,
.pt-col-form > #loading,
.pt-col-form > #results-panel {
  flex: 1;
}

.pt-col-timeline > .cc-card { flex: 1; }

.pt-section-label {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 12px;
}

/* ── UPLOAD ZONE ── */
.pt-upload-zone {
  border: 2px dashed var(--border); border-radius: 10px;
  padding: 26px 16px; text-align: center; cursor: pointer;
  transition: all 0.2s; position: relative; margin-bottom: 4px;
}
.pt-upload-zone:hover, .pt-upload-zone.dragover { border-color: var(--accent); background: var(--accent-light); }
.pt-upload-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.pt-upload-icon { font-size: 2rem; margin-bottom: 8px; display: block; }
.pt-upload-zone h3 { font-size: 0.9rem; font-weight: 500; margin-bottom: 4px; }
.pt-upload-zone p { font-size: 0.78rem; color: var(--ink-light); }

.pt-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, 72px); gap: 8px; margin-top: 12px; }
.pt-preview-grid:empty { margin-top: 0; }
.pt-preview-item { position: relative; width: 72px; aspect-ratio: 1; border-radius: 7px; overflow: hidden; border: 1px solid var(--border); }
.pt-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.pt-preview-item .pt-remove {
  position: absolute; top: 3px; right: 3px;
  background: rgba(0,0,0,0.6); color: white; border: none;
  border-radius: 50%; width: 20px; height: 20px; cursor: pointer;
  font-size: 10px; display: flex; align-items: center; justify-content: center;
}

.pt-angle-tips { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin: 12px 0 20px; }
.pt-angle-tips-label { font-size: 0.72rem; color: var(--ink-faint); white-space: nowrap; }
.pt-angle-tip {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 3px 10px; font-size: 0.72rem; color: var(--ink-light); font-weight: 500;
}

/* ── DAY PRESETS ── */
.pt-days-field .pt-chips { margin-top: 10px; }
.pt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pt-chip {
  background: var(--bg); border: 1px solid var(--border); border-radius: 20px;
  padding: 5px 12px; font-size: 0.76rem; font-weight: 500; color: var(--ink-light);
  cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.15s;
}
.pt-chip:hover { border-color: var(--accent); color: var(--accent); }
.pt-chip.selected { background: var(--accent); border-color: var(--accent); color: white; }

textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem; color: var(--ink); background: var(--bg);
  transition: border-color 0.2s; outline: none; min-height: 70px; resize: vertical;
}
textarea:focus { border-color: var(--accent); background: var(--white); }
textarea::placeholder { color: var(--ink-faint); }

/* ── BUTTONS ── */
.pt-btn-analyze {
  width: 100%; background: var(--accent); color: white; border: none;
  border-radius: 9px; padding: 14px; font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: background 0.2s, transform 0.1s;
}
.pt-btn-analyze:hover { background: #224830; }
.pt-btn-analyze:active { transform: scale(0.99); }
.pt-btn-analyze:disabled { background: var(--ink-faint); cursor: not-allowed; transform: none; }

.pt-btn-reset {
  width: 100%; background: transparent; color: var(--accent);
  border: 1.5px solid var(--accent); border-radius: 9px; padding: 12px;
  font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s; margin-top: 4px;
}
.pt-btn-reset:hover { background: var(--accent-light); }

.pt-error-box {
  display: none; background: #fef2f2; border: 1px solid #fecaca;
  border-radius: 7px; padding: 12px 14px; color: #991b1b; font-size: 0.82rem; margin-top: 12px;
}
.pt-error-box.active { display: block; }

/* ── LOADING ── */
.pt-loading { display: none; text-align: center; align-items: center; justify-content: center; flex-direction: column; min-height: 300px; }
.pt-loading.active { display: flex; }
.pt-spinner {
  width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: pt-spin 0.8s linear infinite; margin: 0 auto 16px;
}
@keyframes pt-spin { to { transform: rotate(360deg); } }
.pt-loading p { color: var(--ink-light); font-size: 0.88rem; }

/* ── RESULTS ── */
.pt-results { display: none; }
.pt-results.active { display: block; }

.pt-stage-hero { text-align: center; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.pt-count-number { font-family: 'DM Serif Display', serif; font-size: 2.6rem; line-height: 1.1; color: var(--accent); margin-bottom: 4px; }
.pt-day-tag { display: inline-block; margin-top: 8px; font-size: 0.75rem; color: var(--ink-light); background: var(--bg); border-radius: 20px; padding: 3px 10px; }
.pt-range-row { margin-top: 8px; font-size: 0.85rem; color: var(--ink-light); }

.pt-result-section { padding: 16px 0; border-bottom: 1px solid var(--border); }
.pt-result-section:last-of-type { border-bottom: none; }

.pt-narrative { font-size: 0.83rem; color: var(--ink-light); line-height: 1.6; }

.pt-coverage-badge {
  display: inline-block; font-size: 0.85rem; font-weight: 500; color: var(--ink);
  background: var(--bg); border-radius: 7px; padding: 8px 12px; text-transform: capitalize;
}
.pt-coverage-badge.full_recipient_area { background: var(--accent-light); color: var(--accent); }
.pt-coverage-badge.partial_area_visible { background: var(--warn-light); color: var(--warn); }
.pt-coverage-badge.cannot_determine { background: var(--bg); color: var(--ink-light); }

.pt-result-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pt-result-image { aspect-ratio: 1; border-radius: 7px; overflow: hidden; border: 1px solid var(--border); cursor: pointer; transition: transform 0.15s; }
.pt-result-image:hover { transform: scale(1.03); }
.pt-result-image img { width: 100%; height: 100%; object-fit: cover; }

.pt-obs-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; }
.pt-obs-list li { display: flex; gap: 8px; font-size: 0.83rem; color: var(--ink-light); line-height: 1.5; }
.pt-obs-list li::before { content: '→'; color: var(--accent); flex-shrink: 0; }

.pt-rec-box {
  background: var(--accent-light); border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0; padding: 13px 15px; font-size: 0.85rem; color: var(--ink); line-height: 1.7;
}

/* ── TIMELINE (right column) ── */
.pt-timeline-title { font-family: 'DM Serif Display', serif; font-size: 1.15rem; color: var(--ink); margin-bottom: 3px; }
.pt-timeline-subtitle { font-size: 0.78rem; color: var(--ink-light); font-weight: 300; margin-bottom: 16px; }
.pt-timeline-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.pt-timeline-list li { display: flex; gap: 12px; }
.pt-timeline-range {
  flex-shrink: 0; width: 84px; font-size: 0.7rem; font-weight: 600; color: var(--accent);
  padding-top: 2px;
}
.pt-timeline-stage-title { font-size: 0.85rem; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.pt-timeline-body p { font-size: 0.78rem; color: var(--ink-light); line-height: 1.55; margin: 0; }

/* ── SEO INFO SECTION ── */
.cc-info h2 { font-family: 'DM Serif Display', serif; font-size: 1.25rem; color: var(--ink); margin-bottom: 12px; margin-top: 28px; }
.cc-info h2:first-child { margin-top: 0; }
.cc-info p { font-size: 0.87rem; color: var(--ink-light); line-height: 1.7; margin-bottom: 12px; }

/* ── LIGHTBOX ── */
.pt-lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 100; align-items: center; justify-content: center; padding: 24px; }
.pt-lightbox.active { display: flex; }
.pt-lightbox img { max-width: 100%; max-height: 90vh; border-radius: 10px; object-fit: contain; }
.pt-lightbox-close { position: fixed; top: 16px; right: 20px; color: white; font-size: 2rem; cursor: pointer; background: none; border: none; line-height: 1; opacity: 0.8; }
.pt-lightbox-close:hover { opacity: 1; }

/* ── MOBILE ── */
@media (max-width: 900px) {
  .pt-main { grid-template-columns: 1fr; padding: 16px 16px 8px; gap: 16px; }
  .pt-count-number { font-size: 2.1rem; }
}
