/**
 * “בחזרה לדף הבית” — one shared control (visual + placement slots).
 * Slots: --slot-fixed (top corner), --slot-footer (page footer).
 */

.maestro-btn-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  padding: 8px 16px;
  min-height: 40px;
  min-width: 0;
  font-family: "Rubik", "Assistant", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  color: rgba(62, 54, 48, 0.92);
  text-decoration: none;
  white-space: nowrap;
  background: rgba(255, 252, 248, 0.96);
  border: 1px solid rgba(62, 54, 48, 0.1);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(44, 38, 32, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.maestro-btn-home:hover {
  color: #2d2822;
  background: #fff;
  border-color: rgba(62, 54, 48, 0.14);
  box-shadow: 0 8px 24px rgba(44, 38, 32, 0.16);
  text-decoration: none;
}

.maestro-btn-home:active {
  transform: scale(0.98);
}

.maestro-btn-home:focus-visible {
  outline: 2px solid rgba(122, 83, 194, 0.55);
  outline-offset: 2px;
}

/* Primary placement: fixed top-start (store, quiz, kit pages, success/fail) */
.maestro-btn-home--slot-fixed,
.maestro-btn-home--fixed {
  position: fixed;
  z-index: 120;
  top: clamp(12px, 2.5vw, 18px);
  inset-inline-start: clamp(12px, 3vw, 20px);
}

/* Footer placement (store + listen) */
.maestro-home-slot--footer {
  display: flex;
  justify-content: center;
  margin-top: 1.35rem;
  padding-top: 0.25rem;
}

.maestro-btn-home--slot-footer {
  box-shadow: 0 6px 20px rgba(44, 38, 32, 0.14);
}

/* Legacy aliases */
.maestro-btn-home--quiz {
  z-index: 120;
}

.mp-kit-page__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  min-height: 40px;
  font-family: "Rubik", "Assistant", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(62, 54, 48, 0.92);
  text-decoration: none;
  white-space: nowrap;
  background: rgba(255, 252, 248, 0.96);
  border: 1px solid rgba(62, 54, 48, 0.1);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(44, 38, 32, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: fixed;
  z-index: 120;
  top: clamp(12px, 2.5vw, 18px);
  inset-inline-start: clamp(12px, 3vw, 20px);
}

.mp-kit-page__back:hover {
  color: #2d2822;
  background: #fff;
  box-shadow: 0 8px 24px rgba(44, 38, 32, 0.16);
}

@media (max-width: 480px) {
  .maestro-btn-home {
    padding: 7px 14px;
    min-height: 38px;
    font-size: 0.9rem;
  }

  .maestro-btn-home--slot-fixed,
  .maestro-btn-home--fixed {
    top: 10px;
    inset-inline-start: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .maestro-btn-home,
  .mp-kit-page__back {
    transition: none;
  }

  .maestro-btn-home:active,
  .mp-kit-page__back:active {
    transform: none;
  }
}
