/* ============================================================
   email-placeholders.com — site styles
   Loaded after /css/emailjay.css, the shared emailjay core
   (master copy in lessonsinemail; don't edit the core here).
   ============================================================ */

/* Site colour: sky */
:root {
  --primary:      var(--sky);
  --primary-text: var(--sky-text);
}

/* "email-placeholders.com" is a long title: keep the hero card inside the
   140px mobile doodle by shrinking it to fit one line. */
@media (max-width: 600px) {
  .ej-doodle-hero__card h1 { font-size: clamp(1.1rem, 5.4vw, 1.8rem); }
  .ej-doodle-hero__card p { font-size: var(--text-sm); line-height: 1.35; }
}

/* ─── Quick Start / icon URL rows ───
   copyUrl() uses the <code>'s nextElementSibling as its button, so keep
   each <code> immediately before its .copy-btn. */
.ep-urls { display: grid; margin-bottom: var(--space-lg); }
.ep-urls:last-child { margin-bottom: 0; }
.ep-url {
  display: grid;
  grid-template-columns: 10.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-xs) var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px dashed var(--border);
}
.ep-url:last-child { border-bottom: 0; }
.ep-url__label { font-weight: 800; font-size: var(--text-sm); }
.ep-url code {
  display: block;
  padding: 6px 10px;
  font-size: var(--text-sm);
}
.copy-btn {
  min-width: 44px;
  min-height: 40px;
  padding: 6px 12px;
}
.copy-btn.copied,
.copy-btn.copied:hover {
  background: var(--mint);
  border-color: var(--on-pastel);
  color: var(--on-pastel);
}
@media (max-width: 640px) {
  .ep-url { grid-template-columns: minmax(0, 1fr) auto; }
  .ep-url__label { grid-column: 1 / -1; }
}

.ep-note { font-size: var(--text-sm); }
.ej-tool-widget__body > p,
.ej-tool-widget__body .ep-note { max-width: none; }

/* ─── Example image grid ───
   Images sit on a fixed light checkerboard in both themes, so their own
   colours (and transparency) read the same in dark mode. */
.ep-examples {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-xl);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: var(--space-lg);
}
.ep-examples:last-child { margin-bottom: 0; }
.ep-example {
  margin: 0;
  display: flex;
  flex-direction: column;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: transform var(--ease), box-shadow var(--ease);
}
.ep-example:hover { transform: translateY(-3px); box-shadow: 5px 5px 0 var(--primary); }
.ep-example__media {
  display: grid;
  place-items: center;
  height: 240px;
  padding: var(--space-md);
  background-color: #FFFFFF;
  background-image: conic-gradient(#ECEEF2 0 25%, #FFFFFF 0 50%, #ECEEF2 0 75%, #FFFFFF 0);
  background-size: 20px 20px;
}
.ep-example__media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}
.ep-example__caption {
  margin: 0;
  padding: var(--space-sm) var(--space-md);
  border-top: var(--border-w) solid var(--ink);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--muted);
}
.ep-example__caption strong { color: var(--ink); margin-right: .35em; }

/* Smaller tiles inside the /secrets widget cards */
.ep-examples--sm,
.ep-examples--icons { gap: var(--space-md); }
.ep-examples--sm { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.ep-examples--sm .ep-example__media { height: 190px; }
.ep-examples--icons { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.ep-examples--icons .ep-example__media { height: 180px; }

/* Social icon tiles */
.ep-icons {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.ep-icons li {
  margin: 0;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  background: #FFFFFF;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-sm);
}
.ep-icons img { width: 40px; height: 40px; }

/* ─── API documentation cards ─── */
.ep-docs { display: grid; gap: var(--space-xl); margin-bottom: var(--space-xl); }
.ep-doc,
.ep-doc:hover,
.ep-doc:focus-within {
  gap: 0;
  transform: none;
  box-shadow: 6px 6px 0 var(--primary);
}
.ep-doc .ej-card__title { margin-bottom: var(--space-sm); }
.ep-doc__label {
  margin: var(--space-md) 0 var(--space-xs);
  font-size: var(--text-xs);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.ep-doc pre { margin-bottom: var(--space-sm); padding: var(--space-sm) var(--space-md); }
.ep-doc pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
.ep-doc p { margin-bottom: var(--space-sm); }
.ep-params {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--space-xs) var(--space-md);
  align-items: baseline;
  margin: 0;
  font-size: var(--text-sm);
}
.ep-params dd { margin: 0; }
.ep-example-urls,
.ep-code-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-md);
  display: grid;
  gap: var(--space-xs);
  font-size: var(--text-sm);
}
.ep-example-urls li,
.ep-code-list li { margin: 0; }
.ep-example-urls span { color: var(--muted); font-weight: 600; }
.ep-example-urls span::before { content: "— "; }
@media (max-width: 480px) {
  .ep-params { grid-template-columns: minmax(0, 1fr); }
  .ep-params dd { margin-bottom: var(--space-xs); }
}

/* ─── /secrets ─── */
.ep-secret { margin: var(--space-xl) 0; }
.ep-back { text-align: center; margin: var(--space-2xl) 0 var(--space-xl); }
.ep-back p { margin: 0 auto var(--space-sm); }
.ep-back p:last-child { font-size: var(--text-sm); font-weight: 600; color: var(--muted); }

/* Nine features: three columns at content width */
.ep-features { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
@media (max-width: 600px) {
  .ep-examples--sm,
  .ep-examples--icons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ep-examples--sm .ep-example__media,
  .ep-examples--icons .ep-example__media { height: 130px; padding: var(--space-sm); }
}
