/* ═══════════════════════════════════════════════════
   Shared integration page styles
   Loaded by: hcp/integration.html, medtech/integration.html, ehr/integration.html
   ═══════════════════════════════════════════════════ */

/* ── HERO ── */
.intg-hero {
  padding-top: 64px;
  background: var(--white);
  position: relative;
  overflow: hidden;
}

.intg-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 80% at 50% -20%,
    oklch(94% 0.06 192 / 0.55) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.intg-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(
    ellipse 70% 80% at 50% 30%,
    black 20%,
    transparent 75%
  );
  opacity: 0.4;
  pointer-events: none;
}

.intg-hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 32px 72px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.intg-hero-inner .hero-title {
  font-size: clamp(36px, 5vw, 58px);
  max-width: 700px;
  margin: 0 auto 18px;
}

.intg-hero-inner .section-sub {
  margin: 0 auto 36px;
  text-align: center;
  max-width: 640px;
}

.intg-hero-actions {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── OVERVIEW ── */
.intg-overview {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 0;
}

.intg-overview .section-sub {
  margin-bottom: 48px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.overview-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 22px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.overview-card:hover {
  border-color: var(--teal-mid);
  box-shadow: 0 4px 16px oklch(56% 0.13 192 / 0.1);
}

.overview-icon {
  font-size: 26px;
  margin-bottom: 14px;
  line-height: 1;
}

.overview-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.35;
}

.overview-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

/* ── STEPS ── */
.intg-steps {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 96px 0;
}

.intg-steps .section-sub {
  margin-bottom: 56px;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 860px;
}

.step-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0 28px;
  align-items: start;
}

.step-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
}

.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--teal-light);
  border: 2px solid oklch(82% 0.07 192);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--teal-dark);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.step-line {
  width: 2px;
  flex: 1;
  background: oklch(90% 0.04 192);
  margin: 6px 0;
  min-height: 24px;
}

.step-body {
  padding-bottom: 44px;
}

.step-row-last .step-body {
  padding-bottom: 0;
}

.step-body h3 {
  font-family: var(--ff-display);
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 10px;
  margin-top: 8px;
  line-height: 1.2;
}

.step-body p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 14px;
}

.step-body a {
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.step-body a:hover {
  color: var(--teal);
}

.step-body code {
  font-family: 'DM Mono', 'Fira Code', monospace;
  font-size: 12.5px;
  background: oklch(96% 0.02 192);
  border: 1px solid oklch(88% 0.04 192);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--teal-dark);
}

/* ── TABLES ── */
.step-api-table-wrap,
.step-config-table-wrap,
.step-ehr-table-wrap {
  margin-top: 20px;
  margin-bottom: 14px;
}

.step-api-table,
.step-ehr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.step-api-table thead tr,
.step-ehr-table thead tr {
  background: var(--white);
}

.step-api-table th,
.step-ehr-table th {
  padding: 11px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.step-api-table td,
.step-ehr-table td {
  padding: 12px 16px;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  line-height: 1.4;
}

.step-api-table td:first-child,
.step-ehr-table td:first-child {
  font-weight: 500;
}

.step-api-table tbody tr:last-child td,
.step-ehr-table tbody tr:last-child td {
  border-bottom: none;
}

.step-ehr-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  padding: 12px 16px;
  background: var(--teal-light);
  border: 1px solid oklch(88% 0.05 192);
  border-radius: 8px;
}

.step-note {
  font-size: 13px;
  color: var(--muted);
  background: var(--teal-light);
  border: 1px solid oklch(88% 0.05 192);
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 0;
  margin-bottom: 14px;
}

.step-note a {
  font-weight: 600;
}

/* ── RESULT TYPE CARDS ── */
.result-types-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0;
}

.result-type-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 20px;
  transition: border-color 0.15s;
}

.result-type-card:hover {
  border-color: var(--teal-mid);
}

.result-type-icon {
  font-size: 22px;
  margin-bottom: 10px;
  line-height: 1;
}

.result-type-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.3;
}

.result-type-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ── OPTIONAL CAPABILITIES ── */
.intg-optional {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 96px 0;
}

.intg-optional .section-sub {
  margin-bottom: 48px;
}

.optional-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.optional-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 26px;
  transition: border-color 0.15s;
}

.optional-card:hover {
  border-color: var(--teal-mid);
}

.optional-icon {
  font-size: 26px;
  margin-bottom: 12px;
  line-height: 1;
}

.optional-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.35;
}

.optional-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

.optional-card a {
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.optional-card a:hover {
  color: var(--teal);
}

.optional-card code {
  font-family: 'DM Mono', 'Fira Code', monospace;
  font-size: 12.5px;
  background: oklch(96% 0.02 192);
  border: 1px solid oklch(88% 0.04 192);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--teal-dark);
}

/* ── SCOPE CALLOUT ── */
.intg-scope {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 72px 0;
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.scope-card {
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.scope-icon {
  font-size: 26px;
  margin-bottom: 12px;
  line-height: 1;
}

.scope-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.scope-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.scope-card a {
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.scope-card a:hover {
  color: var(--teal);
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .result-types-grid {
    grid-template-columns: 1fr;
  }

  .optional-grid {
    grid-template-columns: 1fr;
  }

  .scope-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .intg-hero-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: min(100%, 420px);
    margin: 0 auto;
    gap: 10px;
  }

  .intg-hero-actions .tmp-btn-primary,
  .intg-hero-actions .tmp-btn-outline {
    width: 100%;
    justify-content: center;
    padding: 10px 22px;
    font-size: 14px;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .step-row {
    grid-template-columns: 48px 1fr;
    gap: 0 16px;
  }

  .step-row,
  .step-body {
    min-width: 0;
  }

  .step-api-table-wrap,
  .step-config-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .step-api-table {
    min-width: 560px;
  }

  .step-ehr-note {
    overflow-wrap: anywhere;
  }
}
