/*
 * DELICATE FIRE — Episode Page Styles
 * Complements /css/style.css
 * Used by individual episode pages (formerly inline)
 */

/* ========== EPISODE PAGE LAYOUT ========== */
body.page-episode {
  padding: 0;
}

body.page-episode main {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem;
}

.ep-hero {
  text-align: center;
  padding: 3.5rem 0 2.5rem;
  position: relative;
}

.ep-hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 130%;
  background: radial-gradient(ellipse 70% 60% at 50% 20%, rgba(10, 138, 82, 0.10) 0%, transparent 70%);
  pointer-events: none;
}

.ep-hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #f0f0f5;
  margin-bottom: 0.5rem;
  position: relative;
}

/* ========== EPISODE TYPOGRAPHY ========== */
.subtitle {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-style: italic;
  text-align: center;
  margin-bottom: 2rem;
}

.intro {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--text);
  max-width: 620px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

/* ========== VIDEO CONTAINER ========== */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 2rem 0;
  background: var(--card);
  border: 1px solid var(--border);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--radius);
}

/* ========== GRID CONTAINERS ========== */
.grid-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}

.triple-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.grid-cell {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.grid-cell:hover {
  border-color: var(--border-hover);
  background: var(--card-hover);
}

.grid-cell h4 {
  color: #f0f0f5;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  margin-top: 0;
}

.grid-cell .location {
  color: var(--primary-light);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.grid-cell p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.55;
}

/* Colored borders for grid cells */
.grid-cell.need   { border-color: var(--primary); }
.grid-cell.want   { border-color: var(--accent); }
.grid-cell.desire { border-color: #c084fc; }

/* ========== CONCEPT CARDS ========== */
.concept-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
  transition: border-color 0.2s, background 0.2s;
}

.concept-card:hover {
  border-color: var(--border-hover);
  background: var(--card-hover);
}

.concept-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.concept-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.concept-title {
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 600;
  color: #f0f0f5;
  margin: 0;
}

/* ========== INSIGHT BOX (purple-tinted) ========== */
.insight-box {
  background: rgba(156, 130, 190, 0.08);
  border: 1px solid rgba(156, 130, 190, 0.35);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}

.insight-box h3 {
  color: #c4aef0;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

/* ========== WARNING BOX (orange-tinted) ========== */
.warning {
  background: rgba(196, 118, 43, 0.09);
  border: 1px solid rgba(196, 118, 43, 0.4);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-style: italic;
  color: var(--text);
}

.warning h3, .warning h4 {
  color: var(--accent-light);
  margin-top: 0;
}

/* ========== SUCCESS BOX (green-tinted) ========== */
.success {
  background: var(--primary-faint);
  border: 1px solid rgba(10, 138, 82, 0.4);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  color: var(--text);
}

.success h3, .success h4 {
  color: var(--primary-light);
  margin-top: 0;
}

/* ========== DIAGNOSTIC BOX (blue/primary-tinted) ========== */
.diagnostic {
  background: rgba(10, 138, 82, 0.07);
  border: 1px solid rgba(10, 138, 82, 0.3);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}

.diagnostic h3 {
  color: var(--primary-light);
  margin-top: 0;
}

/* ========== NEGOTIABILITY SPANS ========== */
.negotiability {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  margin: 1rem 0;
  text-align: center;
}

.negotiability span {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 0.82rem;
}

.neg-low {
  background: rgba(220, 80, 70, 0.15);
  border: 1px solid rgba(220, 80, 70, 0.4);
  color: #f08080;
}

.neg-high {
  background: var(--primary-faint);
  border: 1px solid rgba(10, 138, 82, 0.4);
  color: var(--primary-light);
}

/* ========== TRANSCRIPT (collapsible) ========== */
details {
  margin: 2rem 0;
}

summary {
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary-light);
  padding: 0.875rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s, border-color 0.2s;
}

summary::-webkit-details-marker { display: none; }

summary::before {
  content: '▶';
  font-size: 0.7rem;
  transition: transform 0.2s;
}

details[open] summary::before {
  transform: rotate(90deg);
}

summary:hover {
  background: var(--card-hover);
  border-color: var(--border-hover);
}

.transcript {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: none;
  padding: 1.5rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.85;
  max-height: 520px;
  overflow-y: auto;
  color: var(--text-muted);
}

.transcript strong {
  color: var(--primary-light);
  font-weight: 600;
}

/* ========== DEPTH LEVELS ========== */
.depth-levels {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
}

.depth-level {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.depth-level.surface {
  background: rgba(10, 138, 82, 0.08);
  border: 1px solid rgba(10, 138, 82, 0.3);
}

.depth-level.mid {
  background: rgba(156, 130, 190, 0.08);
  border: 1px solid rgba(156, 130, 190, 0.3);
}

.depth-level.deep {
  background: rgba(196, 118, 43, 0.08);
  border: 1px solid rgba(196, 118, 43, 0.3);
}

.depth-arrow {
  color: var(--text-faint);
  text-align: center;
  padding: 0.25rem;
  font-size: 0.9rem;
}

/* ========== COMMENTS SECTION ========== */
.comments-section {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.comments-section h2 {
  font-family: var(--font-ui);
  font-size: 1.25rem;
  color: #f0f0f5;
  margin-bottom: 1.5rem;
}

.comment-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.comment-author {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.875rem;
  color: #f0f0f5;
}

.comment-date {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-faint);
}

.comment-body {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  line-height: 1.7;
  margin: 0;
}

.comment-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.comment-form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.2s;
}

.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.comment-form textarea::placeholder {
  color: var(--text-faint);
}

.comment-submit {
  margin-top: 0.75rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.625rem 1.375rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.comment-submit:hover {
  background: var(--primary-light);
  transform: scale(1.02);
}

.comment-submit:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

.signin-prompt {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 1.25rem;
}

.signin-prompt p {
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

#gsi-btn-wrap {
  display: flex;
  justify-content: center;
}

.comment-error {
  color: #f08070;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.comment-success {
  color: var(--primary-light);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* ========== ENVELOPE DIAGRAM ========== */
.envelope-diagram {
  text-align: center;
  padding: 1.5rem;
  margin: 2rem 0;
}

.envelope {
  display: inline-block;
  padding: 2rem 3rem;
  border: 2px dashed var(--primary);
  border-radius: 50%;
  position: relative;
  color: var(--text);
}

.envelope-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--primary-light);
}

.envelope-outside {
  color: var(--text-muted);
  margin-top: 1rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
}

/* ========== SOURCE NOTE ========== */
.source-note {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin: 3rem 0;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.source-note a {
  color: var(--primary-light);
  text-decoration: none;
}

.source-note a:hover {
  text-decoration: underline;
}

/* ========== EPISODE PAGE FOOTER (legacy .footer class) ========== */
.footer {
  text-align: center;
  color: var(--text-muted);
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: 0.875rem;
}

.footer a {
  color: var(--primary-light);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ========== MOBILE EPISODE ========== */
@media (max-width: 600px) {
  body.page-episode main { padding: 1rem; }
  .ep-hero h1 { font-size: 1.75rem; }
  .triple-grid { grid-template-columns: 1fr; }
  .negotiability { grid-template-columns: 1fr; }
  .video-container { margin: 1rem 0; }
}

/* ========== PATH-OF-RIGHT-ACTION / ESSAY PAGE EXTRAS ========== */
.back {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  text-decoration: none;
  transition: color 0.2s;
}

.back:hover {
  color: var(--primary-light);
  text-decoration: none;
}

.meta {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-light);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.byline {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.section-break {
  text-align: center;
  color: var(--text-faint);
  margin: 2.5rem 0;
  letter-spacing: 0.25em;
  font-family: var(--font-body);
  font-size: 1.1rem;
}

/* Fallback body padding for episode pages without <main> */
body.page-episode > .container {
  padding: 2rem;
}

@media (max-width: 600px) {
  body.page-episode > .container {
    padding: 1rem;
  }
}
