/* agri-recipe.css v2.0 — ใช้ --afsm-* variables ทั้งหมด */

.af-recipe-wrap {
  font-family: "Sarabun", "Noto Sans Thai", sans-serif;
  border: 1px solid var(--afsm-border, #e5e7eb);
  border-radius: var(--afsm-radius, 10px);
  overflow: hidden;
  margin: 1.5rem 0;
  background: #fff;
}

/* ── Header ───────────────────────────────────────────────────────── */

.af-recipe-head {
  background: var(--afsm-primary, #0f6b4e);
  padding: 14px 18px 12px;
}

.af-recipe-head-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.af-recipe-head-title {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  flex: 1;
}

.af-recipe-head-badge {
  font-size: 11px;
  padding: 2px 10px;
  background: rgba(255,255,255,.2);
  color: #fff;
  border-radius: 20px;
}

.af-recipe-head-sub {
  font-size: 12px;
  color: rgba(255,255,255,.75);
}

/* ── Tabs ─────────────────────────────────────────────────────────── */

.af-recipe-tabs {
  display: flex;
  border-bottom: 1px solid var(--afsm-border, #e5e7eb);
  background: #fff;
}

.af-recipe-tab {
  flex: 1;
  padding: 11px 8px;
  font-size: 13px;
  font-family: inherit;
  text-align: center;
  color: #6b7280;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.af-recipe-tab.on {
  color: var(--afsm-primary, #0f6b4e);
  border-bottom-color: var(--afsm-primary, #0f6b4e);
  font-weight: 500;
}

.af-recipe-tab-type {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 20px;
  background: var(--afsm-primary-lt, #e8f5f0);
  color: var(--afsm-primary-d, #0a5038);
}

/* ── Panel ────────────────────────────────────────────────────────── */

.af-recipe-panel     { display: none; }
.af-recipe-panel.on  { display: block; }

/* ── Section ──────────────────────────────────────────────────────── */

.af-recipe-sec {
  padding: 16px 18px;
  border-bottom: 1px solid var(--afsm-border, #e5e7eb);
}

.af-recipe-sec:last-child { border-bottom: none; }

.af-recipe-sec-label {
  font-size: 11px;
  color: #6b7280;
  letter-spacing: .04em;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.af-recipe-sec-label i { font-size: 14px; }

/* ── Hero ─────────────────────────────────────────────────────────── */

.af-recipe-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--afsm-primary-lt, #e8f5f0);
  border-radius: 8px;
  padding: 14px 16px;
}

.af-recipe-hero-icon {
  font-size: 32px;
  color: var(--afsm-primary, #0f6b4e);
  line-height: 1;
  flex-shrink: 0;
}

.af-recipe-hero-label {
  font-size: 11px;
  color: var(--afsm-primary-d, #0a5038);
  letter-spacing: .03em;
  margin-bottom: 2px;
}

.af-recipe-hero-val {
  font-size: 24px;
  font-weight: 500;
  color: var(--afsm-primary-d, #0a5038);
  line-height: 1.1;
}

.af-recipe-hero-sub {
  font-size: 12px;
  color: var(--afsm-primary, #0f6b4e);
  margin-top: 2px;
}

/* ── Ingredients ──────────────────────────────────────────────────── */

.af-recipe-ing-list { display: flex; flex-direction: column; }

.af-recipe-ing {
  padding: 14px 0;
  border-bottom: 1px solid var(--afsm-border, #e5e7eb);
}

.af-recipe-ing:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.af-recipe-ing-rate {
  font-size: 20px;
  font-weight: 500;
  color: var(--afsm-primary, #0f6b4e);
  line-height: 1;
  margin-bottom: 4px;
}

.af-recipe-ing-name {
  font-size: 15px;
  font-weight: 500;
  color: #222;
  margin-bottom: 2px;
}

.af-recipe-ing-role {
  font-size: 12px;
  color: #6b7280;
}

.af-recipe-buy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 7px 16px;
  background: var(--afsm-orange, #f97316);
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  border-radius: 6px;
  text-decoration: none;
}

.af-recipe-buy:hover { opacity: .88; }
.af-recipe-buy i { font-size: 13px; }

/* ── Schedule — vertical stack ────────────────────────────────────── */

.af-recipe-sched {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.af-recipe-sched-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--afsm-primary-lt, #e8f5f0);
  border-radius: 8px;
}

.af-recipe-sched-icon {
  font-size: 20px;
  color: var(--afsm-primary, #0f6b4e);
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.af-recipe-sched-key {
  font-size: 11px;
  color: var(--afsm-primary-d, #0a5038);
  margin-bottom: 2px;
}

.af-recipe-sched-val {
  font-size: 14px;
  font-weight: 500;
  color: var(--afsm-primary-d, #0a5038);
}

/* ── Warning ──────────────────────────────────────────────────────── */

.af-recipe-warn {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  padding: 12px 14px;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: #92400e;
  line-height: 1.6;
}

.af-recipe-warn i {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Articles ─────────────────────────────────────────────────────── */

.af-recipe-art {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 6px 0;
}

.af-recipe-art + .af-recipe-art {
  border-top: 1px solid var(--afsm-border, #e5e7eb);
  margin-top: 6px;
  padding-top: 12px;
}

.af-recipe-art-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--afsm-primary-lt, #e8f5f0);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.af-recipe-art-icon i {
  font-size: 20px;
  color: var(--afsm-primary, #0f6b4e);
}

.af-recipe-art-body { flex: 1; }

.af-recipe-art-title {
  font-size: 13px;
  font-weight: 500;
  color: #222;
  line-height: 1.4;
}

.af-recipe-art-sub {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}

.af-recipe-art-arr {
  font-size: 18px;
  color: var(--afsm-border, #e5e7eb);
}

/* ── Mobile ───────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .af-recipe-sec      { padding: 14px; }
  .af-recipe-head     { padding: 12px 14px 10px; }
  .af-recipe-ing-rate { font-size: 18px; }
  .af-recipe-hero-val { font-size: 22px; }
}
