/* Megacenter review router — mockup styles */
:root {
  --mc-yellow: #FDD600;
  --mc-blue: #004FFF;
  --mc-black: #212529;
  --mc-white: #FFFFFF;
  --mc-gray-light: #E6E6E6;
  --mc-gray-dark: #999999;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

a, button {
  touch-action: manipulation; /* no 300ms double-tap-zoom delay on stars/buttons */
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--mc-white);
  color: var(--mc-black);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 28px 20px calc(24px + env(safe-area-inset-bottom));
}

/* ---------- header ---------- */
.brand {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}
.brand img {
  width: 190px;
  height: auto;
  display: block;
}

/* ---------- page 1: star selector ---------- */
.selector-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding-bottom: 40px;
}

.selector-main h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 18px;
}

.selector-main .sub {
  font-size: 15px;
  color: var(--mc-gray-dark);
  margin-bottom: 18px;
}

.stars-row {
  display: flex;
  flex-direction: row-reverse; /* reversed so hover ~ siblings = lower stars */
  justify-content: center;
  gap: 2px;
}

.stars-row a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}

.stars-row svg { width: 46px; height: 46px; }
.stars-row .star-shape { fill: var(--mc-gray-light); transition: fill .12s ease, transform .12s ease; }

.stars-row a:hover .star-shape,
.stars-row a:hover ~ a .star-shape,
.stars-row a:active .star-shape,
.stars-row a:active ~ a .star-shape {
  fill: var(--mc-yellow);
}
.stars-row a:hover svg { transform: scale(1.12); }
.stars-row svg { transition: transform .12s ease; }

.stars-legend {
  display: flex;
  justify-content: space-between;
  width: 320px;
  max-width: 100%;
  font-size: 12px;
  color: var(--mc-gray-dark);
  padding: 0 14px;
}

.page-footer {
  text-align: center;
  font-size: 12px;
  color: var(--mc-gray-dark);
  padding-top: 16px;
}
.page-footer a { color: var(--mc-blue); text-decoration: none; }

/* ---------- page 2: feedback form (Google-review feel) ---------- */
.form-card {
  width: 100%;
  border: 1px solid var(--mc-gray-light);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(33, 37, 41, .08);
  padding: 20px 18px 18px;
  margin-top: 18px;
  background: var(--mc-white);
}

.form-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--mc-gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.avatar svg { width: 22px; height: 22px; fill: var(--mc-gray-dark); }

.form-head .who { font-size: 15px; font-weight: 600; }
.form-head .privacy { font-size: 12.5px; color: var(--mc-gray-dark); }

.form-stars {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  gap: 2px;
  margin: 6px 0 18px;
}
.form-stars button {
  background: none;
  border: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.form-stars svg { width: 40px; height: 40px; }
.form-stars .star-shape { fill: var(--mc-gray-light); transition: fill .12s ease; }
.form-stars button.filled .star-shape { fill: var(--mc-yellow); }
.form-stars button:hover .star-shape,
.form-stars button:hover ~ button .star-shape { fill: var(--mc-yellow); }

textarea, .name-input {
  width: 100%;
  font-family: inherit;
  font-size: 16px; /* ≥16px so iOS Safari doesn't auto-zoom on focus */
  color: var(--mc-black);
  border: 1px solid var(--mc-gray-light);
  border-radius: 8px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .12s ease;
  background: var(--mc-white);
}
textarea::placeholder, .name-input::placeholder { color: var(--mc-gray-dark); }
textarea:focus, .name-input:focus { border-color: var(--mc-blue); }

textarea {
  min-height: 150px;
  resize: vertical;
  margin-bottom: 12px;
}

.name-input { margin-bottom: 4px; }

.field-error {
  font-size: 12.5px;
  color: #c5221f;
  margin: -6px 0 8px 2px;
  display: none;
}
.field-error.show { display: block; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.btn-cancel {
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--mc-blue);
  padding: 10px 16px;
  border-radius: 24px;
  cursor: pointer;
  text-decoration: none;
}

.btn-submit {
  background: var(--mc-yellow);
  color: var(--mc-black);
  border: 0;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 24px;
  cursor: pointer;
  transition: filter .12s ease;
}
.btn-submit:hover { filter: brightness(.96); }
.btn-submit:active { filter: brightness(.92); }
.btn-submit:disabled { opacity: .6; cursor: default; }

/* ---------- thank-you state ---------- */
.thanks {
  display: none;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 40px 10px 60px;
}
.thanks.show { display: flex; }

.thanks .check {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--mc-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.thanks .check svg { width: 36px; height: 36px; }

.thanks h2 { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; }
.thanks p { font-size: 15px; color: var(--mc-gray-dark); max-width: 300px; line-height: 1.5; }
.thanks .back-link {
  margin-top: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--mc-blue);
  text-decoration: none;
}

/* ---------- redirect stub (mockup only) ---------- */
.redirect-note {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding-bottom: 60px;
}
.redirect-note .g-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--mc-gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
}
.redirect-note h2 { font-size: 21px; font-weight: 700; }
.redirect-note p { font-size: 14.5px; color: var(--mc-gray-dark); max-width: 300px; line-height: 1.5; }
.redirect-note .mock-tag {
  font-size: 12px;
  color: var(--mc-gray-dark);
  border: 1px dashed var(--mc-gray-light);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 8px;
}
.redirect-note .go-btn {
  background: var(--mc-yellow);
  color: var(--mc-black);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  padding: 13px 30px;
  border-radius: 24px;
}

/* ---------- small phones (<=360px wide) ---------- */
@media (max-width: 360px) {
  .brand img { width: 160px; }
  .selector-main h1 { font-size: 23px; }
  .stars-row a { width: 54px; height: 54px; }
  .stars-row svg { width: 40px; height: 40px; }
  .form-stars button { width: 46px; height: 46px; }
  .form-stars svg { width: 36px; height: 36px; }
  .form-card { padding: 16px 14px 14px; }
  .btn-submit { padding: 12px 22px; }
}
