/* Istockhomes Live — Phase 1 platform shell
   Visual language aligned with Istockhomes maturity (navy / cream / gold).
   Not WomanWise branding. Mobile-responsive. Minimal JS. */

:root {
  --live-navy: #243b56;
  --live-navy-deep: #1a2f45;
  --live-cream: #ebe4d8;
  --live-cream-light: #f6f3ed;
  --live-marble: #faf9f6;
  --live-text: #2a3140;
  --live-muted: #6b7480;
  --live-gold: #b8944f;
  --live-card: #ffffff;
  --live-line: rgba(36, 59, 86, 0.08);
  --live-danger: #8b3a3a;
  --live-ok: #2f6b4f;
  --live-radius: 10px;
  /* Match App2 .app2-wrap */
  --live-max: 1120px;
  --live-chrome-max: 1120px;
  --brand-accent: var(--live-gold);
  --brand-header-bg: #ffffff;
  --live-font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  --live-display: Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.live-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--live-font);
  color: var(--live-text);
  background:
    radial-gradient(ellipse 120% 70% at 50% -15%, rgba(255, 255, 255, 0.85), transparent 55%),
    #f4f1eb;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

.live-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--live-navy);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.live-skip:focus {
  left: 0.75rem;
  top: 0.75rem;
}

/* Match App2 .app2-wrap */
.live-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px;
  width: 100%;
  box-sizing: border-box;
}

/* =========================================================
   LIVE HEADER — App2 brand-shell language (menu.php / header.php)
   Logo ≈ 2× App2. No sticky / fixed.
========================================================= */
.brand-shell {
  background: var(--live-marble);
  border-bottom: 1px solid var(--live-line);
  position: relative;
}

.brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: clamp(24px, 4vw, 42px);
  padding-bottom: clamp(16px, 2.5vw, 28px);
  text-align: center;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex: 0 0 auto;
  max-width: 100%;
  overflow: hidden;
}

/* App2: max-height 90px / 64px mobile → Live ≈ 2× */
.brand-mark img.logo,
.brand-mark .logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 180px;
  max-width: min(840px, 90vw);
  object-fit: contain;
  object-position: center;
}

.brand-title {
  display: grid;
  gap: 4px;
  justify-items: center;
  color: var(--live-muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.brand-title .brand-name {
  color: var(--live-navy-deep);
  font-family: var(--live-display);
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.live-wordmark {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brand-accent, var(--live-gold));
}

/* Discreet utilities — not a dominant top strip */
.live-header-utils {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.75rem;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--live-muted);
}

.live-phase-label,
.live-user-chip {
  font-size: 0.78rem;
  color: var(--live-muted);
}

.live-user-chip {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-util-link {
  color: var(--live-navy);
  text-decoration: none;
  font-size: 0.78rem;
  border-bottom: 1px solid transparent;
}

.live-util-link:hover {
  border-bottom-color: rgba(36, 59, 86, 0.25);
}

.live-business-menu {
  position: relative;
}

.live-business-menu__summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--live-muted);
  border: 0;
  background: transparent;
  padding: 0;
  line-height: 1.25;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.live-business-menu__summary::-webkit-details-marker {
  display: none;
}

.live-business-menu__panel {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 0.35rem);
  z-index: 40;
  min-width: 12rem;
  padding: 0.65rem;
  border: 1px solid var(--live-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(20, 35, 55, 0.12);
  text-align: left;
}

.live-business-menu__label {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--live-muted);
}

.live-business-menu__list {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}

.live-business-menu__list button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  color: var(--live-navy);
  cursor: pointer;
  font: inherit;
}

.live-business-menu__list button:hover,
.live-business-menu__list button[aria-current="true"] {
  background: rgba(36, 59, 86, 0.08);
}

.live-business-menu__list button[aria-current="true"] {
  font-weight: 600;
}

.live-business-menu__link {
  display: block;
  text-decoration: none;
  color: var(--live-navy);
  font-size: 0.88rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
}

.live-business-menu__link:hover {
  background: rgba(36, 59, 86, 0.08);
}

.live-nav {
  padding-top: 0;
  padding-bottom: 18px;
  overflow-x: auto;
  border-top: 1px solid rgba(36, 59, 86, 0.06);
}

.live-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.65rem 0 0;
  display: flex;
  gap: 0.25rem 0.15rem;
  justify-content: center;
  flex-wrap: wrap;
}

.live-nav a {
  display: inline-block;
  text-decoration: none;
  color: var(--live-navy);
  font-size: 0.92rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
}

.live-nav a[aria-current="page"],
.live-nav a:hover {
  background: rgba(36, 59, 86, 0.08);
}

.live-nav a[aria-current="page"] {
  font-weight: 600;
  color: var(--live-navy-deep);
}

@media (max-width: 720px) {
  .brand-header {
    gap: 10px;
    padding-top: 22px;
    padding-bottom: 16px;
  }

  .brand-mark img.logo,
  .brand-mark .logo {
    max-height: 128px;
    max-width: min(520px, 88vw);
  }

  .brand-title {
    font-size: 0.82rem;
  }

  .brand-title .brand-name {
    font-size: 1.28rem;
  }
}

.live-main {
  flex: 1 0 auto;
  width: 100%;
  /* .live-wrap supplies App2 max-width + 16px padding */
  padding-top: 8px;
  padding-bottom: 2.5rem;
}

.live-hero {
  margin-bottom: 1.75rem;
  animation: live-fade-up 0.55s ease both;
}

.live-hero h1 {
  margin: 0 0 0.5rem;
  font-family: var(--live-display);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.6rem);
  color: var(--live-navy-deep);
  letter-spacing: 0.01em;
}

.live-hero p,
.live-lead {
  margin: 0;
  color: var(--live-muted);
  font-size: 1.05rem;
  max-width: 40rem;
}

.live-panel {
  background: var(--live-card);
  border: 1px solid var(--live-line);
  border-radius: var(--live-radius);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.15rem;
  animation: live-fade-up 0.6s ease both;
}

.live-panel + .live-panel {
  animation-delay: 0.06s;
}

.live-panel h2 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  color: var(--live-navy-deep);
}

.live-panel h3 {
  margin: 1rem 0 0.35rem;
  font-size: 1rem;
  color: var(--live-navy);
}

.live-panel p {
  margin: 0.35rem 0;
  color: var(--live-text);
}

.live-muted {
  color: var(--live-muted) !important;
}

.live-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.live-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.live-btn:hover {
  transform: translateY(-1px);
}

.live-btn:focus-visible {
  outline: 2px solid var(--live-gold);
  outline-offset: 2px;
}

.live-btn-primary {
  background: var(--live-navy);
  color: #fff;
  box-shadow: 0 8px 20px rgba(26, 47, 69, 0.18);
}

.live-btn-primary:hover {
  background: var(--live-navy-deep);
}

.live-btn-secondary {
  background: #fff;
  color: var(--live-navy);
  border-color: rgba(36, 59, 86, 0.22);
}

.live-btn-secondary:hover {
  border-color: var(--live-gold);
}

.live-btn-ghost {
  background: transparent;
  color: var(--live-navy);
  border-color: transparent;
}

.live-btn-compact {
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
}

.live-btn-danger {
  background: #fff;
  color: var(--live-danger);
  border-color: rgba(139, 58, 58, 0.35);
}

.live-btn:disabled,
.live-btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* =========================================================
   Phase 2B.1 — local camera / microphone stage
========================================================= */
.live-stage-panel {
  scroll-margin-top: 1rem;
}

.live-stage {
  margin-top: 1rem;
}

.live-stage__frame {
  position: relative;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #0f1720;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(36, 59, 86, 0.18);
  box-shadow: 0 14px 36px rgba(26, 47, 69, 0.12);
}

.live-stage__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0f1720;
  transform: scaleX(-1); /* mirrored preview only — stream unchanged */
}

.live-stage__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 1.25rem;
  text-align: center;
  color: rgba(243, 239, 230, 0.82);
  font-size: 1.05rem;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(36, 59, 86, 0.35), rgba(15, 23, 32, 0.92));
}

.live-stage__placeholder[hidden] {
  display: none !important;
}

.live-stage__status {
  margin: 0.85rem auto 0;
  max-width: 880px;
  text-align: center;
  font-size: 0.98rem;
  color: var(--live-navy-deep);
  font-weight: 600;
}

.live-stage__controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin: 1rem auto 0;
  max-width: 880px;
}

.live-stage__controls .live-btn {
  min-height: 2.85rem;
  min-width: 8.5rem;
}

.live-stage-panel.is-connected .live-stage__frame {
  border-color: rgba(47, 107, 79, 0.45);
}

.live-stage-panel.is-mic-muted .live-stage__status::after,
.live-stage-panel.is-camera-off .live-stage__status::after {
  content: none;
}

@media (max-width: 640px) {
  .live-stage__frame {
    aspect-ratio: 4 / 3;
    border-radius: 10px;
  }

  .live-stage__controls .live-btn {
    flex: 1 1 calc(50% - 0.65rem);
    min-width: 0;
  }
}

.live-choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

@media (min-width: 640px) {
  .live-choice-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.live-choice {
  display: block;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, #fff, var(--live-marble));
  border: 1px solid var(--live-line);
  border-radius: var(--live-radius);
  padding: 1.35rem 1.25rem;
  min-height: 9.5rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.live-choice:hover,
.live-choice:focus-visible {
  border-color: rgba(184, 148, 79, 0.55);
  box-shadow: 0 10px 24px rgba(36, 59, 86, 0.08);
  outline: none;
}

.live-choice strong {
  display: block;
  font-size: 1.2rem;
  color: var(--live-navy-deep);
  margin-bottom: 0.35rem;
}

.live-choice span {
  color: var(--live-muted);
  font-size: 0.95rem;
}

.live-form label {
  display: block;
  font-weight: 600;
  color: var(--live-navy-deep);
  margin-bottom: 0.35rem;
}

.live-form textarea,
.live-form input[type="text"],
.live-form input[type="datetime-local"],
.live-form select {
  width: 100%;
  max-width: 40rem;
  font: inherit;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(36, 59, 86, 0.2);
  border-radius: 8px;
  background: #fff;
  color: var(--live-text);
}

.live-form textarea {
  min-height: 7rem;
  resize: vertical;
}

.live-form .live-field {
  margin-bottom: 1rem;
}

.live-notice {
  border-left: 3px solid var(--live-gold);
  padding: 0.75rem 1rem;
  background: rgba(184, 148, 79, 0.08);
  border-radius: 0 8px 8px 0;
  margin: 1rem 0;
}

.live-notice-ok {
  border-left-color: var(--live-ok);
  background: rgba(47, 107, 79, 0.08);
}

.live-notice-warn {
  border-left-color: #a07020;
}

.live-workflow-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.live-workflow-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--live-line);
  border-radius: 8px;
  background: var(--live-marble);
}

.live-workflow-list .live-action-label {
  font-weight: 600;
  color: var(--live-navy-deep);
}

.live-share-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

@media (min-width: 700px) {
  .live-share-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.live-share-item {
  border: 1px dashed rgba(36, 59, 86, 0.2);
  border-radius: 8px;
  padding: 0.85rem;
  background: #fff;
}

.live-share-item strong {
  display: block;
  color: var(--live-navy);
  margin-bottom: 0.25rem;
}

.live-code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  background: var(--live-navy-deep);
  color: #f3efe6;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-top: 0.45rem;
}

.live-footer {
  margin-top: auto;
  border-top: 3px solid var(--live-gold);
  background:
    radial-gradient(900px 280px at 12% 0%, rgba(184, 148, 79, 0.18), transparent 55%),
    linear-gradient(180deg, #1f3550 0%, #152536 100%);
  color: #e8eef5;
}

.live-footer--trust {
  /* Istockhomes trust layer — distinct from business header identity */
}

.live-footer-inner {
  /* .live-wrap supplies App2 max-width 1120px + 16px padding */
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.live-trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 800px) {
  .live-trust-grid {
    grid-template-columns: 1.15fr 1.25fr 1fr;
    gap: 1.75rem;
  }
}

.live-trust-col--brand {
  text-align: center;
}

@media (min-width: 800px) {
  .live-trust-col--brand {
    text-align: left;
  }
}

.live-footer-badge {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(184, 148, 79, 0.45);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.live-footer-badge img {
  display: block;
  height: clamp(3rem, 8vw, 3.75rem);
  width: auto;
  max-width: 14rem;
}

.live-trust-heading {
  margin: 0 0 0.65rem;
  font-family: var(--live-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: #f4e7c8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-trust-status {
  margin: 0 0 0.55rem;
  font-family: var(--live-display);
  font-size: 1.2rem;
  color: #f3efe6;
}

.live-trust-status.is-on {
  color: #9dcea8;
}

.live-trust-status.is-off {
  color: #e0a0a0;
}

.live-trust-status.is-warn {
  color: #e0c27a;
}

.live-trust-cert-link {
  display: inline-block;
  margin-top: 0.15rem;
  color: var(--live-gold);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(184, 148, 79, 0.45);
}

.live-trust-cert-link:hover {
  color: #d4b56e;
  border-bottom-color: #d4b56e;
}

.live-trust-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.live-trust-facts li {
  display: grid;
  grid-template-columns: minmax(6.5rem, 8.5rem) 1fr;
  gap: 0.45rem;
  font-size: 0.9rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(243, 239, 230, 0.12);
}

.live-trust-facts__k {
  color: rgba(244, 231, 200, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.7rem;
  align-self: center;
}

.live-trust-facts__v {
  color: #f3efe6;
}

.live-trust-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.live-trust-links a {
  color: #e8eef5;
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
}

.live-trust-links a:hover {
  color: #f4e7c8;
  border-bottom-color: rgba(184, 148, 79, 0.55);
}

.live-footer-meta {
  margin: 0;
  color: rgba(232, 238, 245, 0.78);
  font-size: 0.92rem;
}

.live-footer-note {
  margin: 1.35rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(184, 148, 79, 0.35);
  color: rgba(243, 239, 230, 0.78);
  font-size: 0.92rem;
  font-family: var(--live-display);
  font-style: italic;
  line-height: 1.45;
  text-align: center;
}

.live-footer a {
  color: #f4e7c8;
}

.live-status-pill {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(36, 59, 86, 0.08);
  color: var(--live-navy);
}

.live-status-pill.is-off {
  background: rgba(139, 58, 58, 0.1);
  color: var(--live-danger);
}

.live-status-pill.is-on {
  background: rgba(47, 107, 79, 0.12);
  color: var(--live-ok);
}

@keyframes live-fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* =========================================================
   Phase 2B.2 — private room layout + chat
========================================================= */
.live-room-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 960px) {
  .live-room-layout {
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
    align-items: start;
  }
}

.live-room-stage {
  position: relative;
}

.live-stage__frame--remote {
  max-width: none;
}

.live-stage__pip {
  position: absolute;
  right: 0.75rem;
  bottom: 4.5rem;
  width: min(32%, 200px);
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  background: #0f1720;
  z-index: 2;
}

.live-stage__video--local {
  transform: scaleX(-1);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-stage__video--remote {
  transform: none;
}

.live-invite-box {
  margin: 0.75rem 0 0;
}

.live-invite-box label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--live-navy-deep);
}

.live-invite-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.live-invite-input {
  flex: 1 1 16rem;
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(36, 59, 86, 0.2);
  border-radius: 8px;
}

.live-room-chat {
  border: 1px solid var(--live-line);
  border-radius: 12px;
  background: #fff;
  padding: 0.85rem;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.live-room-chat h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.live-chat-log {
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: 360px;
  border: 1px solid rgba(36, 59, 86, 0.08);
  border-radius: 8px;
  padding: 0.65rem;
  background: var(--live-marble);
}

.live-chat-row {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
  word-break: break-word;
}

.live-chat-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.live-chat-form input {
  flex: 1 1 auto;
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(36, 59, 86, 0.2);
  border-radius: 8px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .live-stage__pip {
    width: 34%;
    bottom: 5.25rem;
    right: 0.5rem;
  }

  .live-room-stage .live-stage__controls .live-btn {
    flex: 1 1 calc(50% - 0.65rem);
  }
}
