/* Styles for features added after the prototype (reviews, rescheduling,
   calendar export, saved address, letter text, loading states, artwork).
   Uses only the prototype's tokens so pages keep the original look. */

/* Buttons that act on something risky. */
.mini-cta.danger,
.btn.danger {
  color: var(--red);
}
.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 560px) {
  .btn-row {
    grid-template-columns: 1fr;
  }
}

/* Booking sheet: saved contact details. */
.bk-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.bk-contact .tx {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.bk-contact .tx b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bk-contact .tx > span:last-child {
  color: var(--muted);
  font-size: 13px;
}
.bk-contact .eyebrow {
  margin: 0;
}

/* Booking detail: add to calendar. */
.bk-cal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.bk-cal > span:last-child {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bk-cal .mini-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

/* Reviews. */
.stars {
  display: inline-flex;
  gap: 1px;
  font-size: 13px;
  line-height: 1;
}
.stars i {
  font-style: normal;
  color: var(--line);
}
.stars i.on {
  color: var(--gold);
}
.bk-reviewed {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.rate-pick {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.rate-pick button {
  width: 48px;
  height: 48px;
  border-radius: var(--r-sm);
  font-size: 28px;
  line-height: 1;
  color: var(--line);
  background: var(--surface-2);
}
.rate-pick button.on {
  color: var(--gold);
  background: var(--gold-soft);
}
.rate-hint {
  text-align: center;
}

/* Me: the appearance switch is a small segmented control. */
.me-row-stack {
  flex-wrap: wrap;
  gap: 8px;
}
.seg.seg-sm {
  width: auto;
}
.seg.seg-sm button {
  padding: 6px 12px;
  font-size: 13px;
}

/* Companion reply arriving word by word. */
.bub.streaming::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  border-radius: 2px;
  background: var(--red);
  animation: caret 1s steps(2) infinite;
}
@keyframes caret {
  50% {
    opacity: 0;
  }
}

/* Formatted AI text in letters and chat. */
.md > * + * {
  margin-top: 10px;
}
.md p {
  margin: 0;
  line-height: 1.55;
}
.md .md-h {
  margin: 16px 0 0;
  font-size: 15px;
  font-weight: 700;
}
.md .md-h:first-child {
  margin-top: 0;
}
.md ul,
.md ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
}
.md ul.md-check {
  list-style: none;
  padding-left: 0;
}
.md-check li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.md-box {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1.5px solid var(--line);
  border-radius: 5px;
}
.md-check li.on .md-box {
  background: var(--good);
  border-color: var(--good);
}
.md code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 0.92em;
}
.md-table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.md-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.md-table th,
.md-table td {
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line);
}
.md-table thead th {
  border-top: 0;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

/* Loading placeholders inside sheets. */
.skel-list {
  display: grid;
  gap: 10px;
}
.skel {
  display: block;
  height: 56px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  animation: skel 1.1s ease-in-out infinite alternate;
}
@keyframes skel {
  to {
    opacity: 0.45;
  }
}
@media (prefers-reduced-motion: reduce) {
  .skel,
  .bub.streaming::after {
    animation: none;
  }
}
#mbody .li.unread .tx b::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--red);
  vertical-align: 2px;
}

/* Today: the first-weeks checklist follows the plan list style. */
.firstweek-head {
  margin-top: 4px;
}

/* ---------- Artwork ---------- */
/* Today: the Europe skyline along the bottom of the greeting band. */
.band-pano {
  margin: 14px calc(-1 * clamp(20px, 4vw, 48px)) -52px;
  pointer-events: none;
}
.band-pano .eu-pano {
  background: transparent;
}
.band-pano .eu-pano svg {
  max-height: 190px;
}

/* Other pages: a faded city skyline closes the page. It sits in the page
   flow, so short pages don't scroll and long pages never cover text. */
.main {
  position: relative;
  isolation: isolate;
}
.content:has(+ .page-mark) {
  padding-bottom: 12px !important;
}
.page-mark {
  position: relative;
  z-index: -1;
  margin-top: auto;
  padding-top: 8px;
  opacity: 0.3;
  pointer-events: none;
}
.page-mark .eu-pano {
  background: transparent;
}
.page-mark svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 30vh;
}
@media (max-width: 900px) {
  .page-mark {
    margin-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    opacity: 0.25;
  }
}
@media print {
  .page-mark,
  .band-pano {
    display: none;
  }
}
