/* The public example's page (exemplo.js): the two phones and the guided tour, in Pronto's colours
   (app.css). On a computer the phones stand side by side; on a phone, one at a time, the switch on
   top. Inside a site's page it takes that page's background; opened by itself, the app's. */
:root {
  --bg: #EDF1EE;
  --card: #fff;
  --ink: #121614;
  --text: #2B3530;
  --muted: #59655F;
  --line: #D8E0DA;
  --green: #0B6B4C;
  --green-deep: #08513A;
  --lime: #D6F26A;
  --lime-press: #C4E255;
  --focus: rgba(11, 107, 76, 0.45);
}
* { box-sizing: border-box; }
html { background: transparent; }
html.alone { background: var(--bg); }
body { margin: 0; color: var(--ink); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; }
button { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.ex { display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 100svh; padding: 12px 16px 16px; }
.ex-wait { margin: 40vh 0 0; color: var(--muted); text-align: center; }
.ex-note { max-width: 420px; margin: 30vh auto 0; text-align: center; }
.ex-note p { margin: 0 0 14px; color: var(--text); }

/* The buttons, as the app's */
.ex-btns { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: center; }
.ex-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 12px; background: var(--lime); color: var(--ink); font-weight: 700; text-decoration: none; cursor: pointer; }
.ex-btn:active { background: var(--lime-press); }
.ex-btn.ghost { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.ex-link { min-height: 44px; padding: 10px 4px; border: 0; background: none; color: var(--green); font-weight: 600; text-decoration: none; cursor: pointer; }

/* The top: the switch between the phones (a phone only) and "Quero uma assim" */
.ex-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; max-width: 860px; }
.ex-switch { display: flex; flex: 1; max-width: 340px; padding: 3px; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.ex-switch button { flex: 1; min-height: 40px; padding: 6px 8px; border: 0; border-radius: 9px; background: none; font-weight: 700; cursor: pointer; }
.ex-switch button small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.ex-switch button[aria-pressed="true"] { background: var(--green); color: #fff; }
.ex-switch button[aria-pressed="true"] small { color: #CFE5DB; }
.ex-switch button.pulse { animation: ex-pulse 1.4s ease-in-out infinite; }
.want { flex: none; min-height: 40px; padding: 8px 14px; }
@keyframes ex-pulse { 50% { box-shadow: 0 0 0 4px var(--lime); } }
@media (prefers-reduced-motion: reduce) { .ex-switch button.pulse { animation: none; box-shadow: 0 0 0 3px var(--lime); } }

/* The tour */
.ex-tour { width: 100%; max-width: 560px; }
.ex-tour:has(> .ex-link) { text-align: center; }
.ex-tour:not(:has(> .ex-link)) { padding: 12px 14px 14px; border-radius: 16px; background: var(--card); box-shadow: 0 1px 2px rgba(18, 22, 20, 0.06), 0 6px 20px rgba(18, 22, 20, 0.07); }
.ex-tour p { margin: 0 0 10px; color: var(--text); }
.ex-tour .tour-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -4px -6px 2px 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.ex-tour .tour-head.end { margin-bottom: 6px; }
.ex-tour .tour-title { margin: 0 0 4px; color: var(--ink); font-size: 17px; font-weight: 700; }
.ex-tour .tour-head.end .tour-title { margin: 0; }
.ex-tour .x { width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.ex-tour .ex-btns { justify-content: flex-start; }

/* The phones: the app itself, each in its frame */
.ex-phones { display: flex; gap: 28px; justify-content: center; width: 100%; }
.ex-phone { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0; }
.ex-phone figcaption { color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; }
.ex-screen { width: 375px; height: min(760px, calc(100svh - 260px)); min-height: 520px; overflow: hidden; border: 10px solid #151a17; border-radius: 42px; background: var(--bg); box-shadow: 0 12px 40px rgba(18, 22, 20, 0.16); }
.ex-screen iframe { display: block; width: 100%; height: 100%; border: 0; }
.ex-phone.spot .ex-screen { box-shadow: 0 0 0 4px var(--lime), 0 12px 40px rgba(18, 22, 20, 0.16); }
.ex-foot { margin: 0; }

.ex-toast { position: fixed; left: 50%; bottom: 20px; z-index: 5; max-width: calc(100% - 32px); margin: 0; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: #fff; transform: translateX(-50%); }

/* A computer: both phones, no switch */
@media (min-width: 820px) {
  .ex-switch { display: none; }
  .ex-top { justify-content: center; }
}
/* A phone: one phone at a time, the whole width, without the phone's frame */
@media (max-width: 819.98px) {
  .ex { padding: 8px 0 12px; gap: 8px; }
  .ex-top, .ex-tour { padding: 0 12px; }
  .ex-tour:not(:has(> .ex-link)) { width: calc(100% - 24px); padding: 10px 12px 12px; }
  .ex-tour p { margin-bottom: 8px; font-size: 14px; }
  .ex-tour .tour-title { font-size: 16px; }
  .ex-phones[data-on="equipa"] .ex-phone[data-side="patrao"], .ex-phones[data-on="patrao"] .ex-phone[data-side="equipa"] { display: none; }
  .ex-phone { width: 100%; }
  .ex-phone figcaption { display: none; }
  .ex-screen { width: 100%; height: calc(100svh - 200px); min-height: 480px; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
}
