/* Public help center (/ayuda) */

.help-body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  color: hsl(222, 47%, 11%);
  background: #f6faf8;
  line-height: 1.65;
}

.help-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid #e5eae8;
}

.help-header-inner,
.help-footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.help-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--medical-primary-dark);
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
}

.help-logo img {
  height: 32px;
  width: auto;
}

.help-btn-primary {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: var(--medical-primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
}

.help-btn-primary:hover {
  background: var(--medical-primary-dark);
}

.help-main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 4rem;
}

.help-hero {
  max-width: 48rem;
  margin-bottom: 2.5rem;
}

.help-hero h1 {
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 1rem;
}

.help-hero p {
  font-size: 1.0625rem;
  color: hsl(215, 16%, 40%);
  margin: 0;
}

.help-layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.help-toc {
  position: sticky;
  top: 5rem;
  font-size: 0.875rem;
}

.help-toc-title {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  color: hsl(215, 16%, 47%);
  margin: 0 0 0.75rem;
}

.help-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid #e5eae8;
}

.help-toc a {
  display: block;
  padding: 0.3rem 0 0.3rem 1rem;
  color: hsl(215, 16%, 40%);
  text-decoration: none;
}

.help-toc a:hover {
  color: var(--medical-primary-dark);
}

.help-content {
  max-width: 46rem;
}

.help-content section {
  scroll-margin-top: 5rem;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e5eae8;
}

.help-content section:last-child {
  border-bottom: none;
}

.help-content h2 {
  font-family: "Manrope", sans-serif;
  font-size: 1.5rem;
  margin: 0 0 1rem;
}

.help-content h3 {
  font-family: "Manrope", sans-serif;
  font-size: 1.125rem;
  margin: 1.75rem 0 0.75rem;
}

.help-code {
  overflow-x: auto;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--medical-primary-bg-subtle);
  font-size: 0.875rem;
}

.help-code code {
  padding: 0;
  background: none;
}

.help-content p,
.help-content li {
  font-size: 1rem;
}

.help-content ul,
.help-content ol {
  padding-left: 1.25rem;
}

.help-content li {
  margin-bottom: 0.5rem;
}

.help-content a {
  color: var(--medical-primary-dark);
}

.help-content code {
  font-size: 0.875em;
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
  background: var(--medical-primary-bg-subtle);
  overflow-wrap: anywhere;
}

.help-steps {
  counter-reset: help-step;
  list-style: none;
  padding-left: 0 !important;
}

.help-steps li {
  counter-increment: help-step;
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1rem;
}

.help-steps li::before {
  content: counter(help-step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--medical-primary-bg);
  color: var(--medical-primary-dark);
  font-weight: 700;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-checklist {
  list-style: none;
  padding-left: 0 !important;
}

.help-checklist li {
  position: relative;
  padding-left: 1.75rem;
}

.help-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--medical-primary);
  font-weight: 700;
}

.help-note {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background: var(--medical-primary-bg);
  border: 1px solid #a7f3d0;
  font-size: 0.9375rem;
}

.help-table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
}

.help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  background: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid #e5eae8;
}

.help-table th,
.help-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5eae8;
  vertical-align: top;
}

.help-table th {
  background: var(--medical-primary-bg-subtle);
  font-weight: 600;
}

.help-table tr:last-child td {
  border-bottom: none;
}

.help-faq {
  background: #fff;
  border: 1px solid #e5eae8;
  border-radius: 0.75rem;
  padding: 0.875rem 1.25rem;
  margin-bottom: 0.75rem;
}

.help-faq summary {
  cursor: pointer;
  font-weight: 600;
}

.help-faq p {
  margin: 0.75rem 0 0;
  color: hsl(215, 16%, 35%);
}

.help-footer {
  border-top: 1px solid #e5eae8;
  background: #fff;
  font-size: 0.9375rem;
}

.help-footer-inner {
  flex-direction: column;
  align-items: flex-start;
  padding: 1.5rem 1rem;
  gap: 0.25rem;
}

.help-footer p {
  margin: 0;
}

.help-footer a {
  color: var(--medical-primary-dark);
}

.help-footer-small {
  font-size: 0.8125rem;
  color: hsl(215, 16%, 47%);
}

@media (max-width: 800px) {
  .help-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .help-toc {
    position: static;
    background: #fff;
    border: 1px solid #e5eae8;
    border-radius: 0.75rem;
    padding: 1rem;
  }
}

/* "Add to calendar" page for patients */
.cal-invite { max-width: 28rem; margin: 2.5rem auto; padding: 1.5rem; background: #fff; border: 1px solid #e2e8f0; border-radius: 1rem; text-align: center; }
.cal-invite h1 { font-size: 1.4rem; margin: 0 0 0.75rem; }
.cal-invite-what { font-weight: 600; margin: 0 0 0.25rem; }
.cal-invite-when, .cal-invite-where { color: #475569; margin: 0 0 0.25rem; }
.cal-invite-cancelled { color: #b91c1c; margin-top: 1rem; }
.cal-invite-actions { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.25rem; }
.cal-invite-actions .btn { display: block; padding: 0.75rem 1rem; text-decoration: none; }
