/* ========================================
   TS-241 — /install.html (landing pública)
   ======================================== */

body {
  margin: 0;
  background: linear-gradient(180deg, #f7f9fc 0%, #ffffff 80%);
  color: #1e293b;
  min-height: 100vh;
}

* { box-sizing: border-box; }

.install-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 18px 80px;
}

/* ── Hero ─────────────────────────────── */
.install-hero {
  position: relative;
  text-align: center;
  padding: 32px 16px 28px;
}
.install-back {
  position: absolute;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1375BC;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.install-back:hover { background: rgba(19, 117, 188, 0.08); }
.install-back .material-symbols-outlined { font-size: 18px; }

.install-hero-content { margin-top: 12px; }
.install-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(19, 117, 188, 0.22);
  margin-bottom: 18px;
}
.install-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  line-height: 1.1;
  color: #0f172a;
  font-weight: 700;
}
.install-subtitle {
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  color: #64748b;
  margin: 0 auto;
  max-width: 560px;
  line-height: 1.5;
}

/* ── Detection cards ──────────────────── */
.install-detection {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.install-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 32px rgba(15, 23, 42, 0.06);
  border: 1px solid #e2e8f0;
}
/* Reforç: alguns cards tenen display: flex/grid que sobreescriuria [hidden] del UA */
.install-card[hidden] { display: none !important; }
.install-card h2 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  color: #0f172a;
  font-weight: 700;
  line-height: 1.2;
}
.install-card-intro {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0 0 22px;
  line-height: 1.45;
}

.install-card-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #64748b;
  font-size: 0.95rem;
  padding: 36px 24px;
}
.install-card-loading .material-symbols-outlined {
  animation: spin 1s linear infinite;
  color: #1375BC;
}
@keyframes spin { to { transform: rotate(360deg); } }

.install-card-success {
  text-align: center;
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.05), #ffffff 80%);
}
.install-card-success .install-card-icon .material-symbols-outlined {
  font-size: 56px;
  color: #10b981;
}
.install-card-success p { color: #475569; margin: 8px 0 20px; }

.install-card-warn {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.06), #ffffff 80%);
}

/* Pill plataforma */
.install-platform-row { margin-bottom: 14px; }
.install-platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(19, 117, 188, 0.10);
  color: #0c5e9a;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.install-platform-pill .material-symbols-outlined { font-size: 16px; }

/* ── Steps ──────────────────────────── */
.install-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.install-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
}
.install-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1375BC;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.install-step-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.install-step-body { flex: 1; min-width: 0; }
.install-step-body p {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.45;
  color: #1e293b;
}
.install-step-illus {
  width: 60px;
  height: 80px;
  flex-shrink: 0;
}

.install-steps-compact .install-step { padding: 12px 14px; }
.install-steps-compact .install-step-num { width: 28px; height: 28px; font-size: 0.85rem; }

/* ── Tip box ─────────────────────────── */
.install-tip {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 12px 14px;
  background: rgba(19, 117, 188, 0.06);
  border-radius: 10px;
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.45;
}
.install-tip .material-symbols-outlined { color: #1375BC; font-size: 20px; flex-shrink: 0; }

/* ── URL box (iOS Chrome / unknown) ── */
.install-url-box {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 18px 0 14px;
  flex-wrap: wrap;
}
.install-url-box code {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.85rem;
  color: #334155;
  word-break: break-all;
}

/* ── Buttons ────────────────────────── */
.install-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  font-family: inherit;
}
.install-btn-primary {
  background: #1375BC;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(19, 117, 188, 0.3);
}
.install-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(19, 117, 188, 0.4); }
.install-btn-primary:active { transform: translateY(0); }
.install-btn-secondary {
  background: #ffffff;
  color: #1375BC;
  border-color: #1375BC;
}
.install-btn-secondary:hover { background: rgba(19, 117, 188, 0.06); }
.install-btn .material-symbols-outlined { font-size: 20px; }

/* ── Manual fallback ─────────────────── */
.install-manual {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed #cbd5e1;
}
.install-manual-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #475569;
  margin: 0 0 10px;
}

/* ── Benefits ────────────────────────── */
.install-benefits {
  margin-top: 56px;
  text-align: center;
}
.install-benefits h3 {
  font-size: 1.4rem;
  margin: 0 0 28px;
  color: #0f172a;
  font-weight: 700;
}
.install-benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.install-benefit {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px 18px;
  text-align: left;
}
.install-benefit .material-symbols-outlined {
  font-size: 32px;
  color: #1375BC;
  margin-bottom: 10px;
  display: block;
}
.install-benefit h4 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}
.install-benefit p {
  margin: 0;
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .install-benefits-grid { grid-template-columns: 1fr; }
}

/* ── Help footer ─────────────────────── */
.install-help {
  margin-top: 48px;
  text-align: center;
  font-size: 0.9rem;
  color: #64748b;
}
.install-help a {
  color: #1375BC;
  text-decoration: none;
  font-weight: 500;
}
.install-help a:hover { text-decoration: underline; }
.install-sep { margin: 0 10px; opacity: 0.5; }

/* ── Dark mode ───────────────────────── */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(180deg, #0b1220 0%, #0f172a 80%);
    color: #e2e8f0;
  }
  .install-card,
  .install-benefit {
    background: #111827;
    border-color: #1f2937;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4), 0 8px 32px rgba(0,0,0,0.4);
  }
  .install-card h2,
  .install-benefits h3,
  .install-benefit h4,
  .install-hero h1 { color: #f8fafc; }
  .install-card-intro,
  .install-subtitle,
  .install-benefit p,
  .install-help { color: #94a3b8; }
  .install-step {
    background: #0b1220;
    border-color: #1f2937;
  }
  .install-step-body p { color: #e2e8f0; }
  .install-tip {
    background: rgba(19, 117, 188, 0.14);
    color: #cbd5e1;
  }
  .install-url-box {
    background: #0b1220;
    border-color: #334155;
  }
  .install-url-box code { color: #cbd5e1; }
  .install-card-success {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.10), #111827 80%);
    border-color: rgba(16, 185, 129, 0.35);
  }
  .install-card-warn {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.12), #111827 80%);
    border-color: rgba(245, 158, 11, 0.4);
  }
  .install-btn-secondary {
    background: transparent;
    color: #64a8e8;
    border-color: #64a8e8;
  }
  .install-back { color: #64a8e8; }
}
