/* Client review viewer — agency-branded chrome around the site preview. */

:root {
  --accent: #2f6bff;
  --ink: #191a1e;
  --muted: #6b6f76;
  --bg: #f2f3f5;
  --panel: #ffffff;
  --border: #e2e4e8;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { height: 26px; max-width: 130px; object-fit: contain; display: block; }
.brand .initials {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.brand .who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand .who b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .who span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mid { display: flex; align-items: center; gap: 10px; }
.page-sel {
  font: inherit; font-size: 13px;
  padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--panel); color: var(--ink);
  max-width: 220px;
}
.devices { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.devices button {
  font: inherit; font-size: 12px;
  padding: 6px 10px; border: 0; background: var(--panel); color: var(--muted); cursor: pointer;
}
.devices button + button { border-left: 1px solid var(--border); }
.devices button.active { background: var(--accent); color: #fff; }

.actions { display: flex; gap: 8px; }
.btn {
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); background: var(--panel); color: var(--ink);
}
.btn.ghost:hover { background: var(--bg); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(0.94); }

.stage { flex: 1; display: flex; justify-content: center; padding: 16px; min-height: 0; }
.frame-wrap {
  width: 100%; height: 100%;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
  transition: max-width 0.25s ease;
  margin: 0 auto;
}
#frame { width: 100%; height: 100%; border: 0; display: block; background: #fff; }

.fb-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 16, 18, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; z-index: 10;
}
/* `hidden` must beat the display:flex above (and on .fb-done) — without this the
   modal, and its "Sent" state, show on load and Close can't dismiss them. */
.fb-backdrop[hidden], .fb-done[hidden] { display: none; }
.fb-card {
  position: relative;
  background: var(--panel);
  border-radius: 14px;
  padding: 22px;
  width: 420px; max-width: 100%;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}
.fb-card h2 { margin: 0 0 4px; font-size: 17px; }
.fb-sub { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.fb-field { display: block; margin-bottom: 12px; }
.fb-field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.fb-field input, .fb-field textarea {
  width: 100%; font: inherit; font-size: 14px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--panel); color: var(--ink); resize: vertical;
}
.fb-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.fb-done {
  position: absolute; inset: 0;
  background: var(--panel); border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  text-align: center; padding: 22px;
}
.fb-done-mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
}
.fb-done p { margin: 4px 0 10px; font-size: 14px; }

@media (max-width: 760px) {
  .bar { flex-wrap: wrap; }
  .mid { order: 3; width: 100%; justify-content: space-between; }
  .stage { padding: 8px; }
}
