/* เดโม Android Auto ในหน้า RideLink TH */
.aa-preview {
  margin-block: 0 clamp(32px, 5vw, 64px);
  scroll-margin-top: 16px;
}
.aa-preview-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 0 3px 16px;
}
.aa-preview-header h2 { font-size: clamp(1.65rem, 3.6vw, 2.7rem); letter-spacing: -.04em; }
.aa-preview-header p, .aa-preview-header a { font-size: .88rem; }
.aa-preview-header p { margin-top: 3px; color: var(--muted); }
.aa-preview-header a { display: inline-flex; align-items: center; min-height: 44px; gap: 7px; color: var(--blue); }
.aa-film {
  --film-ink: #17212c;
  --film-muted: #465769;
  --film-blue: #005eb8;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce0e6;
  border-radius: clamp(16px, 3vw, 30px);
  color: var(--film-ink);
  background: linear-gradient(163deg, #fff 12%, #f7f8fb 62%, #ebeff4 100%);
}
.aa-film h3 { font-size: clamp(1.45rem, 4vw, 3rem); letter-spacing: -.045em; }
.aa-film-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 30px;
  padding: clamp(20px, 4vw, 42px) clamp(20px, 5vw, 55px) 0;
}
.aa-film-play {
  min-height: 44px;
  padding: 7px 16px;
  border: 1px solid var(--film-blue);
  border-radius: 999px;
  background: var(--film-blue);
  color: #fff;
  font-size: .92rem;
  font-weight: 700;
}
.aa-film-play:hover { background: #004a92; }
.aa-film-visual {
  display: grid;
  grid-template-columns: minmax(0, .69fr) minmax(0, 1.6fr);
  align-items: center;
  gap: clamp(12px, 4vw, 44px);
  padding: clamp(22px, 4.6vw, 46px) clamp(18px, 6vw, 66px);
}
.aa-film-visual > figure { min-width: 0; }
.aa-film-visual figcaption {
  min-height: 2.9em;
  margin-top: 14px;
  color: var(--film-muted);
  font-size: clamp(.71rem, 1.45vw, .86rem);
  line-height: 1.45;
  text-align: center;
}
.aa-phone {
  width: min(100%, 188px);
  margin-inline: auto;
  position: relative;
  padding: 6px;
  border: 1px solid #9aa4b1;
  border-radius: 24px;
  background: linear-gradient(145deg, #dde3e9, #7e8997 22%, #303946 53%, #bac5d0);
  box-shadow: 0 12px 22px #2434482f, 3px 4px 1px #2835424d, inset 0 1px 1px #fff;
  transform: rotate(-1deg);
}
.aa-phone-screen {
  display: flex;
  flex-direction: column;
  gap: 7px;
  /* สัดส่วนจอมือถือที่ใช้แคป RideLink TH จาก ADB */
  aspect-ratio: 1200 / 2608;
  padding: 10px;
  overflow: hidden;
  border-radius: 17px;
  background: #0a111f;
  color: #eff8ff;
  font-size: clamp(.62rem, 1.25vw, .85rem);
  line-height: 1.35;
}
.aa-phone-screen::before {
  content: "";
  width: 7px;
  height: 7px;
  align-self: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #02050a;
  box-shadow: 0 0 0 1px #26364d;
}
.aa-phone-screen strong { font-size: 1.24em; }
.aa-phone-note { color: #a6e6fb; }
.aa-phone-action {
  padding: 7px;
  border-radius: 6px;
  background: #e9f1fb;
  color: #163e66;
}
.aa-film[data-phase="0"] .aa-phone-screen { background: #fff; color: var(--film-ink); }
.aa-film[data-phase="0"] .aa-phone-note { color: var(--film-muted); }
.aa-phone-capture { position: relative; }
.aa-phone-capture img, .aa-phone-controls { display: block; width: 100%; height: auto; border-radius: 5px; }
.aa-phone-capture::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 49%;
  height: 46%;
  border: 2px solid #d2f6ff;
  border-radius: 9px;
}
.aa-film[data-phase="1"] .aa-phone-capture::after { inset-block-start: 53%; }
.aa-phone-stream {
  overflow: hidden;
  border: 1px solid #29394b;
  border-radius: 5px;
}
.aa-phone-stream canvas { aspect-ratio: 800 / 368; }
.aa-device {
  position: relative;
  min-width: 0;
  aspect-ratio: 1400 / 881;
  background: url("screenshots/aa-tft-render.webp") center / 126.714% 100% no-repeat;
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  filter: drop-shadow(0 5px 6px #24344824);
}
.aa-device canvas {
  position: absolute;
  /* โปรไฟล์จอ 800 × 480 ส่วนกลางฉาย AA 800 × 368 ระหว่างแถบสถานะ */
  left: 22.143%;
  top: 36.06%;
  width: 55.857%;
  aspect-ratio: 800 / 368;
}
.aa-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: #dce2e9;
  border-top: 1px solid #dce2e9;
}
.aa-steps button {
  min-height: 48px;
  padding: 9px 6px;
  border: 0;
  color: var(--film-muted);
  background: #f6f8fa;
  line-height: 1.35;
  font-size: clamp(.68rem, 1.6vw, .94rem);
}
.aa-steps button:hover { background: #eff4fa; }
.aa-steps button[aria-pressed="true"] { color: #084e95; background: #e9f1fb; box-shadow: inset 0 3px var(--film-blue); font-weight: 700; }
.aa-film-caption { min-height: 74px; padding: 13px clamp(16px, 4vw, 42px); color: var(--film-muted); font-size: .92rem; background: #fff; }

@media (max-width: 620px) {
  .aa-film-visual { grid-template-columns: minmax(0, .75fr) minmax(0, 1.45fr); gap: 14px; }
  .aa-phone { padding: 4px; border-radius: 16px; }
  .aa-phone-screen { gap: 4px; padding: 6px; border-radius: 11px; }
  .aa-phone-action { padding: 4px 3px; }
}
@media (max-width: 385px) {
  .aa-film-visual { grid-template-columns: minmax(0, .82fr) minmax(0, 1.3fr); padding-inline: 13px; gap: 12px; }
  .aa-phone { transform: none; }
  .aa-phone-note { font-size: .6rem; }
}
