/* ══════════════════════════════════════════════════════════════
   Ambrosia Recipe Card — front-end styles
   Ported from the WPRM "2026" template CSS; adapted for native markup.
   ══════════════════════════════════════════════════════════════ */

:root {
  --arc-pink:        #CF2378;
  --arc-pink-dark:   #a81c60;
  --arc-border:      #e5e7eb;
  --arc-muted:       #6b7280;
  --arc-bg-soft:     #fafaf8;
  --arc-bg-alt:      #f9fafb;
  --arc-pink-light:  #fdf1f6;
  --arc-text:        #1a1a1a;
  --arc-radius:      10px;
  --arc-font-body:   'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --arc-font-brand:  'Playfair Display', Georgia, serif;
  --arc-font-title:  'Gloria Hallelujah', cursive;
}

/* ── Wrapper ────────────────────────────────────────────────── */
.ambrosia-recipe-card {
  font-family: var(--arc-font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--arc-text);
  background: #fff;
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius);
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  overflow: hidden;
}

/* ── Title ──────────────────────────────────────────────────── */
.arc-title {
  font-family: var(--arc-font-title);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--arc-text);
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--arc-border);
}

/* ── Stats row ──────────────────────────────────────────────── */
.arc-stats {
  display: flex;
  align-items: stretch;
  background: var(--arc-bg-soft);
  border-bottom: 1px solid var(--arc-border);
}

.arc-stat {
  flex: 1;
  padding: 14px 6px;
  text-align: center;
  border-right: 1px solid var(--arc-border);
}

.arc-stat:last-child { border-right: none; }

.arc-stat-value {
  font-family: var(--arc-font-brand);
  font-size: 18px;
  font-weight: 700;
  color: var(--arc-pink);
  line-height: 1.1;
}

.arc-stat-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--arc-muted);
  margin-top: 4px;
}

/* ── Sections ───────────────────────────────────────────────── */
.arc-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--arc-border);
}

.arc-section:last-of-type { border-bottom: none; }

.arc-section-title {
  font-family: var(--arc-font-brand);
  font-size: 17px;
  font-weight: 700;
  color: var(--arc-text);
  margin: 0 0 14px;
}

.arc-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.arc-section-header .arc-section-title { margin-bottom: 0; }

/* ── Group name ─────────────────────────────────────────────── */
.arc-group-name {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--arc-muted);
  margin: 16px 0 8px;
}

/* ── Servings section layout ────────────────────────────────── */
.arc-servings-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.arc-servings-section .arc-section-title {
  margin-bottom: 0;
}

/* ── Servings adjuster ──────────────────────────────────────── */
.arc-servings-adjuster {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--arc-font-body);
}

.arc-serv-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--arc-border);
  background: transparent;
  color: var(--arc-text);
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: border-color .15s, color .15s;
}

.arc-serv-btn:hover {
  border-color: var(--arc-pink);
  color: var(--arc-pink);
}

.arc-current-servings {
  font-size: 16px;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
}

/* ── Ingredient list ────────────────────────────────────────── */
.arc-ingredient-list {
  list-style: none;
  padding: 8px;
  margin: 0;
}

.arc-ingredient {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 15px;
  line-height: 1.5;
}

.arc-ingredient:last-child { border-bottom: none; }

.arc-ingredient.is-checked .arc-ingredient-inner {
  text-decoration: line-through;
  color: var(--arc-muted);
  opacity: .65;
}

.arc-check {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid #9ca3af;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background .15s, border-color .15s;
  vertical-align: middle;
}

.arc-check:checked {
  background-color: var(--arc-pink);
  border-color: var(--arc-pink);
}

.arc-check:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: 2.5px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.arc-ingredient-inner { flex: 1; }

.arc-amount,
.arc-unit { font-weight: 600; }

a.arc-ing-link {
  color: var(--arc-pink);
  text-decoration: underline;
  text-decoration-color: rgba(207, 35, 120, 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s;
}
a.arc-ing-link:hover {
  text-decoration-color: var(--arc-pink);
}

.arc-ing-notes {
  color: var(--arc-muted);
  font-size: 13px;
  margin-left: 4px;
}

/* ── Instruction list ───────────────────────────────────────── */
.arc-instruction-list {
  list-style: none;
  counter-reset: arc-step;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.arc-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  counter-increment: arc-step;
  font-size: 16px;
  line-height: 1.55;
}

.arc-step::before {
  content: counter(arc-step);
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  background: var(--arc-pink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--arc-font-body);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* ── Notes ──────────────────────────────────────────────────── */
.arc-notes-text {
  font-size: 13px;
  color: var(--arc-muted);
  line-height: 1.55;
}

.arc-notes-text p { margin: 0 0 8px; }
.arc-notes-text p:last-child { margin-bottom: 0; }

/* ── Ratings ────────────────────────────────────────────────── */
.arc-ratings-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.arc-rating-display {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.arc-rating-stars { color: var(--arc-pink); letter-spacing: 1px; }
.arc-rating-score { font-weight: 700; }
.arc-rating-count { color: var(--arc-muted); }

.arc-rate-prompt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--arc-muted);
}

.arc-stars {
  display: flex;
  gap: 2px;
}

.arc-star {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--arc-border);
  padding: 2px;
  line-height: 1;
  transition: color .12s, transform .1s;
}

.arc-star:hover,
.arc-star.is-hover { color: var(--arc-pink); transform: scale(1.15); }

.arc-star.is-filled { color: var(--arc-pink); }

.arc-rate-thanks {
  font-size: 13px;
  color: var(--arc-pink);
  font-weight: 600;
}

/* ── Footer ─────────────────────────────────────────────────── */
.arc-footer {
  padding: 16px 24px 20px;
  display: flex;
  gap: 10px;
}

.arc-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--arc-font-body);
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  box-sizing: border-box;
  border: 1.5px solid var(--arc-border);
  background: transparent;
  color: var(--arc-muted);
}

.arc-btn:hover {
  border-color: var(--arc-text);
  color: var(--arc-text);
}

.arc-btn-pin:hover {
  border-color: #e60023;
  color: #e60023;
}

.arc-pin-hidden-img {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ── Nutrition Facts label ───────────────────────────────────── */
.arc-nf {
  border: 2px solid #000;
  padding: 4px 6px 4px;
  max-width: 280px;
  font-family: Arial, Helvetica, sans-serif;
  color: #000;
  background: #fff;
}

.arc-nf-title {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 2px;
}

.arc-nf-serving-size {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  border-top: 1px solid #000;
  padding-top: 3px;
  margin-top: 3px;
}

.arc-nf-bar {
  background: #000;
  margin: 3px 0;
}

.arc-nf-bar--thick  { height: 8px; }
.arc-nf-bar--medium { height: 4px; }

.arc-nf-calories-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 2px 0 2px;
}

.arc-nf-amount-per {
  font-size: 11px;
  font-weight: normal;
}

.arc-nf-calories-label {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}

.arc-nf-calories-value {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.arc-nf-dv-header {
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  border-bottom: 1px solid #000;
  padding-bottom: 2px;
  margin-bottom: 1px;
}

.arc-nf-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  border-bottom: 1px solid #000;
  padding: 2px 0;
}

.arc-nf-row--indent {
  padding-left: 16px;
}

.arc-nf-footnote {
  font-size: 10px;
  line-height: 1.3;
  margin-top: 4px;
  color: #000;
}

/* ── Jump link ──────────────────────────────────────────────── */
.ambrosia-jump-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--arc-pink);
  text-decoration: none;
}
.ambrosia-jump-link:hover { text-decoration: underline; }

/* ── Print styles ───────────────────────────────────────────── */
@media print {
  /* Hide everything on the page */
  body * { visibility: hidden; }

  /* Show only the recipe card and all its children */
  .ambrosia-recipe-card,
  .ambrosia-recipe-card * { visibility: visible; }

  .ambrosia-recipe-card {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 700px;
    margin: 0;
    padding: 20px;
    box-shadow: none;
    border: none;
    font-size: 12pt;
  }

  /* Hide interactive elements that don't make sense on paper */
  .arc-serv-btn,
  .arc-check,
  .arc-footer,
  .arc-ratings-section,
  .arc-stars,
  .arc-rate-prompt { display: none !important; }

  .arc-title { font-size: 20pt; }
  .arc-section-title { font-size: 14pt; }
  .arc-ingredient-list li { break-inside: avoid; }
  .arc-instruction-list li { break-inside: avoid; }
}
