/* Shared spring surfaces, navigation and tooltips. */
:root {
  --mk-surface: #ffffff;
  --mk-surface-elev: #f7f5f0;
  --mk-pill-bg: #151519;
  --mk-pill-fg: #ffffff;
  --mk-pill-muted: rgba(21, 21, 25, 0.08);
  --mk-edge: rgba(20, 20, 24, 0.12);
  --mk-green: #16a34a;
  --mk-green-soft: rgba(22, 163, 74, 0.13);
  --mk-green-ink: #15803d;
  --mk-orange: #ea784e;
  --mk-shadow: 0 18px 42px -18px rgba(18, 18, 24, 0.24);
}

html[data-theme=dark] {
  --mk-surface: #181a21;
  --mk-surface-elev: #1f222b;
  --mk-pill-bg: #f4f1ea;
  --mk-pill-fg: #141418;
  --mk-pill-muted: rgba(255, 255, 255, 0.09);
  --mk-edge: rgba(255, 255, 255, 0.14);
  --mk-green: #22c55e;
  --mk-green-soft: rgba(34, 197, 94, 0.18);
  --mk-green-ink: #4ade80;
  --mk-shadow: 0 22px 48px -18px rgba(0, 0, 0, 0.65);
}

/* =========================================================================
   1. RUBBER DOCK — Elastic dual-edge highlight pill (nav, hero, filters, editor)
   ========================================================================= */
.mk-rubber-host {
  position: relative;
}

.mk-rubber-pill {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  will-change: transform, width;
  background: var(--mk-pill-bg);
  box-shadow: 0 6px 16px -6px rgba(18, 18, 22, 0.34);
}

.site-header nav.mk-rubber-host .mk-rubber-pill {
  background: color-mix(in srgb, var(--ui-accent, #ea784e) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--ui-accent, #ea784e) 32%, transparent);
  box-shadow: none;
}

.gallery-filters.mk-rubber-host .mk-rubber-pill {
  border-radius: 10px;
  background: var(--ui-accent, #ea784e);
  box-shadow: 0 8px 18px -8px rgba(234, 120, 78, 0.55);
}

.studio-tabs.mk-rubber-host .mk-rubber-pill {
  border-radius: 12px;
  background: color-mix(in srgb, var(--ui-accent, #ea784e) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--ui-accent, #ea784e) 42%, transparent);
  box-shadow: none;
}

.studio-filters.mk-rubber-host .mk-rubber-pill,
.format-pills.mk-rubber-host .mk-rubber-pill {
  border-radius: 10px;
  background: color-mix(in srgb, var(--ui-accent, #ea784e) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--ui-accent, #ea784e) 46%, transparent);
  box-shadow: none;
}

.mk-rubber-host > :not(.mk-rubber-pill) {
  position: relative;
  z-index: 1;
}

.product-ui.preview-home .hero-style-bar.mk-rubber-ready button[data-cover-style][aria-pressed=true],
.product-ui.preview-home .hero-style-bar.mk-rubber-ready button[data-cover-style][aria-pressed=true]:hover,
html[data-theme=dark] .product-ui.preview-home .hero-style-bar.mk-rubber-ready button[data-cover-style][aria-pressed=true],
html[data-theme=dark] .product-ui.preview-home .hero-style-bar.mk-rubber-ready button[data-cover-style][aria-pressed=true]:hover {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.gallery-filters.mk-rubber-ready button[aria-pressed=true] {
  background: transparent;
  border-color: transparent;
  color: #1f110b;
}

.studio-tabs.mk-rubber-ready button[aria-selected=true],
.studio-filters.mk-rubber-ready button[aria-pressed=true],
.format-pills.mk-rubber-ready button[aria-pressed=true] {
  background: transparent;
  border-color: transparent;
}

/* =========================================================================
   2. MORPH TOOLTIP — Shared elastic tooltip + spring tail (Editor rail & toolbar)
   ========================================================================= */
.mk-morph-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  pointer-events: none;
  opacity: 0;
  will-change: transform, width, opacity;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--mk-pill-bg);
  color: var(--mk-pill-fg);
  font: 600 12px/16px var(--ui-font, Manrope, sans-serif);
  letter-spacing: -0.01em;
  white-space: nowrap;
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.42);
  overflow: visible;
}

.mk-morph-tooltip-clip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  height: 20px;
}

.mk-morph-tooltip-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  will-change: transform, opacity;
}

.mk-morph-tooltip-tail {
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 1.5px;
  background: var(--mk-pill-bg);
  transform-origin: center;
  will-change: transform;
}

.mk-morph-tooltip.is-below .mk-morph-tooltip-tail {
  bottom: auto;
  top: -4px;
}

:root{--motion-accent:var(--ui-accent,#e87a54);--motion-bg:var(--ui-surface,var(--surface,#fff));--motion-ink:var(--ui-text,var(--ink,#202026));--motion-line:var(--ui-border,var(--line,#dedee4))}
.mk-rubber-pill,.mk-morph-tooltip,.mk-morph-tooltip-label,.mk-morph-tooltip-tail{will-change:auto}
