/* TP Forms: header "Share your story" button (menu item with class menu-item-cta) */

.menu-item-cta > a.btn {
  --cta-a: #f39a4a;
  --cta-b: var(--color-accent, #dd6b2a);
  --cta-c: var(--color-accent-dark, #c2581d);

  position: relative;
  isolation: isolate;
  overflow: hidden;
  gap: 9px;
  padding: 11px 20px 11px 16px;
  border: 0;
  background: linear-gradient(135deg, var(--cta-a) 0%, var(--cta-b) 48%, var(--cta-c) 100%);
  background-size: 160% 160%;
  background-position: 0% 50%;
  color: #fff;
  box-shadow:
    0 8px 20px -6px rgba(221, 107, 42, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 0 rgba(120, 50, 10, 0.18);
  letter-spacing: 0.01em;
  text-shadow: 0 1px 0 rgba(120, 50, 10, 0.25);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s, background-position 0.5s;
}

/* Paw icon */
.menu-item-cta > a.btn::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='16.2' rx='5.2' ry='4.4'/%3E%3Cellipse cx='5.2' cy='10.6' rx='2.2' ry='2.7' transform='rotate(-18 5.2 10.6)'/%3E%3Cellipse cx='18.8' cy='10.6' rx='2.2' ry='2.7' transform='rotate(18 18.8 10.6)'/%3E%3Cellipse cx='9.1' cy='6' rx='2.2' ry='2.8' transform='rotate(-6 9.1 6)'/%3E%3Cellipse cx='14.9' cy='6' rx='2.2' ry='2.8' transform='rotate(6 14.9 6)'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='16.2' rx='5.2' ry='4.4'/%3E%3Cellipse cx='5.2' cy='10.6' rx='2.2' ry='2.7' transform='rotate(-18 5.2 10.6)'/%3E%3Cellipse cx='18.8' cy='10.6' rx='2.2' ry='2.7' transform='rotate(18 18.8 10.6)'/%3E%3Cellipse cx='9.1' cy='6' rx='2.2' ry='2.8' transform='rotate(-6 9.1 6)'/%3E%3Cellipse cx='14.9' cy='6' rx='2.2' ry='2.8' transform='rotate(6 14.9 6)'/%3E%3C/svg%3E") center / contain no-repeat;
  transform-origin: 50% 80%;
  transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}

/* Shine that sweeps across once after load, and on hover */
.menu-item-cta > a.btn::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-18deg);
  animation: tpf-cta-shine 1.1s ease-out 1.4s 1 both;
  pointer-events: none;
}

.menu-item-cta > a.btn:hover,
.menu-item-cta > a.btn:focus-visible {
  background-position: 100% 50%;
  color: #fff;
  transform: translateY(-2px);
  box-shadow:
    0 14px 26px -8px rgba(221, 107, 42, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 0 rgba(120, 50, 10, 0.2);
}

.menu-item-cta > a.btn:hover::before,
.menu-item-cta > a.btn:focus-visible::before {
  transform: rotate(-16deg) scale(1.12);
}

.menu-item-cta > a.btn:hover::after {
  animation: tpf-cta-shine 0.8s ease-out 1 both;
}

.menu-item-cta > a.btn:active {
  transform: translateY(0);
  box-shadow: 0 5px 12px -6px rgba(221, 107, 42, 0.6), inset 0 2px 4px rgba(120, 50, 10, 0.25);
}

.menu-item-cta > a.btn:focus-visible {
  outline: 3px solid var(--color-accent-soft, #fbe6d2);
  outline-offset: 3px;
}

/* On the Share your story page itself */
.menu-item-cta.current-menu-item > a.btn,
.menu-item-cta.current_page_item > a.btn {
  box-shadow:
    0 0 0 3px var(--color-accent-soft, #fbe6d2),
    0 8px 20px -6px rgba(221, 107, 42, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

@keyframes tpf-cta-shine {
  from {
    left: -60%;
  }
  to {
    left: 120%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-item-cta > a.btn,
  .menu-item-cta > a.btn::before {
    transition: none;
  }

  .menu-item-cta > a.btn::after {
    animation: none;
    display: none;
  }

  .menu-item-cta > a.btn:hover {
    transform: none;
  }
}
