/*
* for supported in all modern browsers
* Copyright inpleworks, Co.
* https://xetemplate.com
* 💡 코딩 파트너: 모바일 고정/슬림화 & 터치 시 색상 유지 완벽 패치
*/
.xet-layout-quickbutton {
  z-index: 88;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px;
  transform: translateY(0) !important; /* 스크롤 시 사라짐 방지 (항상 고정) */
  transition: var(--transition-all);
  background-color: var(--bg-color);
}
.xet-layout-quickbutton > ul {
  display: flex;
  gap: 6px;
}
.xet-layout-quickbutton > ul > li {
  flex: 1;
}
.xet-layout-quickbutton > ul > li a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100%;
  min-height: var(--button-height);
  padding: 10px 0 !important; /* 모바일 위아래 여백 슬림화 */
  overflow: hidden;
  border-radius: 0.5rem;
  background-color: var(--theme-color) !important;
  color: #ffffff !important;
  border: none !important; /* 테두리 제거 */
  box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.3) !important;
}
.xet-layout-quickbutton > ul > li a > span {
  display: flex;
  align-items: center;
  justify-content: center;
}
.xet-layout-quickbutton > ul > li a > span > i {
  font-size: 20px !important;
}
.xet-layout-quickbutton > ul > li a > strong {
  margin-top: 4px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: -0.5px !important;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 💡 해결 포인트: 모바일에서 터치해도 무조건 원래 테마 색상 유지! */
.xet-layout-quickbutton > ul > li:hover > a,
.xet-layout-quickbutton > ul > li:active > a,
.xet-layout-quickbutton > ul > li:focus > a {
  background-color: var(--theme-color) !important;
  color: #ffffff !important;
}

/* ==========================================================
   💡 PC / 모바일 텍스트 자동 전환 스위치 클래스
========================================================== */
.qb-pc { display: none !important; }
.qb-m { display: inline-block !important; }

body.color_scheme_dark .xet-layout-quickbutton {
  background-color: var(--dark-bg-color);
}
body.color_scheme_dark .xet-layout-quickbutton > ul > li a {
  background-color: var(--theme-color) !important;
  color: #fff !important;
}

@media (min-width: 1024px) {
  /* PC 모드에서는 번호 노출, 모바일 텍스트 숨김 */
  .qb-pc { display: inline-block !important; font-family: 'Tahoma', sans-serif; letter-spacing: 0.5px; }
  .qb-m { display: none !important; }

  .xet-layout-quickbutton {
    top: 50%;
    left: auto;
    bottom: auto;
    right: 20px;
    padding: 0;
    transform: translateY(-50%) !important; /* PC에서도 항상 고정 */
    background: none !important;
  }
  .xet-layout-quickbutton.sub {
    right: 36px;
  }
  .xet-layout-quickbutton > ul {
    display: block;
  }
  .xet-layout-quickbutton > ul > li {
    display: block;
  }
  .xet-layout-quickbutton > ul > li + li {
    margin-top: var(--gap2x);
    border-left: 0;
  }

  /* PC 원본 애니메이션 (둥근 아이콘 -> 마우스 오버 시 확장) */
  .xet-layout-quickbutton > ul > li a {
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    overflow: visible !important;
    padding: 0 !important;
    border-radius: 3.75rem !important;
    background: none !important;
    box-shadow: none !important;
    min-height: auto !important;
  }
  .xet-layout-quickbutton > ul > li a > span {
    flex-shrink: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.625rem;
    height: 3.625rem;
    border-radius: 50%;
    background-color: var(--theme-color) !important;
    border: none !important;
    color: #ffffff !important;
    transition: all 0.25s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.22);
  }
  .xet-layout-quickbutton > ul > li a > span > i {
    font-size: 1.6rem !important;
    transition: all 0.25s ease;
    color: #ffffff !important;
  }
  .xet-layout-quickbutton > ul > li a > strong {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    width: 3.625rem !important;
    height: 3.625rem !important;
    border-radius: 3.625rem !important;
    background-color: #222222 !important;
    color: #ffffff !important;
    transition: all 0.3s ease !important;
  }

  /* PC: 마우스 오버 시 늘어나는 효과 */
  .xet-layout-quickbutton > ul > li:hover > a {
    width: auto !important;
    background: none !important;
  }
  .xet-layout-quickbutton > ul > li:hover > a > span {
    background-color: #222222 !important; /* 마우스 오버 시 아이콘 배경 어둡게 */
  }
  .xet-layout-quickbutton > ul > li:hover > a > span > i {
    font-size: 2rem !important;
    color: #ffffff !important;
  }
  .xet-layout-quickbutton > ul > li:hover > a > strong {
    right: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: auto !important;
    padding-right: 4.625rem !important;
    padding-left: 2rem !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.22) !important;
  }
}
@media (min-width: 1200px) {
  .xet-layout-quickbutton { right: 24px; }
  .xet-layout-quickbutton.sub { right: 40px; }
}
@media (min-width: 1440px) {
  .xet-layout-quickbutton { right: 30px; }
  .xet-layout-quickbutton.sub { right: 46px; }
}
