/* 04-buttons.css — Buttons + Tooltips
   Teil von css/living-canvas (aufgeteilt). Ladereihenfolge = Dateiname.
   Siehe docs/components/ fuer die Zuordnung Sektion -> Datei. */
/* 6. Buttons */
.btn {
  border: 0;
  border-radius: var(--radius-pill);
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  box-sizing: border-box;
  transition: all var(--dur-normal) var(--ease-spring);
}
.btn-primary {
  background: var(--electric);
  color: #fff;
  padding: 12px 22px;
  font-size: 13px;
}
.btn-primary:hover {
  background: var(--electric-d);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(104, 87, 232, 0.3);
}
.btn-outline, .btn-card, .btn-text {
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.btn-outline::before,
.btn-card::before,
.btn-text::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
  background: var(--mist);
  transform: scale(0.5);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
.btn-outline:hover::before,
.btn-card:hover::before,
.btn-text:hover::before {
  transform: scale(1);
  opacity: 1;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--teal);
  color: var(--teal-d);
  padding: 12px 22px;
  font-size: 13px;
}
.btn-outline:hover {
  background: transparent;
}
.btn-card {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink);
  padding: 10px 20px;
  font-size: 13px;
  margin-top: 16px;
  align-self: flex-start;
}
.btn-card:hover {
  background: transparent;
  border-color: var(--teal);
  color: var(--teal-d);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Outline-Buttons auf farbigen Kacheln (Praesentation/Prototyp im Projekt-Modal).
   Ohne diese Regel fuellt der Hover mit hellem --mist, waehrend die Schrift
   inline weiss bleibt -> Kontrastfehler. Hover kehrt deshalb um: weiss gefuellt,
   Text in der jeweiligen -d-Akzentfarbe der Kachel. */
.btn-outline-on-color {
  border-color: #fff;
  color: #fff;
}
.btn-outline-on-color::before {
  background: #fff;
}
.btn-outline-on-teal:hover {
  color: var(--teal-d);
}
.btn-outline-on-electric:hover {
  color: var(--electric-d);
}

/* 7. Tooltips */
.tooltip-host {
  position: relative;
  display: inline-block;
}
.bubble {
  position: absolute;
  bottom: 118%;
  left: 0;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  padding: 8px 12px;
  border-radius: 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 5;
}
.tooltip-host:hover .bubble,
.tooltip-host:focus-within .bubble {
  opacity: 1;
}

/* Touch-Ziele: unter 900px mindestens 44px hoch (WCAG 2.5.5 / Apple HIG) */
@media (max-width: 900px) {
  .btn {
    min-height: 44px;
  }
  .btn-outline {
    padding: 11px 20px;
    font-size: 13px;
  }
  .btn-primary {
    padding: 13px 24px;
  }
  /* Tooltips brauchen Hover — auf Touch nie sichtbar, also ausblenden */
  .tooltip-host .bubble {
    display: none;
  }
}
