/* Pre-login device setup wizard — Hub blocking screen (install → notifications) */

.cosmos-device-setup-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg, #f5f5f7);
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}

.cds-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
  padding: 24px 20px 32px;
}

.cds-brand {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--acc, #007aff);
  text-align: center;
  margin-bottom: 8px;
}

.cds-step-pill {
  align-self: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2, #6b7280);
  background: var(--card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 20px;
}

.cds-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--card, #fff);
  border-radius: 20px;
  border: 1px solid var(--border, #e5e7eb);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.cds-hero {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 28px 20px 8px;
  background: linear-gradient(180deg, var(--accL, #eff6ff) 0%, transparent 100%);
}

.cds-hero-blob {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--accL, #eff6ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.cds-body-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 20px 12px;
}

.cds-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text1, #111827);
  text-align: center;
  margin: 0 0 8px;
  line-height: 1.25;
}

.cds-lead {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text2, #6b7280);
  text-align: center;
  margin: 0 0 16px;
}

.cds-ios-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text2, #6b7280);
  padding: 12px;
  background: var(--bg, #f5f5f7);
  border-radius: 12px;
  margin-bottom: 12px;
}

.cds-ios-steps svg {
  width: 18px;
  height: 18px;
  color: var(--acc, #007aff);
}

.cds-notice {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text2, #6b7280);
  background: var(--bg, #f5f5f7);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.cds-perm-status {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cds-perm-status li {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2, #6b7280);
  background: var(--bg, #f5f5f7);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 10px 12px;
}

.cds-perm-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cds-perm-status-label {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
}

.cds-perm-settings-link {
  flex: 0 0 auto;
  white-space: nowrap;
  min-height: 36px;
  font-size: 12px;
  padding: 6px 10px;
}

.cds-perm-status li[data-state="ok"] {
  color: var(--green, #059669);
  background: var(--greenL, #d1fae5);
  border-color: var(--green, #059669);
}

.cds-perm-status li[data-state="fail"] {
  color: var(--red, #dc2626);
  background: var(--redL, #fee2e2);
  border-color: var(--red, #dc2626);
}

.cds-notice-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text1, #111827);
  margin-bottom: 6px;
}

.cds-ack {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text1, #111827);
}

.cds-ack input {
  margin-top: 3px;
  min-width: 18px;
  min-height: 18px;
}

.cds-error {
  font-size: 13px;
  color: var(--red, #dc2626);
  text-align: center;
  margin: 8px 0;
}

.cds-error[hidden] {
  display: none;
}

.cds-footer {
  padding: 12px 20px 20px;
  border-top: 1px solid var(--border, #e5e7eb);
  background: var(--card, #fff);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cds-footer .btn.primary {
  min-height: 48px;
  width: 100%;
}

.cds-footer .btn.secondary {
  min-height: 44px;
  width: 100%;
}

.cds-panel[hidden] {
  display: none !important;
}

@media (min-width: 769px) {
  .cosmos-device-setup-screen {
    display: none !important;
  }
}
