/* LoveWall — review form (form.css). Builds on base.css tokens. */

body {
  background: #fff;
  min-height: 100vh;
}

/* Black progress bar fixed at the very top. */
.lw-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: #ececf0;
  z-index: 50;
}
.lw-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: #0b0b0f;
  border-radius: 0 999px 999px 0;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Logo top-left. */
.lw-logo {
  position: fixed;
  top: 22px;
  left: 24px;
  z-index: 40;
}
.lw-logo img {
  height: 48px;
  width: auto;
}
/* Bundled square fallback logo gets an app-icon rounding. */
.lw-logo--app img {
  border-radius: 30%;
}

/* Circular back button top-right. */
.lw-back {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 40;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lw-back:hover {
  background: #f9fafb;
  border-color: #d7d9e0;
}

/* Centered column. */
.lw-wrap {
  max-width: 540px;
  margin: 0 auto;
  padding: 96px 24px 64px;
}

.lw-step h1 {
  margin: 0 0 10px;
}

/* Wide step (recorder) breaks out of the centered column. */
.lw-step--wide {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(1060px, 100vw - 48px);
}
.lw-rec-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 880px) {
  .lw-rec-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* Senja centers the rating step. */
.lw-step[data-step="rating"] {
  text-align: center;
}
.lw-step[data-step="rating"] .lw-stars {
  justify-content: center;
}
.lw-sub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}
.lw-label {
  display: block;
  margin: 18px 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}
.lw-step .btn-primary,
.lw-step .btn-secondary {
  margin-top: 24px;
}
.lw-hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.lw-hint.ok {
  color: #2fbf71;
}
.lw-error {
  margin: 14px 0 0;
  font-size: 14px;
  color: #dc2626;
}

/* ---------- Stars ---------- */
.lw-stars {
  display: flex;
  gap: 8px;
  margin: 8px 0 8px;
}
.lw-star {
  border: 0;
  background: none;
  padding: 4px;
  cursor: pointer;
  line-height: 0;
}
.lw-star svg {
  width: 44px;
  height: 44px;
  fill: #d7d9e0;
  transition: fill 0.12s ease, transform 0.08s ease;
}
.lw-star:hover svg {
  transform: scale(1.08);
}
.lw-star.on svg,
.lw-star.hover svg {
  fill: var(--star);
}

/* ---------- Bullets ---------- */
.lw-bullets {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}
.lw-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 16px;
  color: #374151;
  line-height: 1.45;
}
.lw-check {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #2fbf71;
}

/* ---------- Recorder "what to say" checklist ---------- */
.lw-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lw-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 16px;
  color: #374151;
  line-height: 1.45;
}
.lw-check-lg {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  background: #22c55e;
}

/* ---------- Split record button ---------- */
.lw-split {
  display: flex;
  align-items: stretch;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 0 4px rgba(63, 51, 224, 0.14),
    0 8px 22px rgba(63, 51, 224, 0.35);
}
.lw-split-main,
.lw-split-upload {
  border: 0;
  background: linear-gradient(180deg, #4a3ee8, #3628d8);
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.lw-split-main {
  flex: 1;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
}
.lw-split-upload {
  flex: 0 0 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
}
.lw-split-main:hover,
.lw-split-upload:hover {
  filter: brightness(1.06);
}
.lw-split-main:active,
.lw-split-upload:active {
  transform: translateY(1px);
}

.lw-or {
  position: relative;
  text-align: center;
  margin: 20px 0;
}
.lw-or::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}
.lw-or span {
  position: relative;
  background: #fff;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

/* ---------- Pickers (photo / logo) ---------- */
.lw-picker {
  display: flex;
  align-items: center;
  gap: 14px;
}
.lw-picker .btn-secondary {
  margin-top: 0;
  width: auto;
  flex: 0 0 auto;
}
.lw-initials {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  background: #c7b8ea;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.lw-logo-preview {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--input-bg) center / contain no-repeat;
}
.lw-clear {
  border: 0;
  background: none;
  padding: 6px;
  color: #475569;
  line-height: 0;
  cursor: pointer;
  transition: color 0.15s ease;
}
.lw-clear:hover {
  color: #111827;
}

.lw-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.lw-row2 .lw-label {
  margin-top: 0;
}

/* ---------- Big textareas (testimonial + private feedback) ---------- */
#lw-text,
#lw-private {
  min-height: 220px;
  padding: 16px;
  font-size: 16px;
  background: #f7f7f9;
  border: 1px solid var(--border);
  border-radius: 12px;
  resize: vertical;
}

/* Honeypot — visually hidden but present for bots. */
.lw-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Recorder ---------- */
.lw-rec-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}
.lw-rec-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lw-rec-preview video.mirror {
  transform: scaleX(-1);
}
.lw-countdown {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 96px;
  font-weight: 800;
}
/* Camera card: video on top, black bar attached below. */
.lw-rec-stage {
  position: relative;
}
.lw-rec-stage--live .lw-rec-preview {
  border-radius: var(--radius) var(--radius) 0 0;
}

/* Device buttons overlay (top-right inside the video). */
.lw-rec-devices {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 5;
}
.lw-dev-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lw-dev-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

/* Dark device popovers below the buttons. */
.lw-popover {
  position: absolute;
  top: 60px;
  right: 12px;
  z-index: 6;
  width: 300px;
  max-width: calc(100% - 24px);
  padding: 10px;
  border-radius: 12px;
  background: #16161c;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.lw-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.lw-popover-close {
  border: 0;
  background: none;
  padding: 4px;
  color: #9ca3af;
  line-height: 0;
  cursor: pointer;
}
.lw-popover-close:hover {
  color: #fff;
}
.lw-popover-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 9px 8px;
  background: none;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.lw-popover-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.lw-popover-item svg {
  flex: 0 0 auto;
}
.lw-dev-name {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Bottom bar with meter, timer and record button. */
.lw-rec-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 16px;
  background: #111;
  border-radius: 0 0 var(--radius) var(--radius);
}
.lw-rec-bar .lw-rec-time {
  margin-left: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.lw-meter {
  width: 40px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}
.lw-meter span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2fbf71, #f2b136);
  transition: width 0.06s linear;
}

/* Record / stop button: red circle inside a white ring. */
.lw-rec-record {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.lw-rec-record::before {
  content: "";
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e11d48;
  transition: width 0.15s ease, height 0.15s ease, border-radius 0.15s ease,
    background 0.15s ease;
}
.lw-rec-record:hover::before {
  background: #f43f5e;
}
.lw-rec-record.is-recording::before {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #fff;
}
.lw-rec-record:disabled {
  cursor: default;
  opacity: 0.6;
}

/* Tips strip under the camera card. */
.lw-rec-tips {
  display: flex;
  gap: 20px;
  margin-top: 18px;
}
.lw-rec-tip {
  flex: 1;
  text-align: center;
}
.lw-rec-tip svg {
  margin: 0 auto 8px;
  color: var(--accent);
}
.lw-rec-tip p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
@media (max-width: 880px) {
  .lw-rec-tips {
    flex-direction: column;
    gap: 14px;
  }
  .lw-rec-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
  }
  .lw-rec-tip svg {
    margin: 2px 0 0;
  }
}

.lw-rec-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.lw-rec-actions .btn-primary,
.lw-rec-actions .btn-secondary {
  margin-top: 0;
}

.lw-perm {
  text-align: center;
  padding: 40px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fafafb;
}
.lw-perm h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
}
.lw-perm p {
  margin: 0 0 18px;
  color: var(--muted);
}

/* ---------- Review before submit ---------- */
.lw-review-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.05);
}
.lw-review-prompt {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--muted);
}
.lw-review-content video {
  width: 100%;
  border-radius: 12px;
  background: #000;
}
.lw-review-text {
  white-space: pre-wrap;
  font-size: 16px;
  line-height: 1.6;
  color: #1f2937;
}

/* ---------- Uploading / thanks ---------- */
.lw-center {
  text-align: center;
  padding-top: 40px;
}
.lw-upbar {
  height: 8px;
  margin: 18px auto 0;
  max-width: 320px;
  border-radius: 999px;
  background: var(--input-bg);
  overflow: hidden;
}
.lw-upbar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(180deg, #4a3ee8, #3628d8);
  transition: width 0.2s ease;
}
.lw-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 4px solid var(--input-bg);
  border-top-color: var(--accent);
  animation: lw-spin 0.8s linear infinite;
}
@keyframes lw-spin {
  to { transform: rotate(360deg); }
}
.lw-thanks {
  position: relative;
}

/* Tiny CSS confetti (no library). */
.lw-confetti i {
  position: fixed;
  top: -12px;
  width: 9px;
  height: 14px;
  opacity: 0.9;
  animation: lw-fall linear forwards;
}
@keyframes lw-fall {
  to {
    transform: translateY(105vh) rotate(540deg);
    opacity: 0.7;
  }
}

@media (max-width: 560px) {
  .lw-wrap {
    padding: 84px 18px 56px;
  }
  h1 {
    font-size: 27px;
  }
  .lw-row2 {
    grid-template-columns: 1fr;
  }
  .lw-star svg {
    width: 38px;
    height: 38px;
  }
}
