/* assets/css/components.css — Markdown Component Library */

/* ─── Callout ─────────────────────────────────────────── */
.component-callout {
  border-radius: 10px;
  padding: 16px 20px;
  margin: 1.2em 0;
  border-left: 4px solid transparent;
}

.component-callout__title {
  font-weight: 600;
  font-size: 0.95em;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.component-callout__body > *:first-child { margin-top: 0; }
.component-callout__body > *:last-child  { margin-bottom: 0; }

/* Info */
.component-callout--info {
  background: #e8f2ff;
  border-left-color: #3b82f6;
  color: #1e3a5f;
}
.component-callout--info .component-callout__title { color: #1d4ed8; }

/* Warning */
.component-callout--warning {
  background: #fff7e6;
  border-left-color: #f59e0b;
  color: #5c3d07;
}
.component-callout--warning .component-callout__title { color: #b45309; }

/* Tip */
.component-callout--tip {
  background: #ecfdf5;
  border-left-color: #10b981;
  color: #064e3b;
}
.component-callout--tip .component-callout__title { color: #059669; }

/* Success */
.component-callout--success {
  background: #f0fdf4;
  border-left-color: #22c55e;
  color: #14532d;
}
.component-callout--success .component-callout__title { color: #16a34a; }

/* ─── Checklist Card ───────────────────────────────────── */
.component-checklist {
  display: flex;
  justify-content: center;
  margin: 1.5em 0;
  padding-left: 0.2em;
}

.checklist-card {
  --cl-m: 16px;        /* gleicher Abstand links & rechts für Linien */
  --cl-line: rgba(0, 0, 0, 0.10);
  width: var(--checklist-width, 320px);
  max-width: 100%;
  background: var(--checklist-bg, #f5f5f0);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.09), 0 1px 4px rgba(0, 0, 0, 0.06);
  padding: 6px 0 0;
  overflow: hidden;
}

/* Title — kleiner wegen uppercase + letter-spacing → optisch gleich wie Items */
.checklist-title {
  text-align: center;
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.35);
  margin: 0 var(--cl-m) 2px;
  padding-bottom: 2px;
  border-bottom: 2px solid var(--cl-line);
}

/* Section */
.checklist-section { margin-top: 0; }

.checklist-section-title {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.25);
  margin: 0 var(--cl-m);
  padding: 2px 0 0;
  line-height: 1;
}

/* Items list */
.checklist-items{
  list-style: none;
  margin: 0;
  padding: 0;
  padding-left: 0.2em;
}

/* Zeile — margin = gleiche Linieneinrückung links & rechts */
.checklist-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 24px;
  padding: 0;
  margin: 0 var(--cl-m);
  border-bottom: 2px solid var(--cl-line);
}

/* Disc — absolut links neben dem Content, im Margin-Space */
.checklist-circle {
  position: absolute;
  right: 100%;
  margin-right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.25);
  background: transparent;
}

.checklist-circle--hidden {
  visibility: hidden;
}

/* Item text — alles auf einer vertikalen Linie mit Sektionsnamen */
.checklist-text {
  font-size: 11.5px;
  color: rgba(0, 0, 0, 0.6);
  line-height: 1.25;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile: full-width */
@media (max-width: 480px) {
  .component-checklist { display: block; }
  .checklist-card { width: 100%; border-radius: 16px; }
}

/* ─── Map ──────────────────────────────────────────────── */
.component-map {
  width: var(--map-width, 100%);
  max-width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.09), 0 1px 4px rgba(0, 0, 0, 0.06);
  margin: 1.5em 0;
}

.map-container {
  height: var(--map-height, 400px);
  width: 100%;
}

.map-popup-body { margin-top: 4px; font-size: 0.9em; }
.map-popup-body p { margin: 0; }

.component-map-attribution {
  font-size: 0.7rem;
  color: rgba(0, 0, 0, 0.35);
  text-align: right;
  margin-top: 4px;
}

.component-map-attribution a {
  color: inherit;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .component-map { border-radius: 14px; }
}

/* ─── Inline Tooltip ──────────────────────────────────── */
.inline-tooltip {
  position: relative;
  border-bottom: 1px dotted currentColor;
  cursor: help;
}

.inline-tooltip__box {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);

  display: flex;
  flex-direction: column;
  gap: 4px;

  background: #2a2c2d;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);

  font-size: 0.9rem;
  line-height: 1.4;
  white-space: normal;
  width: max-content;
  max-width: 280px;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;

  pointer-events: none;
  z-index: 100;
}

/* Small arrow pointing down */
.inline-tooltip__box::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #2a2c2d;
}

.inline-tooltip__title {
  font-weight: 700;
  font-size: 0.95rem;
}

.inline-tooltip__text {
  font-weight: 400;
}

.inline-tooltip:hover .inline-tooltip__box {
  opacity: 1;
  visibility: visible;
}
