/*
* for supported in all modern browsers
* Copyright 마케터비
* 마케터비
* Quick buttons: Style A(하단 고정바) / Style B(하단 알약형)
*/

/* ===== shared base ===== */
.xet-layout-quickbutton {
  z-index: 88;
  position: fixed;
  transition: var(--transition-all);
}
.xet-layout-quickbutton > ul {
  display: flex;
}
.xet-layout-quickbutton a {
  color: var(--on-dark-strong-color);
}
.xet-layout-quickbutton a > span {
  display: flex;
  align-items: center;
  justify-content: center;
}
.xet-layout-quickbutton a > strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 하단 여백/스크롤탑 버튼 위치 보정은 layout.css의 body.quickbutton 규칙에서 처리합니다.
   (이 파일에 있던 무조건 body{padding-bottom:72px} 규칙은 퀵버튼 OFF 상태에서도
   모든 모바일 페이지 하단에 불필요한 여백을 만드는 버그였으므로 제거했습니다.) */

/* =====================================================================
   전화 버튼 쉬머(반짝임) 효과 — href가 tel:로 시작하는 버튼에만, 계속 반복
   ===================================================================== */
@keyframes quickbtnShimmer {
  0%, 45% {
    transform: translateX(-150%) skewX(-18deg);
  }
  100% {
    transform: translateX(250%) skewX(-18deg);
  }
}
.xet-layout-quickbutton a[href^="tel:"] {
  position: relative;
  overflow: hidden;
}
.xet-layout-quickbutton a[href^="tel:"]::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.65) 50%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(-150%) skewX(-18deg);
  animation: quickbtnShimmer 2.8s ease-in-out infinite;
  pointer-events: none;
}
/* 데스크탑 A 스타일은 배경이 아이콘 원(span)에만 있고,
   hover 시 라벨이 원 밖으로 확장되므로 overflow:hidden을 쓰면 안 됨 →
   a 자체의 쉬머는 끄고 아이콘 원(span)에 쉬머를 적용 */
@media (min-width: 1024px) {
  .xet-layout-quickbutton.quick-style-A a[href^="tel:"] {
    overflow: visible;
  }
  .xet-layout-quickbutton.quick-style-A a[href^="tel:"]::after {
    display: none;
  }
  .xet-layout-quickbutton.quick-style-A a[href^="tel:"] > span {
    position: relative;
    overflow: hidden;
  }
  .xet-layout-quickbutton.quick-style-A a[href^="tel:"] > span::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0) 100%);
    transform: translateX(-150%) skewX(-18deg);
    animation: quickbtnShimmer 2.8s ease-in-out infinite;
    pointer-events: none;
  }
}

/* =====================================================================
   STYLE A — 하단 고정바 (mobile: full-width equal columns / icon over label)
   ===================================================================== */
.xet-layout-quickbutton.quick-style-A {
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.14);
}
.quick-style-A > ul {
  display: flex;
}
.quick-style-A > ul > li {
  flex: 1;
  min-width: 0;
}
.quick-style-A > ul > li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 60px;
  padding: 6px 4px;
  overflow: hidden;
  background-color: var(--theme-color);
  color: var(--on-dark-strong-color);
}
.quick-style-A > ul > li a > span > i {
  font-size: 1.25rem;
  line-height: 1;
}
.quick-style-A > ul > li a > strong {
  max-width: 100%;
  font-size: 0.75rem;
  line-height: 1.2;
}
.quick-style-A > ul > li:hover > a {
  background-color: var(--theme-color);
  color: var(--on-dark-strong-color);
  filter: brightness(0.94);
}

/* =====================================================================
   STYLE B — 하단 알약형 (mobile: 화면 폭 꽉 채운 개별 알약버튼 나열형)
   ===================================================================== */
.xet-layout-quickbutton.quick-style-B {
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
}
.quick-style-B > ul {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.quick-style-B > ul > li {
  flex: 1;
  min-width: 0;
}
.quick-style-B > ul > li a {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 54px;
  padding: 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background-color: var(--theme-color);
  color: var(--on-dark-strong-color);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}
.quick-style-B > ul > li a > span {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
}
.quick-style-B > ul > li a > span > i {
  font-size: 1.05rem;
  line-height: 1;
}
.quick-style-B > ul > li a > strong {
  max-width: 100%;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
}
.quick-style-B > ul > li:hover > a {
  filter: brightness(0.94);
}

/* =====================================================================
   DESKTOP (>= 1024px) — both styles pin to right-center
   ===================================================================== */
@media (min-width: 1024px) {
  /* 데스크탑에서는 퀵버튼을 항상 숨김 (관리자 설정과 무관, 모바일 전용 기능) */
  .xet-layout-quickbutton {
    display: none !important;
  }

  /* 아래 선택자를 .quick-style-A/.quick-style-B 둘 다 명시해서
     클래스 2개짜리인 위쪽 모바일 전용 규칙(.xet-layout-quickbutton.quick-style-A/B)과
     명시도(specificity)를 맞춰야 데스크탑에서 정상적으로 덮어씌워집니다.
     (기존에는 이 규칙이 클래스 1개(.xet-layout-quickbutton)라서 명시도가 낮아,
      위쪽 모바일 규칙의 left/right/bottom/transform 값이 데스크탑에서도 계속 이겨버려
      우측 중앙 고정이 아니라 모바일 위치 그대로 렌더링되던 버그가 있었습니다.) */
  .xet-layout-quickbutton.quick-style-A,
  .xet-layout-quickbutton.quick-style-B {
    top: 50%;
    left: auto;
    right: 20px;
    bottom: auto;
    transform: translateY(-50%);
    border-radius: 0;
    background: none !important;
    box-shadow: none;
    overflow: visible;
  }
  .xet-layout-quickbutton.sub {
    right: 36px;
  }
  .xet-layout-quickbutton.is-scroll {
    right: 20px;
    transform: translateY(-50%);
  }

  /* ----- Style A desktop: vertical stack, hover-expand pill labels ----- */
  .quick-style-A > ul {
    display: block;
  }
  .quick-style-A > ul > li {
    display: block;
  }
  .quick-style-A > ul > li + li {
    margin-top: var(--gap2x);
  }
  .quick-style-A > ul > li a {
    position: relative;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 0;
    height: auto;
    padding: 0;
    overflow: visible;
    border-radius: 52.5px;
    background: none !important;
  }
  .quick-style-A > ul > li a > span {
    z-index: 3;
    flex-shrink: 0;
    width: 50.8px;
    height: 50.8px;
    border-radius: 50%;
    border: 1px solid var(--on-dark-border-color);
    color: var(--on-dark-strong-color);
    transition: all 0.25s ease;
  }
  .quick-style-A > ul > li a > span > i {
    font-size: 22.4px;
    color: var(--on-dark-base-color);
    transition: all 0.25s ease;
  }
  .quick-style-A > ul > li a > strong {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    width: 50.8px;
    height: 50.8px;
    margin: 0;
    font-size: 14px;
    border-radius: 50.8px;
    background-color: var(--bg-color);
    color: var(--text-strong-color);
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
  }
  .quick-style-A > ul > li:hover > a {
    width: auto;
    overflow: visible;
    background: none;
    filter: none;
  }
  .quick-style-A > ul > li:hover > a > span {
    background-color: var(--theme-color);
    border-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.22);
  }
  .quick-style-A > ul > li:hover > a > span > i {
    font-size: 28px;
    color: var(--on-dark-strong-color);
  }
  .quick-style-A > ul > li:hover > a > strong {
    right: 0;
    width: auto;
    padding-right: 64.8px;
    padding-left: 28px;
    opacity: 1;
    visibility: visible;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.22);
  }

  /* ----- Style B desktop: vertical stack of always-visible rounded pills ----- */
  .quick-style-B > ul {
    display: block;
    padding: 0;
    background: none;
    box-shadow: none;
  }
  .quick-style-B > ul > li {
    display: block;
  }
  .quick-style-B > ul > li + li {
    margin-top: var(--gap2x);
  }
  .quick-style-B > ul > li a {
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
    width: auto;
    height: auto;
    padding: 10px 20px 10px 14px;
    border-radius: 999px;
    background-color: var(--theme-color);
    color: var(--on-dark-strong-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.25s ease;
  }
  .quick-style-B > ul > li a > span {
    width: 33.6px;
    height: 33.6px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.18);
  }
  .quick-style-B > ul > li a > span > i {
    font-size: 19.6px;
  }
  .quick-style-B > ul > li a > strong {
    font-size: 13.3px;
  }
  .quick-style-B > ul > li:hover > a {
    filter: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
    transform: translateX(-4px);
  }
}
@media (min-width: 1200px) {
  .xet-layout-quickbutton {
    right: 24px;
  }
  .xet-layout-quickbutton.sub {
    right: 40px;
  }
  .xet-layout-quickbutton.is-scroll {
    right: 24px;
  }
}
@media (min-width: 1440px) {
  .xet-layout-quickbutton {
    right: 30px;
  }
  .xet-layout-quickbutton.sub {
    right: 46px;
  }
  .xet-layout-quickbutton.is-scroll {
    right: 30px;
  }
}
