/* Add to trip on the guides (assets/trip.js). Buttons are absolute, the pill and toast fixed: nothing shifts. */
.tbt-host { position: relative; }

.tbt-save {
  position: absolute; z-index: 5; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 999px;
  background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; line-height: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .28); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.tbt-save::before { content: ""; position: absolute; inset: -3px; border-radius: inherit; } /* 46px tap area */
.tbt-save:hover { background: var(--accent-soft); }
.tbt-save:focus-visible, .tbt-pill:focus-visible, .tbt-toast a:focus-visible, .tbt-toast button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.tbt-save svg { display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tbt-save .tbt-c, .tbt-save[aria-pressed="true"] .tbt-p { display: none; }
.tbt-save[aria-pressed="true"] .tbt-c { display: inline; }
.tbt-save[aria-pressed="true"] { background: var(--accent); color: #fff; }

.tbt-save--card { top: 8px; right: 8px; opacity: 0; }
.tbt-save--card.is-placed { opacity: 1; }
.tbt-save--page, .tbt-save--chip { width: auto; padding: 0 16px 0 12px; height: 40px; }
.tbt-save--page { top: 16px; right: 16px; z-index: 6; opacity: 0; }
.tbt-save--page.is-placed { opacity: 1; }
.tbt-save--chip { display: none; z-index: 20; white-space: nowrap; }
.tbt-save--chip.is-on { display: inline-flex; }

/* Pill: bottom left, above the phone guide button and the eSIM strip where they exist. */
:root { --tbt-b: calc(16px + env(safe-area-inset-bottom)); }
.tbt-pill {
  position: fixed; left: 16px; bottom: var(--tbt-b); z-index: 55; display: inline-flex; align-items: center; gap: 10px;
  max-width: min(260px, calc(100vw - 32px)); min-height: 44px; padding: 0 8px 0 16px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-size: 13.5px; font-weight: 600; text-decoration: none;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .45);
}
.tbt-pill[hidden] { display: none; }
.tbt-pill span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbt-pill i {
  flex: none; min-width: 28px; height: 28px; padding: 0 8px; box-sizing: border-box; border-radius: 999px;
  background: var(--accent); color: #fff; font-style: normal; font-family: var(--mono); font-size: 12px; font-weight: 500;
  display: inline-grid; place-items: center;
}

.tbt-toast {
  position: fixed; left: 16px; bottom: calc(var(--tbt-b) + 56px); z-index: 75; display: flex; align-items: center; gap: 4px 14px;
  flex-wrap: wrap; max-width: min(440px, calc(100vw - 32px)); padding: 10px 14px; border-radius: 12px;
  background: var(--ink); color: var(--paper); font-size: 14px; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5);
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .25s, transform .25s;
}
.tbt-toast.is-on { opacity: 1; transform: none; pointer-events: auto; }
.tbt-toast b { font-weight: 500; }
.tbt-toast a, .tbt-toast button {
  min-height: 44px; display: inline-flex; align-items: center; padding: 0; border: 0; background: none; color: var(--paper);
  font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

@media (max-width: 899px) {
  body[data-hub] { --tbt-b: calc(72px + env(safe-area-inset-bottom)); } /* above the guide button */
  .tbt-toast { left: 12px; right: 12px; max-width: none; }
}
@media (max-width: 560px) {
  :root:has(.tb-offer.is-shown) { --tbt-b: calc(184px + env(safe-area-inset-bottom)); } /* above the eSIM strip (up to 170px tall at 320px wide) */
}
@media (prefers-reduced-motion: reduce) { .tbt-toast { transition: none; } }
@media print { .tbt-save, .tbt-pill, .tbt-toast { display: none; } }
