/*
 * 泰语下载页专用样式，对应 content/th/download.html。
 * 不要随意改名 th-* 类；APK、视频和封面在后台“UU 官网设置”维护。
 */

.th-original-install {
  --th-yellow: #ffd700;
  --th-yellow-hover: #facc15;
  --th-yellow-soft: #fefce8;
  --th-line-green: #06c755;
  --th-line-green-hover: #05b54b;
  --th-green: #22c55e;
  --th-ink: #111827;
  --th-copy: #374151;
  --th-muted: #6b7280;
  --th-line: #e5e7eb;
  --th-paper: #ffffff;
  color: var(--th-ink);
  background: #f9fafb;
  font-family: "Noto Sans Thai", "Noto Sans", sans-serif;
  line-height: 1.5;
  padding-bottom: 48px;
  -webkit-font-smoothing: antialiased;
}

.th-original-install,
.th-original-install * {
  box-sizing: border-box;
}

.th-original-install h1,
.th-original-install h2,
.th-original-install h3,
.th-original-install p {
  font-family: inherit;
}

.th-original-install button,
.th-original-install a {
  font-family: inherit;
}

.th-install-hero {
  padding: 40px 16px 32px;
  background: linear-gradient(180deg, var(--th-yellow-soft) 0%, var(--th-paper) 100%);
  text-align: center;
}

.th-install-hero-inner {
  width: 100%;
  max-width: 448px;
  margin: 0 auto;
}

.th-install-title {
  margin: 0 0 8px;
  color: var(--th-ink);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.th-install-title span {
  color: #ca8a04;
  font-size: 24px;
}

.th-install-intro {
  margin: 0 0 32px;
  color: var(--th-muted);
  font-size: 14px;
}

.th-install-actions {
  display: grid;
  gap: 16px;
}

.th-primary-action {
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color 180ms ease, transform 120ms ease, box-shadow 180ms ease;
}

.th-primary-action svg {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.th-primary-action:active,
.th-copy-button:active,
.th-os-tab:active {
  transform: scale(0.98);
}

.th-line-button {
  color: #fff !important;
  background: var(--th-line-green);
  box-shadow: 0 10px 24px rgba(6, 199, 85, 0.22);
}

.th-line-button:hover {
  background: var(--th-line-green-hover);
}

.th-download-button {
  color: #1a1a1a !important;
  background: var(--th-yellow);
  box-shadow: 0 10px 24px rgba(255, 215, 0, 0.28);
}

.th-download-button:hover {
  background: var(--th-yellow-hover);
}

.th-copy-wrap {
  margin-top: -4px;
  text-align: center;
}

.th-copy-button {
  width: 90%;
  max-width: 404px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--th-line);
  border-radius: 999px;
  color: var(--th-copy);
  background: var(--th-paper);
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.06);
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, transform 120ms ease;
}

.th-copy-button:hover {
  border-color: #93c5fd;
  background: #f9fafb;
}

.th-copy-button .th-chrome-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  filter: drop-shadow(0 1px 1px rgba(17, 24, 39, 0.16));
}

.th-copy-button .th-copy-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: #9ca3af;
}

.th-copy-label {
  display: block;
  min-width: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}

.th-copy-label small {
  display: block;
  color: #9ca3af;
  font-size: 10px;
  font-weight: 400;
}

.th-copy-toast {
  margin: 4px 0 0;
  color: #16a34a;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 180ms ease;
}

.th-copy-toast.is-visible {
  opacity: 1;
}

.th-version {
  margin-top: 24px;
  color: #9ca3af;
  font-size: 12px;
}

.th-troubleshooting {
  width: 100%;
  max-width: 768px;
  margin: 0 auto;
  padding: 32px 16px;
  scroll-margin-top: 86px;
}

.th-troubleshooting,
.th-troubleshooting * {
  text-justify: auto;
  word-spacing: normal;
  letter-spacing: normal;
  hyphens: none;
}

.th-troubleshooting p,
.th-troubleshooting li {
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.th-section-heading {
  margin-bottom: 24px;
  text-align: center;
}

.th-section-heading h2 {
  margin: 0;
  color: var(--th-ink);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.th-section-heading p {
  margin: 4px 0 0;
  color: var(--th-muted);
  font-size: 14px;
}

.th-os-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  padding: 4px;
  border-radius: 12px;
  background: #f3f4f6;
}

.th-os-tab {
  min-width: 0;
  min-height: 44px;
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  color: var(--th-muted);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.th-os-tab svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.th-os-tab.is-active {
  color: var(--th-ink);
  background: var(--th-paper);
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.12);
}

.th-faq-group[hidden] {
  display: none !important;
}

.th-faq-card {
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--th-line);
  border-radius: 12px;
  background: var(--th-paper);
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.06);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.th-faq-card.is-open {
  border-color: #fde68a;
  box-shadow: 0 6px 20px rgba(202, 138, 4, 0.08);
}

.th-faq-question {
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 0;
  color: var(--th-copy);
  background: var(--th-paper);
  cursor: pointer;
  text-align: left;
  transition: background-color 180ms ease;
}

.th-faq-question:hover {
  background: #f9fafb;
}

.th-faq-card.is-open .th-faq-question {
  background: var(--th-yellow-soft);
}

.th-faq-title {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.th-faq-title span {
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.th-alert-icon,
.th-chevron {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: #9ca3af;
  transition: color 180ms ease, transform 180ms ease;
}

.th-alert-icon {
  margin-top: 2px;
}

.th-faq-card.is-open .th-alert-icon,
.th-faq-card.is-open .th-chevron {
  color: #ca8a04;
}

.th-faq-card.is-open .th-chevron {
  transform: rotate(180deg);
}

.th-accordion-content {
  max-height: 0;
  overflow: hidden;
  border-top: 0 solid #fef3c7;
  color: var(--th-copy);
  background: rgba(254, 252, 232, 0.52);
  font-size: 14px;
  opacity: 0;
  transition: max-height 300ms ease, opacity 300ms ease, border-width 0ms linear 300ms;
}

.th-accordion-content.open {
  max-height: 1100px;
  border-top-width: 1px;
  opacity: 1;
  transition: max-height 300ms ease, opacity 300ms ease;
}

.th-answer-inner {
  padding: 16px;
}

.th-answer-inner > p {
  margin-bottom: 12px;
}

.th-answer-inner > p:last-child {
  margin-bottom: 0;
}

.th-video-block {
  margin-bottom: 16px;
}

.th-video-shell {
  position: relative;
  width: 100%;
  max-width: 240px;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.16);
  cursor: pointer;
  scroll-margin-top: 86px;
}

.th-video-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(0, 0, 0, 0.16);
  pointer-events: none;
}

.th-play-circle {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(6px);
}

.th-play-circle svg {
  width: 24px;
  height: 24px;
}

.th-preview-video,
.th-playing-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.th-preview-video {
  object-fit: cover;
  opacity: 0.92;
  pointer-events: none;
}

.th-playing-video {
  object-fit: contain;
}

.th-video-hint {
  margin: 8px 0 0 !important;
  color: var(--th-muted);
  font-size: 12px;
  font-style: italic;
  text-align: center;
}

.th-step-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.th-step-item {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.th-step-item span {
  min-width: 0;
  flex: 1 1 auto;
}

.th-check-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 3px;
  color: var(--th-green);
}

.th-ios-placeholder {
  padding: 48px 16px;
  text-align: center;
}

.th-ios-icon {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border-radius: 50%;
  color: #9ca3af;
  background: #f3f4f6;
}

.th-ios-icon svg {
  width: 32px;
  height: 32px;
}

.th-ios-placeholder h3 {
  margin: 0;
  color: var(--th-copy);
  font-size: 18px;
  font-weight: 700;
}

.th-ios-placeholder p {
  margin: 4px 0 0;
  color: var(--th-muted);
  font-size: 14px;
}

.th-support-notice {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  color: #1e40af;
  background: #eff6ff;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.th-support-notice p {
  margin: 0;
}

/* The theme already provides a two-action mobile bar. Keep the original
   element in the source for parity, but do not stack a second bar on top. */
.th-original-install .th-original-sticky-download {
  display: none !important;
}

@media (min-width: 768px) {
  .th-faq-title span {
    font-size: 16px;
  }
}

@media (max-width: 520px) {
  .th-install-hero {
    padding-top: 32px;
    padding-bottom: 28px;
  }

  .th-install-title {
    font-size: 28px;
  }

  .th-install-title span {
    font-size: 22px;
  }

  .th-install-intro {
    margin-bottom: 24px;
  }

  .th-primary-action {
    min-height: 56px;
    padding: 12px 16px;
    font-size: 16px;
  }

  .th-copy-button {
    width: 100%;
  }

  .th-troubleshooting {
    padding: 28px 14px 36px;
  }

  .th-faq-question {
    padding: 15px 14px;
  }

  .th-answer-inner {
    padding: 14px;
  }
}
