/* Phase 5 — engagement & messaging. One stylesheet for the merchant's WhatsApp wording, the
   follow-up list, customer tags and loyalty, the export screen, and the shopper's saved list.
   Loaded by both layouts so the shared pieces (chips, cards, badges) look the same on both sides. */

/* Feature 8 — save buttons. Deliberately quiet: saving is a small, private act, not a call to action. */
.card-save{margin:0}
.save-button{display:inline-flex;align-items:center;gap:7px;width:100%;justify-content:center;margin-top:8px;padding:9px 12px;border:1px solid var(--line,#e6ddcd);border-radius:9px;background:var(--surface,#fff);color:var(--muted,#78705f);font:inherit;font-size:.85rem;font-weight:600;cursor:pointer;transition:color .15s ease,border-color .15s ease,background .15s ease}
.save-button span{font-size:1.05rem;line-height:1}
.save-button:hover{border-color:var(--brand,#21503e);color:var(--brand,#21503e)}
.save-button.is-saved{background:#fff1f2;border-color:#f8b4bd;color:#b4233c}
.product-save{margin:14px 0 4px}
.product-save .save-button{width:auto;padding:11px 16px;font-size:.9rem}
.product-save .save-button b{font-weight:600}

/* Feature 8 — the saved page and the recently viewed strips. */
.favorites-page .section-note,.recent-strip .section-note{color:var(--muted,#78705f);font-size:.85rem;text-decoration:none}
.favorites-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:0 0 20px}
.favorites-actions form{margin:0}
.favorites-empty{max-width:520px;margin:32px auto;padding:32px;border:1px dashed var(--line,#e6ddcd);border-radius:14px;text-align:center;background:var(--surface,#fff)}
.favorites-empty span{display:block;font-size:2rem;color:#f8b4bd}
.favorites-empty h3{margin:12px 0 6px}
.favorites-empty p{color:var(--muted,#78705f);margin:0 0 18px;line-height:1.5}
.recent-strip{margin-top:8px}

/* Feature 16 — the message templates screen. The preview looks like a chat bubble, because that is
   what the merchant is really editing. */
.template-tokens{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
.template-tokens span{display:flex;flex-direction:column;gap:3px;padding:9px 12px;background:#f8f9fb;border:1px solid var(--line,#e6ddcd);border-radius:9px;font-size:.78rem;color:var(--muted,#78705f);max-width:220px}
.template-tokens code{color:var(--brand,#21503e);font-weight:700}
.template-form{display:grid;gap:16px;margin-top:20px}
.template-card .template-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}
.template-card h2{margin:0 0 4px}
.template-card textarea{width:100%;padding:12px 14px;border:1px solid var(--line,#e6ddcd);border-radius:10px;font:inherit;line-height:1.45;resize:vertical}
.template-custom{background:#ecfdf3;color:#027a48}
.template-builtin{background:#f2f4f7;color:#475467}
.template-preview{margin-top:12px;padding:14px 16px;background:#e7f6ec;border-radius:12px}
.template-preview-label{display:block;font-size:.72rem;letter-spacing:.05em;text-transform:uppercase;color:#027a48;margin-bottom:6px}
.template-preview p{margin:0;white-space:pre-wrap;line-height:1.5}
.template-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:12px}
.template-save{display:flex;flex-wrap:wrap;align-items:center;gap:14px}

/* Feature 17 — the follow-up list. */
.followup-ages{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:-6px 0 18px;color:var(--muted,#78705f);font-size:.82rem}
.chip{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border:1px solid var(--line,#e6ddcd);border-radius:999px;background:var(--surface,#fff);color:var(--ink,#211d18);font:inherit;font-size:.82rem;text-decoration:none;cursor:pointer}
.chip.active{border-color:var(--brand,#21503e);color:var(--brand,#21503e);font-weight:600}
.followup-table td:first-child small,.followup-table td:nth-child(2) small{display:block;color:var(--muted,#78705f);font-size:.74rem;margin-top:3px;white-space:nowrap}
.nudged{color:#b8862f}
.followup-note{margin-top:18px}
.nudge-preview{margin:10px 0 14px;padding:14px 16px;background:#f8f9fb;border:1px solid var(--line,#e6ddcd);border-radius:10px;white-space:pre-wrap;font:inherit;font-size:.88rem;line-height:1.5}

/* Feature 23 — customer tags and the loyalty meter. */
.customer-tagbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 18px;font-size:.82rem;color:var(--muted,#78705f)}
.customer-tagbar .button{margin-left:auto}
.customer-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.customer-tags em{font-style:normal;padding:3px 9px;background:#f4f3ff;color:#5925dc;border-radius:999px;font-size:.72rem;font-weight:600}
.customer-crm{display:grid;grid-template-columns:1.1fr .9fr;gap:24px;margin-top:20px}
.crm-tags h2,.crm-loyalty h2{margin-top:0}
.crm-form{display:grid;gap:12px;max-width:420px}
.crm-form textarea{width:100%;padding:11px 12px;border:1px solid var(--line,#e6ddcd);border-radius:9px;font:inherit}
.crm-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.crm-chips form{margin:0}
.loyalty-meter{height:10px;background:#f2f4f7;border-radius:999px;overflow:hidden;margin:14px 0 10px}
.loyalty-meter span{display:block;height:100%;background:var(--brand,#21503e)}
@media(max-width:820px){.customer-crm{grid-template-columns:1fr}.customer-tagbar .button{margin-left:0}}

/* Feature 30 — the export screen. */
.export-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:20px}
.export-card{display:flex;flex-direction:column;gap:10px}
.export-card h2{margin:0}
.export-form{display:grid;gap:10px;margin-top:auto}
.export-form .button{justify-self:start}
.export-columns{display:grid;gap:12px;margin:12px 0 0}
.export-columns div{display:grid;grid-template-columns:140px 1fr;gap:14px;padding-bottom:12px;border-bottom:1px solid var(--line,#e6ddcd)}
.export-columns dt{font-weight:700}
.export-columns dd{margin:0;color:var(--muted,#78705f);line-height:1.5}
@media(max-width:900px){.export-grid{grid-template-columns:1fr}.export-columns div{grid-template-columns:1fr;gap:4px}}

/* The storefront notice that confirms a save, so the shopper sees something happened even when the
   page does not reload. */
.store-toast.show{opacity:1;transform:translateY(0)}
.saved-reward{display:flex;justify-content:space-between;gap:12px;color:#027a48;font-weight:600;margin-bottom:6px}
