/*
 * Founder-supplied MINTIT medallion-edge install control.
 * The narrow artwork is the whole control. No visible label, ever (Founder,
 * 2026-09-14); the accessible name carries the action. The transparent
 * semantic target stays generous.
 */

.function-deck {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: clamp(4.5rem, 10vh, 7.75rem);
  left: 0;
  display: grid;
  width: 4.75rem;
  min-height: 8rem;
  place-items: center;
  margin: auto;
}

.mint-edge-key {
  position: relative;
  display: grid;
  width: 4.75rem;
  min-height: 8rem;
  place-items: center;
  padding: .3rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mint-edge-art {
  display: block;
  width: 2.1875rem;
  height: 7.3125rem;
  background: var(--skin-action-edge) center / contain no-repeat;
  filter:
    brightness(.94)
    saturate(.96)
    drop-shadow(0 .45rem .5rem rgba(0, 0, 0, .58))
    drop-shadow(0 0 .42rem rgba(178, 139, 52, .16));
  pointer-events: none;
  transition: filter .16s ease, transform .16s ease;
  user-select: none;
}

.mint-edge-label {
  position: absolute;
  bottom: calc(100% - .18rem);
  left: 50%;
  color: #e1c36f;
  font: 800 .64rem/1 var(--mono, "Cascadia Mono", Consolas, monospace);
  letter-spacing: .18em;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 .12rem .16rem rgba(0, 0, 0, .9), 0 0 .5rem rgba(218, 180, 83, .24);
  transform: translate(-50%, .35rem);
  transition: opacity .14s ease, transform .14s ease, visibility 0s linear .14s;
  visibility: hidden;
  white-space: nowrap;
}

.mint-edge-key:hover .mint-edge-art,
.mint-edge-key:focus-visible .mint-edge-art {
  filter:
    brightness(1.06)
    saturate(1.02)
    drop-shadow(0 .5rem .55rem rgba(0, 0, 0, .62))
    drop-shadow(0 0 .58rem rgba(194, 154, 59, .24));
  transform: scale(1.025);
}

.mint-edge-key:active .mint-edge-art {
  filter: brightness(.86) saturate(.94) drop-shadow(0 .2rem .28rem rgba(0, 0, 0, .58));
  transform: scale(.96);
  transition-duration: .05s;
}

.mint-edge-key:focus,
.mint-edge-key:focus-visible {
  /* Chromium draws the generous semantic target as a large oval. Keep the
     keyboard cue on the gold label and illuminated artwork instead. */
  outline: none;
  box-shadow: none;
}

.mint-edge-key:disabled {
  cursor: wait;
}

.mint-edge-key:disabled .mint-edge-art {
  filter: brightness(.58) saturate(.55) drop-shadow(0 .3rem .34rem rgba(0, 0, 0, .42));
  opacity: .72;
}

@media (max-width: 420px) {
  .function-deck {
    bottom: max(10vh, calc(env(safe-area-inset-bottom) + 3rem));
  }
}

@media (max-height: 760px) {
  .function-deck {
    bottom: max(.75rem, env(safe-area-inset-bottom));
  }
}

@media (max-height: 420px) and (orientation: landscape) {
  .function-deck,
  .mint-edge-key {
    min-height: 5rem;
  }

  .function-deck {
    position: fixed;
    right: auto;
    left: 50%;
    bottom: max(.2rem, env(safe-area-inset-bottom));
    margin: 0;
    transform: translateX(-50%);
  }

  .mint-edge-art {
    width: 1.375rem;
    height: 4.6rem;
  }
}

@media (max-height: 260px) and (orientation: landscape) {
  .function-deck {
    position: static;
    margin: 2rem auto 0;
    transform: none;
  }
}

@media (hover: none) {
  .mint-edge-key:hover:not(:focus-visible):not(:active) .mint-edge-art {
    filter:
      brightness(.94)
      saturate(.96)
      drop-shadow(0 .45rem .5rem rgba(0, 0, 0, .58))
      drop-shadow(0 0 .42rem rgba(178, 139, 52, .16));
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mint-edge-art,
  .mint-edge-label {
    transition: none;
  }
}

@media (forced-colors: active) {
  .mint-edge-key {
    border: 2px solid ButtonText;
    forced-color-adjust: none;
  }

  .mint-edge-key:focus-visible {
    outline: 2px solid Highlight;
  }

  .mint-edge-label {
    color: ButtonText;
    text-shadow: none;
  }

  .mint-edge-key:disabled {
    border-color: GrayText;
  }
}
