/* ============================================================
   DTM Bio — Linktree-style "link in bio" page (mobile-first)
   Branded per establishment. Includes real booking + menu /
   room previews, not just dumb links.
   ============================================================ */

:root {
  /* Tokens default — overridden inline per establishment */
  --bio-bg: #FBF8F2;
  --bio-bg-warm: #F4EEE3;
  --bio-ink: #1A1614;
  --bio-ink-soft: #4D453F;
  --bio-muted: #8A7F75;
  --bio-line: #E5DCCD;
  --bio-brand: #2E4F3E;
  --bio-accent: #B8884C;
}

body.bio-page {
  background: linear-gradient(180deg, var(--bio-bg) 0%, var(--bio-bg-warm) 100%);
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--bio-ink);
  -webkit-font-smoothing: antialiased;
}

/* ─── Layout (mobile-first, max 460px) ────────────── */
.bio {
  width: 100%; max-width: 460px;
  margin: 0 auto; padding: 0 0 80px;       /* no horizontal padding — children pad themselves */
  position: relative;
}

/* ─── Hero / brand ────────────────────────────────── */
.bio__hero {
  text-align: center; margin-bottom: 24px;
}
.bio__cover {
  width: 100%; aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-bottom: 18px; box-shadow: var(--shadow-md);
  /* No border-radius — edge-to-edge like Instagram cover */
}
.bio__cover img { width: 100%; height: 100%; object-fit: cover; }
/* Re-pad text content (centered with consistent inset) */
.bio__name, .bio__sub, .bio__status, .bio__stats { padding-left: 16px; padding-right: 16px; }

.bio__avatar {
  width: 76px; height: 76px; border-radius: 50%;
  border: 4px solid var(--bio-bg); margin: -56px auto 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bio-ink); color: var(--bio-bg);
  font-family: var(--font-serif); font-style: italic; font-size: 1.8rem;
  box-shadow: var(--shadow-md); position: relative; z-index: 2;
}
.bio__name {
  font-family: var(--font-serif); font-size: clamp(1.2rem, 5.5vw, 1.5rem); line-height: 1.2;
  margin: 0 0 4px; word-wrap: break-word; overflow-wrap: break-word;
}
.bio__sub {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em;
  color: var(--bio-muted);
}
.bio__verified {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 4px; vertical-align: 1px;
  width: 14px; height: 14px; border-radius: 50%; background: #1DA1F2;
  color: #fff; font-size: 0.6rem; justify-content: center;
}

/* ─── Status pill (open / closed) ─────────────────── */
.bio__status {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 14px auto 0;
  padding: 6px 14px; border-radius: var(--r-pill);
  background: rgba(46, 79, 62, 0.12); color: var(--bio-brand);
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.04em;
}
.bio__status--open .dot { width: 8px; height: 8px; border-radius: 50%; background: #34D399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); animation: bio-pulse 1.6s infinite; }
@keyframes bio-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* ─── Stats row (rating, count) ───────────────────── */
.bio__stats {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 6px 18px;
  margin-top: 14px;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--bio-ink-soft);
}
.bio__stats span {
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap;
}

/* ─── Primary action buttons (the big ones) ──────── */
.bio__actions {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 28px;
  padding: 0 16px;
}
.bio-action {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px;
  background: #fff; border: 1px solid var(--bio-line);
  border-radius: var(--r-md);
  font-size: 1rem; font-weight: 600; color: var(--bio-ink);
  transition: all var(--t-fast); position: relative;
  text-align: left; width: 100%; cursor: pointer;
}
.bio-action:hover, .bio-action:focus-visible {
  border-color: var(--bio-ink); transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.bio-action__icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: var(--r-sm);
  background: var(--bio-bg-warm); color: var(--bio-brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
}
.bio-action__main { flex: 1; min-width: 0; }
.bio-action__label { display: block; }
.bio-action__sub {
  display: block; margin-top: 2px;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.04em;
  color: var(--bio-muted); font-weight: 400;
}
.bio-action__chevron { color: var(--bio-muted); font-size: 1.2rem; }

/* primary variant — accent CTA */
.bio-action--primary {
  background: var(--bio-ink); color: var(--bio-bg); border-color: var(--bio-ink);
}
.bio-action--primary:hover { background: var(--bio-brand); border-color: var(--bio-brand); }
.bio-action--primary .bio-action__icon { background: rgba(255,255,255,0.12); color: var(--bio-bg); }
.bio-action--primary .bio-action__sub { color: rgba(255,255,255,0.7); }
.bio-action--primary .bio-action__chevron { color: var(--bio-bg); }

/* accent variant */
.bio-action--accent {
  background: var(--bio-accent); color: #fff; border-color: var(--bio-accent);
}
.bio-action--accent .bio-action__icon { background: rgba(255,255,255,0.18); color: #fff; }
.bio-action--accent .bio-action__sub { color: rgba(255,255,255,0.8); }
.bio-action--accent .bio-action__chevron { color: #fff; }

/* ─── Secondary links (smaller) ───────────────────── */
.bio__sec {
  margin-top: 20px;
  display: flex; flex-direction: column; gap: 6px;
  padding: 0 16px;
}
.bio-sec {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: var(--r-sm);
  font-size: 0.92rem; color: var(--bio-ink-soft); transition: background var(--t-fast);
}
.bio-sec:hover { background: rgba(255,255,255,0.7); color: var(--bio-ink); }
.bio-sec__chevron { color: var(--bio-muted); font-family: var(--font-mono); font-size: 0.8rem; }

/* ─── Section header (between groups) ─────────────── */
.bio__heading {
  margin: 32px 0 12px; padding: 0 24px;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em;
  color: var(--bio-muted); text-transform: uppercase;
}

/* ─── Date picker (booking strip) ─────────────────── */
.bio-booking {
  margin-top: 18px; padding: 16px;
  background: #fff; border: 1px solid var(--bio-line); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.bio-booking__title {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em;
  color: var(--bio-muted); text-transform: uppercase; margin-bottom: 12px;
}
.bio-booking__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.bio-booking__row--3 { grid-template-columns: 1fr 1fr 1fr; }
.bio-booking__field { display: flex; flex-direction: column; gap: 2px; }
.bio-booking__field label {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em;
  color: var(--bio-muted); text-transform: uppercase;
}
.bio-booking__field input, .bio-booking__field select {
  padding: 9px 10px; border: 1px solid var(--bio-line); border-radius: var(--r-sm);
  font-size: 0.92rem; background: var(--bio-bg); outline: none;
  transition: border-color var(--t-fast);
}
.bio-booking__field input:focus, .bio-booking__field select:focus { border-color: var(--bio-ink); }
.bio-booking__cta {
  width: 100%; padding: 14px; margin-top: 8px;
  background: var(--bio-ink); color: var(--bio-bg);
  border-radius: var(--r-sm); font-weight: 600; font-size: 0.96rem;
  transition: all var(--t-fast); cursor: pointer;
}
.bio-booking__cta:hover { background: var(--bio-brand); }

/* ─── Room cards mini (hotels) ────────────────────── */
.bio-rooms {
  display: flex; gap: 12px; margin-top: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
  padding-bottom: 6px;
}
.bio-rooms::-webkit-scrollbar { display: none; }
.bio-room {
  flex: 0 0 70%; scroll-snap-align: start;
  background: #fff; border: 1px solid var(--bio-line); border-radius: var(--r-md);
  overflow: hidden; cursor: pointer; transition: transform var(--t-fast);
}
.bio-room:hover { transform: translateY(-3px); }
.bio-room__img { aspect-ratio: 4 / 3; overflow: hidden; }
.bio-room__img img { width: 100%; height: 100%; object-fit: cover; }
.bio-room__body { padding: 12px 14px; }
.bio-room__name {
  font-family: var(--font-serif); font-size: 1rem; margin-bottom: 4px;
}
.bio-room__price {
  font-family: var(--font-mono); font-size: 0.84rem; color: var(--bio-brand);
}
.bio-room__price small { color: var(--bio-muted); margin-left: 4px; font-size: 0.7rem; }

/* ─── Modal (menu / room detail / availability) ──── */
.bio-modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 14, 6, 0.7); backdrop-filter: blur(6px);
  display: none; align-items: flex-end; justify-content: center;
  animation: bio-fade 0.3s ease;
}
.bio-modal.is-open { display: flex; }
@keyframes bio-fade { from { opacity: 0; } to { opacity: 1; } }

.bio-modal__sheet {
  width: 100%; max-width: 460px; max-height: 88vh;
  background: var(--bio-bg);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  display: flex; flex-direction: column;
  animation: bio-slide-up 0.32s cubic-bezier(.34,1.56,.64,1);
  overflow: hidden;
}
@keyframes bio-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

.bio-modal__head {
  padding: 20px 22px 16px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--bio-line);
}
.bio-modal__title { font-family: var(--font-serif); font-size: 1.3rem; }
.bio-modal__close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bio-bg-warm);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.9rem; cursor: pointer; transition: background var(--t-fast);
}
.bio-modal__close:hover { background: var(--bio-line); }

.bio-modal__body {
  padding: 18px 22px 22px;
  overflow-y: auto;
  flex: 1;
}

/* ─── Footer (contact strip) ──────────────────────── */
.bio__foot {
  margin: 36px 16px 0; padding-top: 20px;
  border-top: 1px solid var(--bio-line);
  text-align: center;
  color: var(--bio-muted);
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
}
.bio__foot p { margin: 4px 0; }
.bio__foot strong { color: var(--bio-ink); font-family: var(--font-sans); font-weight: 500; font-size: 0.84rem; letter-spacing: 0; }

.bio__powered {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 0.7rem; opacity: 0.6;
}
.bio__powered a { color: var(--bio-brand); text-decoration: underline; }

/* ─── Demo banner (DTM Medias) ───────────────────── */
.bio-demo-banner {
  position: sticky; top: 0; z-index: 90;
  background: var(--c-ink, #1A1614); color: #fff;
  padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.04em;
}
/* Hide demo banner when page is embedded in an iframe (e.g. landing preview) */
body.is-embedded .bio-demo-banner { display: none; }
.bio-demo-banner__left { display: flex; align-items: center; gap: 8px; }
.bio-demo-banner__dot { width: 7px; height: 7px; border-radius: 50%; background: #34D399; animation: bio-pulse 1.6s infinite; }
.bio-demo-banner__cta {
  padding: 5px 12px; background: #fff; color: var(--c-ink, #1A1614);
  border-radius: var(--r-pill); font-weight: 600;
}

/* ─── Mobile-frame wrapper (for desktop preview only) ─── */
.bio-frame {
  width: 100%; max-width: 460px; margin: 40px auto;
  background: #1A1614; border-radius: 36px; padding: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.bio-frame__inner {
  background: var(--bio-bg); border-radius: 24px;
  height: 84vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
@media (max-width: 540px) {
  .bio-frame { max-width: none; padding: 0; border-radius: 0; box-shadow: none; }
  .bio-frame__inner { border-radius: 0; height: auto; }
}
