/**
 * ============================================================================
 * LOCAL CHEROKEE — SPECULAR BUTTON ENGINE STYLES
 * ============================================================================
 * Glassmorphic specular-reflective button system powered by WebGL2 shaders.
 * Edge catches real-time specular highlights tracking the user's cursor.
 * ============================================================================
 */

.specular-button {
  --sb-radius: 18px;
  --sb-tint: #ffffff;
  --sb-tint-opacity: 0.04;
  --sb-blur: 0px;
  --sb-text-color: #f5f5f5;

  position: relative !important;
  isolation: isolate !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5em !important;
  border-radius: var(--sb-radius) !important;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(var(--sb-blur));
  backdrop-filter: blur(var(--sb-blur));
  cursor: pointer !important;
  outline: none !important;
  overflow: visible !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease;
}

.specular-button:active {
  transform: scale(0.97) !important;
}

.specular-button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--sb-text-color, #ffffff) 55%, transparent) !important;
  outline-offset: 3px !important;
}

.specular-button:disabled,
.specular-button[disabled] {
  opacity: 0.5 !important;
  cursor: default !important;
  pointer-events: none !important;
}

.specular-button:disabled:active,
.specular-button[disabled]:active {
  transform: none !important;
}

.specular-button--sm {
  padding: 10px 20px;
  font-size: 0.875rem;
}

.specular-button--md {
  padding: 14px 28px;
  font-size: 1rem;
}

.specular-button--lg {
  padding: 18px 38px;
  font-size: 1.125rem;
}

/* Light highlight canvas covering button border and extending outward */
.specular-button__light {
  position: absolute !important;
  inset: -24px !important;
  z-index: 1 !important;
  display: block !important;
  width: calc(100% + 48px) !important;
  height: calc(100% + 48px) !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

/* Protected content layer placed above the WebGL specular light */
.specular-button__label {
  position: relative !important;
  z-index: 2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: inherit !important;
  width: 100%;
  pointer-events: auto;
  text-decoration: none !important;
  color: inherit !important;
}

/* Retain custom theme color variables on action buttons */
.specular-button.action-btn.main {
  color: #ffffff !important;
}

.specular-button.action-btn.outline {
  background: rgba(255, 255, 255, 0.05);
}

.specular-button.pkg-tab-btn {
  overflow: visible !important;
}

/* Ensure modal close buttons and fixed controls are NEVER forced into relative flow */
.gallery-close,
.gallery-modal .gallery-close,
button.gallery-close,
[data-no-specular] {
  position: fixed !important;
  top: 24px !important;
  right: 24px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 100000 !important;
}
