/* TDN App: install and alerts card. Prefix: tdnap- */

.tdnap-card {
  border: 1px solid #e8dde0;
  border-top: 4px solid #e51a3e;
  border-radius: 12px;
  padding: 1.25rem 1.25rem 1rem;
  margin: 2rem 0;
  background: #fffafb;
  color: #241a1e;
  position: relative;
}

.tdnap-heading {
  font-family: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.5rem;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  color: #0d0a0c;
}

.tdnap-card p { margin: 0 0 0.75rem; line-height: 1.5; }

.tdnap-dismiss {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #6d5a61;
  padding: 0.25rem;
}

.tdnap-btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.3rem;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
}

.tdnap-btn-primary { background: #e51a3e; color: #fff; }
.tdnap-btn-primary:hover { background: #c21230; }

.tdnap-btn:focus-visible,
.tdnap-dismiss:focus-visible,
.tdnap-mode input:focus-visible,
.tdnap-footer-link:focus-visible,
.tdnap-dialog-close:focus-visible {
  outline: 3px solid #e51a3e;
  outline-offset: 2px;
}

.tdnap-alerts { margin-top: 1rem; border-top: 1px solid #e8dde0; padding-top: 1rem; }
.tdnap-install[hidden] + .tdnap-alerts { margin-top: 0; border-top: none; padding-top: 0; }

.tdnap-modes { border: none; margin: 0; padding: 0; }

.tdnap-mode {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.55rem 0.6rem;
  border: 1px solid #e8dde0;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  background: #fff;
}

.tdnap-mode input { margin-top: 0.25rem; accent-color: #e51a3e; }
.tdnap-mode small { color: #5c4c52; }

.tdnap-status { font-weight: 600; }
.tdnap-note { color: #5c4c52; font-size: 0.95rem; }

.tdnap-sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.tdnap-footer-link {
  display: block;
  margin: 1.5rem auto;
  background: none;
  border: none;
  color: #e51a3e;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tdnap-dialog {
  border: none;
  border-radius: 12px;
  padding: 1rem;
  max-width: 34rem;
  width: calc(100% - 2rem);
  background: #fffafb;
}

.tdnap-dialog::backdrop { background: rgba(13, 10, 12, 0.65); }

.tdnap-dialog-close {
  float: right;
  background: #0d0a0c;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
}

.tdnap-dialog .tdnap-card { margin: 0; border: none; background: transparent; }

@media (prefers-color-scheme: dark) {
  .tdnap-card { background: #171114; border-color: #3a2c31; color: #f5f0f1; }
  .tdnap-heading { color: #fff; }
  .tdnap-mode { background: #0d0a0c; border-color: #3a2c31; }
  .tdnap-mode small, .tdnap-note { color: #c9bcc0; }
  .tdnap-dialog { background: #171114; }
}

@media (prefers-reduced-motion: reduce) {
  .tdnap-card, .tdnap-dialog { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
