/* sample01 상단 고정 플로팅 — SPA `MainBgmToggle.css` + `WeddingShareFab.css` + `Sample01BodyPaletteDock.css` */

.main-bgm-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--body-palette-floating-btn-border, rgb(255 255 255 / 0.34));
  border-radius: 50%;
  background: var(--body-palette-floating-btn-bg, rgb(40 40 40 / 0.72));
  color: rgb(255 255 255 / 0.92);
  box-shadow: 0 12px 34px rgb(0 0 0 / 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transform: translateY(0) scale(1);
  opacity: 1;
  transition:
    opacity 0.55s ease,
    transform 0.55s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.main-bgm-toggle__wave {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.main-bgm-toggle__icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 1px 5px rgb(0 0 0 / 0.25));
}

.main-bgm-toggle__icon svg {
  width: 19px;
  height: 19px;
}

.main-bgm-toggle--on {
  background: var(--body-palette-floating-btn-bg, rgb(40 40 40 / 0.72));
  border-color: var(--body-palette-floating-btn-border, rgb(255 255 255 / 0.34));
}

.main-bgm-toggle--hidden {
  opacity: 0;
  transform: translateY(10px) scale(0.92);
  pointer-events: none;
}

.main-bgm-toggle:focus-visible {
  outline: 2px solid rgb(255 255 255 / 0.9);
  outline-offset: 3px;
}

.wedding-floating-actions .wedding-share-fab {
  position: static;
  z-index: auto;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  opacity: 1;
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

.wedding-floating-actions .wedding-share-fab--hidden {
  opacity: 0;
  transform: translateY(10px) scale(0.92);
  pointer-events: none;
}

.wedding-share-fab__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--body-palette-floating-btn-border, rgb(255 255 255 / 0.34));
  border-radius: 50%;
  background: var(--body-palette-floating-btn-bg, rgb(40 40 40 / 0.72));
  color: rgb(255 255 255 / 0.92);
  box-shadow: 0 12px 34px rgb(0 0 0 / 0.22);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(10px);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

@supports not (backdrop-filter: blur(1px)) {
  .wedding-share-fab__btn {
    background: var(--body-palette-floating-btn-bg, rgb(40 40 40 / 0.78));
  }
}

.wedding-share-fab__btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 12px 34px rgb(0 0 0 / 0.22);
}

.wedding-share-fab__btn:active:not(:disabled) {
  transform: translateY(0);
  filter: brightness(1);
}

.wedding-share-fab__btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.wedding-share-fab__icon {
  display: flex;
  line-height: 0;
  color: rgb(255 255 255 / 0.92);
}

.wedding-share-fab__icon svg {
  display: block;
  width: 19px;
  height: 19px;
  filter: drop-shadow(0 0 1px rgb(0 0 0 / 0.25));
}

/* sample01 데모에서만 팔레트 표시 — `template-wedding-assets.js`가 html[data-withmarry-wedding-id] 설정 */
html:not([data-withmarry-wedding-id="sample01"]) .sample01-body-palette-dock {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.wedding-floating-actions .sample01-body-palette-dock:not(.sample01-body-palette-dock--disabled) {
  margin-right: auto;
}

.wedding-floating-actions .sample01-body-palette-dock {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 8px;
  width: auto;
  min-width: 44px;
  max-width: min(calc(100% - 64px), 200px);
  flex-shrink: 0;
  transform: translateY(0) scale(1);
  opacity: 1;
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

/* BGM·공유와 동일 — 유휴 숨김(패널 펼침 중 제외) */
.wedding-floating-actions .sample01-body-palette-dock.sample01-body-palette-dock--hidden:not(.sample01-body-palette-dock--panel-open) {
  opacity: 0;
  transform: translateY(10px) scale(0.92);
  pointer-events: none;
}

.wedding-floating-actions
  .sample01-body-palette-dock.sample01-body-palette-dock--hidden:not(.sample01-body-palette-dock--panel-open)
  > * {
  pointer-events: none;
}

.sample01-body-palette-dock--disabled {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.sample01-body-palette-dock--hidden {
  opacity: 0;
  transform: translateY(10px) scale(0.92);
  pointer-events: none;
}

.sample01-body-palette-dock--hidden > * {
  pointer-events: none;
}

/* 패널 펼침 중에는 스크롤 유휴 숨김을 적용하지 않음 */
.sample01-body-palette-dock--panel-open,
.sample01-body-palette-dock--panel-open.sample01-body-palette-dock--hidden {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.sample01-body-palette-dock--panel-open > * {
  pointer-events: auto;
}

.sample01-body-palette-dock__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--body-palette-floating-btn-border, rgb(255 255 255 / 0.34));
  background: var(--body-palette-floating-btn-bg, rgb(40 40 40 / 0.72));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 34px rgb(0 0 0 / 0.22);
  font: inherit;
  color: rgb(255 255 255 / 0.92);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}

.sample01-body-palette-dock__toggle-icons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.sample01-body-palette-dock__toggle-dot {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.55);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.22);
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sample01-body-palette-dock__toggle-dot--active {
  box-shadow:
    0 0 0 2px rgb(255 255 255 / 0.9),
    0 0 0 3px rgb(0 0 0 / 0.28);
  transform: scale(1.18);
}

.sample01-body-palette-dock__toggle:hover {
  filter: brightness(1.1);
}

.sample01-body-palette-dock__toggle:active {
  filter: brightness(1);
}

.sample01-body-palette-dock__toggle:focus-visible {
  outline: 2px solid var(--rsvp-accent);
  outline-offset: 2px;
}

.sample01-body-palette-dock__panel-wrap {
  overflow: hidden;
  width: 100%;
  max-height: 0;
  opacity: 0;
  transform: translateY(8px);
  transition:
    max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.28s ease,
    transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.sample01-body-palette-dock__panel-wrap--open {
  max-height: min(440px, 42vh);
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.sample01-body-palette-dock__panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 10.5rem;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--body-palette-floating-btn-border, rgb(255 255 255 / 0.34));
  background: var(--body-palette-floating-btn-bg, rgb(40 40 40 / 0.72));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 34px rgb(0 0 0 / 0.22);
}

.sample01-body-palette-dock__swatch {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  margin: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: var(--text-sm, 13px);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgb(255 255 255 / 0.78);
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    filter 0.15s ease;
}

.sample01-body-palette-dock__swatch:hover {
  filter: brightness(1.08);
  background: rgb(255 255 255 / 0.1);
}

.sample01-body-palette-dock__swatch:active {
  filter: brightness(1);
}

.sample01-body-palette-dock__swatch:focus-visible {
  outline: 2px solid rgb(255 255 255 / 0.9);
  outline-offset: 2px;
}

.sample01-body-palette-dock__swatch--active {
  color: rgb(255 255 255 / 0.96);
  background: rgb(255 255 255 / 0.14);
}

.sample01-body-palette-dock__dot {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgb(255 255 255 / 0.88);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.28), 0 2px 8px rgb(0 0 0 / 0.2);
}

.sample01-body-palette-dock__swatch--active .sample01-body-palette-dock__dot {
  box-shadow:
    0 0 0 2px rgb(255 255 255 / 0.95),
    0 0 0 3px rgb(0 0 0 / 0.32),
    0 2px 8px rgb(0 0 0 / 0.2);
}

@media (prefers-reduced-motion: reduce) {
  .main-bgm-toggle,
  .wedding-floating-actions .wedding-share-fab,
  .sample01-body-palette-dock {
    transition: none;
  }

  .wedding-share-fab__btn {
    transition: none;
  }

  .sample01-body-palette-dock__toggle {
    transition: none;
  }

  .sample01-body-palette-dock__toggle-dot {
    transition: none;
  }

  .sample01-body-palette-dock__toggle-dot--active {
    transform: none;
  }

  .sample01-body-palette-dock__toggle:hover,
  .sample01-body-palette-dock__toggle:active,
  .sample01-body-palette-dock__swatch:hover,
  .sample01-body-palette-dock__swatch:active {
    filter: none;
  }

  .sample01-body-palette-dock__panel-wrap {
    transition: none;
  }

  .sample01-body-palette-dock__panel-wrap--open {
    transform: none;
  }
}
