/* ============================================
   PannonPTT — PannonDATA SIM oldal (minimal)
   ============================================ */

.pannondata-page {
  background: var(--surface-100);
  color: var(--slate-700);
}

.detail-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--slate-300);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.detail-topbar__inner {
  min-height: var(--header-height-shrunk);
  display: flex;
  align-items: center;
}

.detail-back {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0 12px 0 10px;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  color: var(--slate-700);
  background: var(--surface-100);
  font-size: var(--text-caption);
  font-weight: 600;
}

.detail-back:hover {
  color: var(--brand-600);
  border-color: var(--brand-400);
}

.detail-back:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: 2px;
}

.detail-back__label {
  line-height: 1;
}

.detail-main {
  padding-block: var(--space-lg);
}

.detail-shell {
  background: var(--surface-100);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.md-content {
  padding: var(--space-lg);
}

.md-content h1,
.md-content h2,
.md-content h3 {
  color: var(--slate-900);
}

.md-content h1 {
  font-size: var(--text-h1);
  margin-bottom: var(--space-md);
}

.md-content h2 {
  font-size: var(--text-h2);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.md-content h3 {
  font-size: var(--text-body-lg);
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
}

.md-content p {
  margin-top: var(--space-sm);
}

.md-content ul {
  list-style: none;
  margin-top: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.md-content ol {
  margin-top: var(--space-sm);
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.md-content li {
  padding-left: 20px;
  position: relative;
}

.md-content ol li {
  padding-left: 0;
}

.md-content ol li::before {
  content: none;
}

.md-content li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--brand-400);
}

.md-hr {
  border: 0;
  height: 1px;
  background: var(--slate-300);
  margin-top: var(--space-md);
  margin-bottom: var(--space-md);
}

.md-table-wrap {
  margin-top: var(--space-sm);
  overflow-x: auto;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
}

.md-table-wrap table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: var(--surface-100);
}

.md-table-wrap th,
.md-table-wrap td {
  text-align: left;
  padding: 10px var(--space-md);
  border-top: 1px solid var(--slate-300);
  font-size: var(--text-caption);
  vertical-align: top;
}

.md-table-wrap thead th {
  border-top: 0;
  background: var(--slate-100);
  color: var(--slate-900);
  font-weight: 700;
}

.md-table-wrap tbody tr:nth-child(even) {
  background: var(--slate-100);
}

.md-content a {
  color: var(--brand-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.md-content a:hover {
  color: var(--brand-500);
}

.md-content a:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: 2px;
}

.to-top {
  position: fixed;
  right: var(--space-md);
  bottom: var(--space-md);
  z-index: 25;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-700);
  border: 1px solid var(--slate-300);
  background: var(--surface-200);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  transition: color var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard),
              background-color var(--dur-fast) var(--ease-standard);
}

.to-top:hover {
  color: var(--brand-600);
  border-color: var(--brand-400);
  background: var(--surface-100);
}

.to-top:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: 2px;
}

.md-code {
  margin-top: var(--space-sm);
  padding: var(--space-md);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  background: var(--slate-100);
  overflow-x: auto;
}

.flow-diagram {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--surface-100) 0%, var(--slate-100) 100%);
  box-shadow: var(--shadow-sm);
}

.flow-top,
.flow-mid,
.flow-arrows,
.flow-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.flow-mid,
.flow-arrows,
.flow-bottom {
  margin-top: var(--space-sm);
}

.flow-card {
  min-width: 180px;
  padding: 12px;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  background: var(--surface-100);
  text-align: center;
}

.flow-card h4 {
  margin: 0;
  color: var(--slate-900);
  font-size: var(--text-body);
}

.flow-card p {
  margin-top: 4px;
  margin-bottom: 0;
  font-size: var(--text-caption);
}

.flow-card--primary {
  border-color: var(--brand-400);
}

.flow-card--accent {
  border-color: var(--brand-400);
  box-shadow: var(--shadow-sm);
}

.flow-arrows span,
.flow-arrow-right {
  color: var(--brand-600);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1;
}

.flow-meta {
  color: var(--slate-500);
}

.diagram-image-wrap {
  margin: var(--space-md) auto 0;
  display: flex;
  justify-content: center;
}

.diagram-image {
  width: min(100%, 760px);
  height: auto;
  display: block;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background: var(--surface-100);
}

@media (max-width: 640px) {
  .md-content {
    padding: var(--space-md);
  }

  .flow-top,
  .flow-mid,
  .flow-arrows,
  .flow-bottom {
    flex-direction: column;
  }

  .flow-card {
    width: 100%;
    min-width: 0;
  }

  .flow-arrow-right {
    transform: rotate(90deg);
  }

  .to-top {
    right: var(--space-sm);
    bottom: var(--space-sm);
    width: 50px;
    height: 50px;
  }
}
