@property --sb-flow-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.specular-button {
  --sb-radius: 14px;
  --sb-tint: 247, 246, 242;
  --sb-tint-opacity: 0.56;
  --sb-text-color: #292927;
  --sb-ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 78px;
  margin: 0;
  border: 1px solid #b6500c;
  border-radius: var(--sb-radius);
  color: var(--sb-text-color);
  background: rgba(var(--sb-tint), var(--sb-tint-opacity));
  box-shadow: 0 12px 28px -22px rgba(41, 41, 39, 0.58);
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    transform 140ms var(--sb-ease-out),
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.specular-button::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: 1;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--sb-flow-angle),
    #b6500c 0deg 222deg,
    #8a8a86 258deg,
    #d8d8d4 282deg,
    #8a8a86 306deg,
    #b6500c 342deg 360deg
  );
  opacity: 0;
  pointer-events: none;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: opacity 140ms ease;
}

.shortcuts {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.shortcuts::-webkit-scrollbar {
  display: none;
}

.shortcut.specular-button {
  flex: 0 0 120px;
  min-width: 120px;
  min-height: 60px;
  padding: 12px 18px;
  overflow: visible;
}

.specular-button:focus-visible {
  outline: 3px solid #8b430f;
  outline-offset: 4px;
}

.specular-button__label {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  line-height: 1;
  transition: transform 140ms var(--sb-ease-out);
}

.specular-button:active {
  transform: scale(0.98);
}

.specular-button:active .specular-button__label {
  transform: scale(1.04);
}

.specular-button:active::before {
  opacity: 1;
  animation: sb-border-flow 760ms linear infinite;
}

@media (hover: hover) and (pointer: fine) {
  .specular-button:hover {
    background: rgba(255, 252, 247, 0.82);
    color: #8b430f;
    box-shadow: 0 16px 34px -22px rgba(139, 67, 15, 0.48);
  }

  .specular-button:hover .specular-button__label {
    transform: scale(1.04);
  }

  .specular-button:hover::before {
    opacity: 1;
    animation: sb-border-flow 1.4s linear infinite;
  }
}

@keyframes sb-border-flow {
  to {
    --sb-flow-angle: 360deg;
  }
}

@media (max-width: 900px) {
  .shortcuts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    overflow: visible;
    padding: 5px 0 14px;
  }

  .shortcut.specular-button {
    width: 100%;
    min-width: 0;
    min-height: 54px;
    padding: 11px 15px;
  }
}

@media (max-width: 480px) {
  .shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .specular-button {
    transition: none;
  }

  .specular-button:active {
    transform: none;
  }

  .specular-button::before {
    opacity: 0 !important;
    animation: none !important;
  }

  .specular-button__label {
    transition: none;
    transform: none;
  }
}

