/* Isolated presentation: desktop keeps the original Atelier and AI controls. */
.kvc-mobile-actions,
.kvc-mobile-ai-help { display: none !important; }

@media (max-width: 750px) {
  body {
    /* Dock measurement includes the bottom safe area when the menu is visible.
       Only add the safe area itself when there is no dock to clear. */
    --kvc-mobile-dock-clear: max(var(--kvc-mobile-dock-offset, 0px), env(safe-area-inset-bottom, 0px));
    --kvc-mobile-bar-safe: max(0px, calc(env(safe-area-inset-bottom, 0px) - var(--kvc-mobile-dock-offset, 0px)));
  }
  body .kovamet-mobile-buy-bar.kvc-mobile-native-replaced { display: none !important; }

  body .kovamet-ai-widget.kvc-mobile-ai-compact {
    left: calc(12px + env(safe-area-inset-left, 0px)) !important;
    right: auto !important;
    bottom: calc(12px + var(--kvc-mobile-dock-clear)) !important;
    z-index: 2147482000 !important;
    width: auto;
  }

  body .kvc-mobile-ai-compact .kovamet-ai-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    padding: 0 !important;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: #272928;
    color: #fff;
    font-size: 0 !important;
    line-height: 0;
    box-shadow: 0 3px 12px rgba(39,41,40,.18);
    touch-action: manipulation;
  }
  body .kvc-mobile-ai-compact .kovamet-ai-trigger::before {
    content: "";
    display: block;
    width: 25px;
    height: 25px;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22.3 12.9a8.9 8.9 0 0 1-9 8.5 10 10 0 0 1-3.6-.7L4.5 23l1.4-4.8a8.1 8.1 0 0 1-1.6-4.9 8.8 8.8 0 0 1 9-8.5'/%3E%3Cpath d='M21 3l1.2 3.6L26 8l-3.8 1.3L21 13l-1.3-3.7L16 8l3.7-1.4L21 3Z' fill='white' stroke='none'/%3E%3Cpath d='M9 13h.1m4 0h.1m4 0h.1' stroke-width='2.2'/%3E%3C/svg%3E");
  }
  body.kvc-mobile-controls-blocked .kvc-mobile-ai-compact { visibility: hidden; }
  body.kvc-mobile-buy-visible .kovamet-ai-widget.kvc-mobile-ai-compact {
    bottom: calc(8px + var(--kvc-mobile-dock-clear)) !important;
  }
  body.kvc-mobile-buy-visible .kvc-mobile-ai-compact .kovamet-ai-trigger {
    box-shadow: none;
  }

  body .kvc-mobile-actions:not([hidden]) {
    display: flex !important;
    position: fixed;
    inset: auto 0 var(--kvc-mobile-dock-offset, 0px);
    z-index: 149;
    align-items: center;
    box-sizing: border-box;
    min-height: 62px;
    padding: 8px calc(12px + env(safe-area-inset-right, 0px)) calc(8px + var(--kvc-mobile-bar-safe)) calc(12px + env(safe-area-inset-left, 0px));
    border-top: 1px solid rgba(39,41,40,.12);
    background: #fff;
    box-shadow: 0 -3px 14px rgba(39,41,40,.07);
  }
  body.kvc-mobile-has-ai .kvc-mobile-actions:not([hidden]) {
    padding-left: calc(70px + env(safe-area-inset-left, 0px));
  }
  body .kvc-mobile-buy-action {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 46px;
    min-width: 0;
    margin: 0;
    padding: 10px 14px;
    border: 0;
    border-radius: 4px;
    background: #272928;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    line-height: 1.25;
    touch-action: manipulation;
  }
  /* Preserve access to the very end of the page even when the bar is shown. */
  body.single-product.kvc-mobile-has-purchase {
    padding-bottom: calc(62px + var(--kvc-mobile-dock-clear));
  }

  body .kvc-mobile-ai-help {
    display: inline-flex !important;
    align-items: center;
    box-sizing: border-box;
    min-height: 44px;
    max-width: 100%;
    margin: 6px 0 12px;
    padding: 6px 0;
    text-align: left;
    border: 0;
    background: transparent;
    color: #515b55;
    text-decoration: underline;
    text-underline-offset: 3px;
    font: inherit;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
  }
  body .kvc-mobile-buy-action:focus-visible,
  body .kvc-mobile-ai-help:focus-visible,
  body .kvc-mobile-ai-compact .kovamet-ai-trigger:focus-visible {
    outline: 2px solid #a86b49;
    outline-offset: 3px;
  }
}
