/* Page-only layout for /testar-webcam-online/. The camera check stays in browser-tests.js. */

body.page-testar-webcam-online .wcam-page { --wc-blue: #2563eb; --wc-ink: #172033; }
@media (min-width: 1100px) {
  body.page-testar-webcam-online .wcam-page { --cv-aside: clamp(230px, 18vw, 280px); }
}
body.page-testar-webcam-online .wcam-page .conv-title {
  font-size: clamp(1.55rem, 2vw, 2.05rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
}
body.page-testar-webcam-online .article .wcam-page .conv-lede {
  margin: 0 0 18px;
  color: #4f63b8;
  font-size: 1.02rem;
  line-height: 1.4;
}
body.page-testar-webcam-online .article .wcam-page .conv-perks { gap: 14px; }
body.page-testar-webcam-online .article .wcam-page .conv-perks li { gap: 12px; font-size: 0.84rem; }
body.page-testar-webcam-online .wcam-page .conv-perks strong { color: #1d4ed8; font-size: 0.95rem; }
body.page-testar-webcam-online .wcam-page .conv-perk { width: 42px; height: 42px; background-size: 22px; }
body.page-testar-webcam-online .wcam-page .conv-perk.is-cam {
  background-color: #ede9fe;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='7' width='12' height='10' rx='2' fill='%237c3aed'/%3E%3Cpath fill='%237c3aed' d='m15 10 6-3v10l-6-3z'/%3E%3C/svg%3E");
}
body.page-testar-webcam-online .wcam-page .conv-perk.is-easy {
  background-color: #ffedd5;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='%23f97316'/%3E%3Ccircle cx='12' cy='12' r='2.4' fill='%23fff'/%3E%3Cpath fill='%23fff' d='M12 6.2v1.6M12 16.2v1.6M6.2 12h1.6M16.2 12h1.6M8 8l1.1 1.1M14.9 14.9 16 16M16 8l-1.1 1.1M9.1 14.9 8 16'/%3E%3C/svg%3E");
}
body.page-testar-webcam-online .wcam-page .conv-perk.is-free {
  background-color: #dbeafe;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='%232563eb'/%3E%3Cpath d='M12 7v7m0 0-3-3m3 3 3-3M8 17h8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
body.page-testar-webcam-online .article .wcam-page img.conv-art { max-width: 240px; margin-top: 16px; }

body.page-testar-webcam-online .wcam-app {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--wc-ink);
}
body.page-testar-webcam-online .wcam-app [hidden] { display: none !important; }
body.page-testar-webcam-online .wcam-page .conv-board {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 14px;
}
@media (max-width: 1100px) {
  body.page-testar-webcam-online .wcam-page .conv-board { grid-template-columns: minmax(0, 1fr); }
}
body.page-testar-webcam-online .wcam-page .conv-stack { gap: 14px; }
body.page-testar-webcam-online .wcam-page .conv-card,
body.page-testar-webcam-online .wcam-page .conv-steps,
body.page-testar-webcam-online .wcam-page .conv-tips {
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 22px rgba(15, 23, 42, 0.04);
}
body.page-testar-webcam-online .wcam-page .conv-steps li > span:first-child {
  width: 36px;
  height: 36px;
  background: #e8eef8;
  color: #64748b;
}
body.page-testar-webcam-online .wcam-page .conv-steps li.is-on > span:first-child { background: var(--wc-blue); color: #fff; }
body.page-testar-webcam-online .wcam-page .conv-steps li.is-done > span:first-child { background: #16a34a; color: #fff; }
body.page-testar-webcam-online .wcam-page .conv-steps li.is-on strong { color: var(--wc-blue); }
body.page-testar-webcam-online .wcam-page .conv-card-title { color: #1d4ed8; }
body.page-testar-webcam-online .wcam-badge {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: var(--wc-blue);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}

body.page-testar-webcam-online .wcam-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}
body.page-testar-webcam-online #btest-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111827;
}
body.page-testar-webcam-online .wcam-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  color: #cbd5e1;
  font-size: 0.95rem;
  text-align: center;
}
body.page-testar-webcam-online .wcam-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.82rem;
  font-weight: 800;
}
body.page-testar-webcam-online .wcam-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
}
body.page-testar-webcam-online .wcam-full {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: #1f2937;
  cursor: pointer;
}
body.page-testar-webcam-online .wcam-full svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.page-testar-webcam-online .wcam-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
body.page-testar-webcam-online .wcam-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
body.page-testar-webcam-online #btest-btn-start {
  flex: 1.15;
  border: 0;
  background: var(--wc-blue);
  color: #fff;
}
body.page-testar-webcam-online #btest-btn-start::before {
  content: "";
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2'%3E%3Crect x='3' y='7' width='12' height='10' rx='2'/%3E%3Cpath d='m15 10 6-3v10l-6-3z'/%3E%3C/svg%3E") center / 18px no-repeat;
}
body.page-testar-webcam-online #btest-btn-stop {
  flex: 0.85;
  border: 1px solid #e3e9f1;
  background: #fff;
  color: #1f2937;
}
body.page-testar-webcam-online #btest-btn-stop::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
}
body.page-testar-webcam-online .wcam-actions button:disabled { opacity: 0.5; cursor: not-allowed; }
body.page-testar-webcam-online #btest-status {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.35;
}
body.page-testar-webcam-online #btest-status.is-error { color: #b91c1c; }
body.page-testar-webcam-online #btest-status.is-loading { color: #1d4ed8; }
body.page-testar-webcam-online #btest-status.is-ok { color: #15803d; }
body.page-testar-webcam-online .wcam-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.page-testar-webcam-online .wcam-sub {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.4;
}
body.page-testar-webcam-online .wcam-label {
  display: block;
  margin: 0 0 6px;
  color: var(--wc-ink);
  font-size: 0.88rem;
  font-weight: 800;
}
body.page-testar-webcam-online .wcam-field {
  margin: 0 0 12px;
  padding: 11px 12px;
  overflow: hidden;
  border: 1px solid #e3e9f1;
  border-radius: 12px;
  background: #fff;
  color: var(--wc-ink);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.page-testar-webcam-online .wcam-audio {
  margin-top: 4px;
  padding: 12px;
  border: 1px solid #e3e9f1;
  border-radius: 14px;
  background: #f8fafc;
}
body.page-testar-webcam-online .wcam-audio h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: #1d4ed8;
  font-size: 1rem;
}
body.page-testar-webcam-online .wcam-audio h3 svg,
body.page-testar-webcam-online .wcam-facts svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.page-testar-webcam-online .wcam-audio p {
  margin: 0 0 10px;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.35;
}
body.page-testar-webcam-online .wcam-audio-row { display: flex; flex-wrap: wrap; gap: 8px; }
body.page-testar-webcam-online .wcam-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #e3e9f1;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}
body.page-testar-webcam-online .wcam-facts { display: grid; margin: 0; }
body.page-testar-webcam-online .wcam-facts div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 11px 2px;
  border-bottom: 1px solid #eef2f7;
}
body.page-testar-webcam-online .wcam-facts div:last-child { border-bottom: 0; }
body.page-testar-webcam-online .wcam-facts dt,
body.page-testar-webcam-online .wcam-facts dd { margin: 0; }
body.page-testar-webcam-online .wcam-facts dt {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-weight: 700;
}
body.page-testar-webcam-online .wcam-facts dd {
  min-width: 0;
  overflow: hidden;
  color: var(--wc-ink);
  font-weight: 700;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.page-testar-webcam-online .article .wcam-tips { margin: 0; }
body.page-testar-webcam-online .article .wcam-tips h2::before {
  content: "";
  width: 22px;
  height: 22px;
  background: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f5b400' d='M9 18h6v2H9zM12 2a7 7 0 0 0-4 12.7V17h8v-2.3A7 7 0 0 0 12 2z'/%3E%3C/svg%3E") center / 22px no-repeat;
}
body.page-testar-webcam-online .article .wcam-tips li::before {
  content: "";
  background: #f5b400 url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 14px no-repeat;
}

@media (max-width: 720px) {
  body.page-testar-webcam-online .wcam-actions { flex-direction: column; }
  body.page-testar-webcam-online .wcam-actions button { width: 100%; }
}

html[data-theme="dark"] body.page-testar-webcam-online .wcam-field,
html[data-theme="dark"] body.page-testar-webcam-online #btest-btn-stop,
html[data-theme="dark"] body.page-testar-webcam-online .wcam-link,
html[data-theme="dark"] body.page-testar-webcam-online .wcam-audio { background: #0f172a; color: #e2e8f0; border-color: #334155; }
html[data-theme="dark"] body.page-testar-webcam-online .wcam-facts div { border-bottom-color: #334155; }
html[data-theme="dark"] body.page-testar-webcam-online .wcam-facts dt { color: #cbd5e1; }
html[data-theme="dark"] body.page-testar-webcam-online .wcam-sub,
html[data-theme="dark"] body.page-testar-webcam-online .wcam-audio p { color: #94a3b8; }
