/**
 * MaStore Live Chat — Atelier docket (cloakroom ticket), not a messenger.
 */
:root {
  --mlc-font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mlc-ease-spring: cubic-bezier(.32, .72, 0, 1);
}

body.mlc-scroll-locked,
html.mlc-scroll-locked {
  overflow: hidden !important;
  overscroll-behavior: contain !important;
}

#mastore-live-chat {
  display: block !important;
  position: fixed !important;
  z-index: 2147483000 !important;
  bottom: 0 !important;
  right: 0 !important;
  pointer-events: none !important;
  font-family: var(--mlc-font) !important;
  -webkit-font-smoothing: antialiased;
}

#mastore-live-chat.is-chat-open .mlc-fab-wrapper,
#mastore-live-chat.is-open .mlc-fab-wrapper {
  z-index: 2147483647 !important;
}

#mastore-live-chat * {
  box-sizing: border-box !important;
}

.mlc-fab-wrapper {
  position: fixed !important;
  right: 22px !important;
  bottom: 24px !important;
  z-index: 2147483010 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  pointer-events: auto !important;
}

.mlc-teaser {
  position: relative !important;
  background: #fff !important;
  color: #111 !important;
  border: 1.5px solid #111 !important;
  border-radius: 18px !important;
  padding: 12px 36px 12px 14px !important;
  margin-bottom: 10px !important;
  max-width: 240px !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  cursor: pointer !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(10px) !important;
  transition: opacity .3s var(--mlc-ease-spring), transform .3s var(--mlc-ease-spring), visibility .3s !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.mlc-teaser.is-visible {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

.mlc-teaser::after {
  content: "" !important;
  position: absolute !important;
  left: 18px !important;
  top: -7px !important;
  width: 14px !important;
  height: 14px !important;
  border: 1.5px solid #111 !important;
  border-radius: 50% !important;
  background: #fff !important;
  box-shadow: inset 0 0 0 3px #111 !important;
}

.mlc-teaser__avatar {
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .08em !important;
  border: 1.5px solid #111 !important;
  border-radius: 8px !important;
  padding: 4px 6px !important;
  flex-shrink: 0 !important;
}

.mlc-teaser__close {
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;
  width: 28px !important;
  height: 28px !important;
  border: 0 !important;
  background: transparent !important;
  color: #111 !important;
  cursor: pointer !important;
  font-size: 14px !important;
}

.mlc-teaser__body,
.mlc-teaser__text {
  color: #111 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
}

.mlc-fab {
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  background: #111 !important;
  color: #fff !important;
  border: 1.5px solid #111 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  transition: transform .2s var(--mlc-ease-spring) !important;
}

.mlc-fab::before {
  content: "" !important;
  position: absolute !important;
  inset: 5px !important;
  border: 1.5px solid #fff !important;
  border-radius: 50% !important;
  pointer-events: none !important;
}

.mlc-fab:hover {
  transform: scale(1.06) !important;
}

.mlc-fab:active {
  transform: scale(.96) !important;
}

.mlc-fab__icon-chat,
.mlc-fab__icon-close {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: opacity .2s, transform .2s !important;
}

.mlc-fab__icon-chat svg,
.mlc-fab__icon-close svg {
  width: 22px !important;
  height: 22px !important;
  stroke: #fff !important;
  fill: none !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.mlc-fab__icon-close {
  opacity: 0 !important;
  transform: rotate(-90deg) !important;
}

#mastore-live-chat.is-chat-open .mlc-fab__icon-chat,
#mastore-live-chat.is-open .mlc-fab__icon-chat {
  opacity: 0 !important;
}

#mastore-live-chat.is-chat-open .mlc-fab__icon-close,
#mastore-live-chat.is-open .mlc-fab__icon-close {
  opacity: 1 !important;
  transform: none !important;
}

.mlc-fab__dot {
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  background: #fff !important;
  border: 2px solid #111 !important;
  z-index: 2 !important;
}

.mlc-fab__badge {
  position: absolute !important;
  top: -8px !important;
  right: -8px !important;
  background: #fff !important;
  color: #111 !important;
  border: 1.5px solid #111 !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  min-width: 22px !important;
  height: 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform: scale(0) !important;
}

.mlc-fab__badge.is-visible {
  transform: scale(1) !important;
}

.mlc-panel {
  position: fixed !important;
  right: 24px !important;
  bottom: 110px !important;
  width: 360px !important;
  height: 640px !important;
  max-height: calc(100vh - 130px) !important;
  background: #fff !important;
  border: 1.5px solid #111 !important;
  border-radius: 22px !important;
  display: flex !important;
  z-index: 2147483646 !important;
  flex-direction: column !important;
  overflow: hidden !important;
  position: relative !important;
  pointer-events: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(20px) !important;
  transition: opacity .3s var(--mlc-ease-spring), transform .3s var(--mlc-ease-spring), visibility .3s !important;
  padding: 28px 0 0 !important;
}

.mlc-hole {
  position: absolute !important;
  top: 10px !important;
  left: 50% !important;
  width: 18px !important;
  height: 18px !important;
  margin-left: -9px !important;
  border: 1.5px solid #111 !important;
  border-radius: 50% !important;
  box-shadow: inset 0 0 0 4px #111 !important;
  background: #fff !important;
  z-index: 3 !important;
}

#mastore-live-chat.is-chat-open .mlc-panel,
#mastore-live-chat.is-open .mlc-panel,
#mastore-live-chat .mlc-panel.is-open,
.mlc-panel.is-open {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: none !important;
}

.mlc-header {
  background: #fff !important;
  color: #111 !important;
  padding: 8px 20px 16px !important;
  border-bottom: 1.5px dashed #111 !important;
  flex-shrink: 0 !important;
  pointer-events: auto !important;
  border-radius: 0 !important;
}

.mlc-header__row {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  width: 100% !important;
  gap: 8px !important;
}

.mlc-header__info {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  min-width: 0 !important;
}

.mlc-header__avatar-box,
.mlc-header__avatar {
  display: none !important;
}

.mlc-header__avatar {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  font-size: 11px !important;
  letter-spacing: -.06em !important;
}

.mlc-header__status-dot {
  position: absolute !important;
  right: -3px !important;
  bottom: -3px !important;
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  outline: 1.5px solid #111 !important;
}

.mlc-header__meta {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
}

.mlc-header__kicker {
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
  color: #111 !important;
}

.mlc-header__title {
  font-size: 22px !important;
  font-weight: 800 !important;
  letter-spacing: -.06em !important;
  line-height: 1 !important;
  color: #111 !important;
}

.mlc-header__subtitle {
  font-size: 12px !important;
  color: #3d3d3d !important;
}

.mlc-header__actions {
  display: flex !important;
  gap: 6px !important;
  pointer-events: auto !important;
}

.mlc-btn-icon {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  border-radius: 12px !important;
  background: #fff !important;
  border: 1.5px solid #111 !important;
  color: #111 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
}

.mlc-btn-icon:hover {
  background: #111 !important;
  color: #fff !important;
}

.mlc-btn-icon svg {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
  fill: none !important;
  stroke-width: 2 !important;
}

.mlc-body {
  flex: 1 1 auto !important;
  padding: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  background: #fff !important;
  pointer-events: auto !important;
}

.mlc-date-divider {
  align-self: stretch !important;
  text-align: center !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .16em !important;
  text-transform: uppercase !important;
  padding: 10px 20px !important;
  border-bottom: 1.5px solid #111 !important;
  background: #fff !important;
  color: #111 !important;
}

.mlc-msg-row {
  display: grid !important;
  grid-template-columns: 72px 1fr auto !important;
  gap: 8px 12px !important;
  max-width: none !important;
  width: 100% !important;
  padding: 12px 20px !important;
  border-bottom: 1.5px solid #111 !important;
  animation: mlc-msg-in .25s var(--mlc-ease-spring) both !important;
}

@keyframes mlc-msg-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mlc-msg-row.is-in,
.mlc-msg-row.is-out {
  align-self: stretch !important;
}

.mlc-msg-who {
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  padding-top: 2px !important;
}

.mlc-msg-bubble {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  background: transparent !important;
  color: inherit !important;
}

.mlc-msg-row.is-in {
  background: #fff !important;
  color: #111 !important;
}

.mlc-msg-row.is-out {
  background: #111 !important;
  color: #fff !important;
}

.mlc-msg-meta {
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .04em !important;
  opacity: .7 !important;
  white-space: nowrap !important;
  padding-top: 2px !important;
  justify-content: flex-end !important;
}

.mlc-quick-chips {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  padding: 14px 20px !important;
  margin: 0 !important;
  border-bottom: 1.5px solid #111 !important;
}

.mlc-chip {
  background: #fff !important;
  color: #111 !important;
  border: 1.5px solid #111 !important;
  border-radius: 999px !important;
  min-height: 40px !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  cursor: pointer !important;
}

.mlc-chip:hover {
  background: #111 !important;
  color: #fff !important;
}

.mlc-footer {
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
  background: #fff !important;
  border-top: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
  pointer-events: auto !important;
}

.mlc-input-capsule {
  display: grid !important;
  grid-template-columns: auto 1fr auto !important;
  align-items: end !important;
  gap: 10px !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1.5px solid #111 !important;
  border-radius: 0 !important;
  padding: 0 0 8px !important;
}

.mlc-input-capsule:focus-within {
  outline: none !important;
  box-shadow: none !important;
}

.mlc-input-label {
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
  padding-bottom: 6px !important;
}

.mlc-textarea {
  border: 0 !important;
  background: transparent !important;
  outline: none !important;
  font: inherit !important;
  font-size: 16px !important;
  line-height: 1.4 !important;
  color: #111 !important;
  resize: none !important;
  min-height: 28px !important;
  max-height: 96px !important;
  padding: 4px 0 !important;
}

.mlc-textarea::placeholder {
  color: #6a6a6a !important;
}

.mlc-send-btn {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  background: #111 !important;
  color: #fff !important;
  border: 1.5px solid #111 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.mlc-send-btn:disabled {
  background: #fff !important;
  color: #111 !important;
  opacity: .35 !important;
  cursor: not-allowed !important;
}

.mlc-send-btn svg {
  width: 16px !important;
  height: 16px !important;
  stroke: currentColor !important;
  fill: none !important;
}

.mlc-footer__tg-link {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #111 !important;
  text-decoration: none !important;
  letter-spacing: .04em !important;
}

.mlc-footer__tg-link:hover {
  text-decoration: underline !important;
}

.mlc-ticks {
  color: inherit !important;
  font-weight: 800 !important;
}

.mlc-scrim {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, .78) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  z-index: 2147483640 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity .3s ease, visibility .3s ease !important;
}

#mastore-live-chat.is-chat-open .mlc-scrim,
#mastore-live-chat.is-open .mlc-scrim,
.mlc-scrim.is-on {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

@media (max-width: 1024px) {
  .mlc-fab-wrapper {
    right: 16px !important;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 640px) {
  .mlc-panel {
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 92vh !important;
    max-height: 92vh !important;
    border-radius: 22px 22px 0 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    transform: translateY(100%) !important;
  }

  #mastore-live-chat.is-chat-open .mlc-panel,
  #mastore-live-chat.is-open .mlc-panel,
  .mlc-panel.is-open {
    transform: none !important;
  }

  .mlc-fab-wrapper {
    right: 14px !important;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mlc-msg-row {
    grid-template-columns: 56px 1fr auto !important;
    padding: 12px 16px !important;
  }
}

body.drawer-open #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body.popup-enable #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body.popup-open #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body.mfp-open #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
html.mfp-ready #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
html.mp-fs #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body.mp-fs #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body.mc-drawer-open #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body.msc-open #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body.msd-open #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body.msh-open #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has(.drawer.active) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has(.drawer.is-open) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has(.msd-sheet.is-open) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has(.msd-sheet.active) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has(.msd-sheet[aria-hidden="false"]) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has(.msd-search.is-open) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has(.msd-search[aria-hidden="false"]) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has(.msc-drawer.is-open) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has(.msc-drawer.active) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has(.msh-mega.is-open) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has(.popup-screen.active) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has(.quickview:not(.mfp-hide)) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has(.mcs.is-open) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has([data-mcs].is-open) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has(.mcs:not([hidden])) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has(.size-guide:not([hidden])) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has([id*="size-guide"]:not([hidden])) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has([class*="size-guide"].is-open) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has(.mp-gallery.is-full) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has([data-mp-gallery].is-full) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has(.pswp--open) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
body:has(.pswp--visible) #mastore-live-chat:not(.is-chat-open) .mlc-fab-wrapper,
#mastore-live-chat.is-suppressed:not(.is-chat-open) .mlc-fab-wrapper,
#mastore-live-chat.is-suppressed:not(.is-chat-open) .mlc-fab,
#mastore-live-chat.is-suppressed:not(.is-chat-open) .mlc-teaser {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .mlc-panel, .mlc-fab, .mlc-teaser, .mlc-msg-row {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
