/*
* 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 {
  /* [2026-08-22] 아이콘 위/텍스트 아래로 쌓던 구성이 글자를 12px 로 작게 만들어야
     했다 - 사용자가 첨부한 레퍼런스처럼 아이콘 좌측 + 텍스트 우측 가로 배치로
     바꾸고, 그만큼 확보된 공간으로 폰트를 실제로 읽기 좋은 크기로 키운다. */
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  /* [2026-08-24] 9글자 라벨이 "..." 로 잘리는 문제 - 좁은 폰(320~360px)에서 3등분된
     칸 폭이 라벨 길이를 못 따라가서 생긴다. 간격/패딩을 화면 폭에 비례해 줄여
     텍스트에 공간을 더 준다(넓은 폰에서는 기존 8px/10px 그대로).
     [2026-08-24 추가] 아이콘-글자 간격이 멀어 보인다는 피드백으로 거의 붙을 정도로
     더 좁힌다 - 어차피 2줄 줄바꿈이 허용돼 있어 간격을 줄인 만큼 폰트를 키울
     여유가 생긴다. */
  gap: clamp(0px, 0.5vw, 2px);
  height: 60px;
  padding: 6px clamp(6px, 2vw, 10px);
  overflow: hidden;
  background-color: var(--theme-color);
  color: var(--on-dark-strong-color);
}
.quick-style-A > ul > li a > span > i {
  /* [2026-08-24] 간격을 줄여 확보한 여유만큼 아이콘도 다시 키운다 */
  font-size: clamp(17px, 5.5vw, 1.5rem);
  line-height: 1;
}
.quick-style-A > ul > li a > strong {
  /* [2026-08-22] 16px 로도 부족하다는 요청으로 한 단계 더 키운다.
     [2026-08-24] 그런데 9글자처럼 긴 라벨은 커진 폰트에서 오히려 "..." 로 잘렸다.
     1) 폰트를 화면 폭에 비례해 줄이되(좁은 폰에서만 체감) 2) 그래도 부족한 극단적인
     경우를 대비해 한 줄 고정을 풀어 2줄까지 줄바꿈을 허용한다(말줄임표 대신 wrap)
     - 어떤 경우에도 글자가 잘리지 않는 게 최종 목표. min-width:0 은 flex 아이템이
     내용 폭 그대로 버티지 않고 실제로 줄어들 수 있게 한다(없으면 wrap 이 안 먹는
     경우가 있음).
     [2026-08-24 추가] 아이콘-글자 간격을 좁혀 확보한 공간만큼, 그리고 2줄 줄바꿈이
     안전망으로 있으니 폰트를 한 단계 더 키운다(최소 13px, 최대 20px). */
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  font-size: clamp(13px, 4vw, 1.25rem);
  font-weight: var(--fw-bold, 700);
  line-height: 1.2;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  text-align: center;
}
.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 {
  /* [2026-08-22] A 와 함께 한 단계 키움 */
  max-width: 100%;
  font-size: 1.05rem;
  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;
    /* [2026-08-22] 1200/1440px 계단(24→30px)을 min(vw,px) 유동값으로 흡수
       (cap 30px 이 1440px 폭에서 자리잡던 값이라 30÷14.4=2.0833vw). */
    right: min(2.0833vw, 30px);
    bottom: auto;
    transform: translateY(-50%);
    border-radius: 0;
    background: none !important;
    box-shadow: none;
    overflow: visible;
  }
  .xet-layout-quickbutton.sub {
    /* cap 46px 이 1440px 폭에서 자리잡던 값 → 46÷14.4=3.1944vw */
    right: min(3.1944vw, 46px);
  }
  .xet-layout-quickbutton.is-scroll {
    right: min(2.0833vw, 30px);
    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);
  }
}
/* [2026-08-22] 참고 템플릿(footer_template.html) 기법 적용: 1200/1440px 계단을
   min(vw,px) 유동값으로 흡수해 위 @media(min-width:1024px) 블록의 right 값에
   직접 합쳤다 (이 파일 202번째 줄 부근). 참고: .xet-layout-quickbutton 은
   "데스크탑에서는 항상 숨김"(위 203~206번째 줄 주석) 이라 이 right 값들은
   현재 데스크탑에서 실제로는 보이지 않는 값이다 - 그래도 나중에 그 숨김 규칙이
   바뀌는 경우를 대비해 다른 데스크탑 컴포넌트와 동일한 유동 규칙으로 맞춰둔다.*/
