/* QUICK_floating/quick_2 - 원형 아이콘 메뉴 (톱니 설정 가능) */

:root {
  --quick2-icon-fs: 2rem;
}

.quick_floating.quick_2 {
  position: fixed;
  right: 4rem;
  bottom: 4rem;
  z-index: 50;

  /* 톱니 설정 기본값 */
  --q2-circle: 5.6rem;
  --q2-icon: 2rem;
  --q2-font-size: 1.4rem;
  --q2-font-color: #ffffff;
  --q2-font-weight: 500;

  --q2-bg-off: #ffffff;
  --q2-icon-off: #222222;
  --q2-bg-hover: var(--primary, #2563eb);
  --q2-icon-hover: #ffffff;
  --q2-border-off: var(--border-color, #ddd);
  --q2-border-hover: var(--primary, #2563eb);

  --q2-top-bg-off: #ffffff;
  --q2-top-icon-off: #222222;
  --q2-top-bg-hover: var(--primary, #2563eb);
  --q2-top-icon-hover: #ffffff;
  --q2-top-border-off: var(--border-color, #ddd);
  --q2-top-border-hover: var(--primary, #2563eb);
}

.quick_floating.quick_2 .contents-container {
  max-width: 100%;
}

.quick_floating.quick_2 .menu-list {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
}

.quick_floating.quick_2 .menu-list li {
  list-style: none;
}

.quick_floating.quick_2 .menu-list li + li {
  margin-top: 0.8rem;
}

.quick_floating.quick_2 .menu-list a,
.quick_floating.quick_2 .menu-list button {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-left: auto;
  width: var(--q2-circle, 5.6rem);
  height: var(--q2-circle, 5.6rem);
  color: var(--q2-icon-off, #222);
  background: var(--q2-bg-off, #fff);
  border: 1px solid var(--q2-border-off, var(--border-color, #ddd));
  border-radius: 10rem;
  box-shadow: 0 0.4rem 2rem 0 rgba(0, 0, 0, 0.1);
  transition: width 0.3s, padding-right 0.3s, background 0.3s, color 0.3s, border-color 0.3s;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
}

/* hover 시 — 원의 우측이 늘어남, 아이콘은 좌측 원 영역 안에서 항상 정중앙 */
.quick_floating.quick_2 .menu-list a:hover {
  width: auto;
  min-width: var(--q2-circle, 5.6rem);
  padding-right: 1.8rem;
}

.quick_floating.quick_2 .menu-list a:hover,
.quick_floating.quick_2 .menu-list button:hover {
  background: var(--q2-bg-hover, var(--primary, #2563eb)) !important;
  background-color: var(--q2-bg-hover, var(--primary, #2563eb)) !important;
  color: var(--q2-icon-hover, #fff) !important;
  border-color: var(--q2-border-hover, var(--q2-bg-hover, var(--primary, #2563eb))) !important;
}

/* 텍스트 span - 기본 숨김 */
.quick_floating.quick_2 .menu-list a > span {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: var(--q2-font-size, 1.4rem);
  font-weight: var(--q2-font-weight, 500);
  color: var(--q2-font-color, #fff);
  transition: max-width 0.3s, opacity 0.3s;
}

/* hover 시 텍스트 표시 */
.quick_floating.quick_2 .menu-list a:hover > span {
  max-width: 200px;
  opacity: 1;
  margin-left: 0.4rem;
}

/* blind 클래스 (상단이동 버튼용) */
.quick_floating.quick_2 .menu-list span.blind {
  position: absolute !important;
  clip: rect(0 0 0 0) !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  max-width: none !important;
  opacity: 1 !important;
}

/* 이미지/아이콘 영역 — 원 직경 너비를 점유해 hover로 늘어나도 항상 좌측 원 안의 정중앙 유지 */
.quick_floating.quick_2 .menu-list .wg_img_box {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--q2-circle, 5.6rem);
  height: var(--q2-circle, 5.6rem);
}

.quick_floating.quick_2 .menu-list .wg_img_box img {
  display: block;
  width: var(--q2-icon, 2rem);
  height: var(--q2-icon, 2rem);
  object-fit: contain;
  transition: filter 0.3s;
}

/* hover 시 이미지 흰색으로 (filter 사용) */
.quick_floating.quick_2 .menu-list a:hover .wg_img_box img {
  filter: brightness(0) invert(1);
}

.quick_floating.quick_2 .menu-list .wg_img_box i,
.quick_floating.quick_2 .menu-list .wg_img_box .ff-ico {
  font-size: var(--q2-icon, 2rem);
  line-height: 1;
  transition: color 0.3s;
}

.quick_floating.quick_2 .menu-list a i,
.quick_floating.quick_2 .menu-list button i {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--q2-circle, 5.6rem);
  height: var(--q2-circle, 5.6rem);
  font-size: var(--q2-icon, 2rem);
  line-height: 1;
  transition: color 0.3s;
}

.quick_floating.quick_2 .menu-list a:hover i,
.quick_floating.quick_2 .menu-list button:hover i,
.quick_floating.quick_2 .menu-list a:hover .wg_img_box i {
  color: var(--q2-icon-hover, #fff);
}

/* TOP 버튼 — 별도 변수 사용, hover 시에도 원 크기 유지 */
.quick_floating.quick_2 .menu-list .btn-top {
  background: var(--q2-top-bg-off, #fff);
  color: var(--q2-top-icon-off, #222);
  border-color: var(--q2-top-border-off, var(--border-color, #ddd)) !important;
}
.quick_floating.quick_2 .menu-list .btn-top:hover {
  width: var(--q2-circle, 5.6rem);
  padding: 0;
  background: var(--q2-top-bg-hover, var(--primary, #2563eb)) !important;
  background-color: var(--q2-top-bg-hover, var(--primary, #2563eb)) !important;
  color: var(--q2-top-icon-hover, #fff) !important;
  border-color: var(--q2-top-border-hover, var(--q2-top-bg-hover, var(--primary, #2563eb))) !important;
}
.quick_floating.quick_2 .menu-list .btn-top i {
  color: inherit;
}
.quick_floating.quick_2 .menu-list .btn-top:hover i {
  color: var(--q2-top-icon-hover, #fff);
}

/* body로 이동된 모달 스타일 */
body > .quick-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.5) !important;
  opacity: 0;
  visibility: hidden;
  z-index: 99999 !important;
  transition: opacity 0.3s, visibility 0.3s;
  pointer-events: none;
}

body > .quick-modal.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

body > .quick-modal .modal-inner {
  width: 90%;
  max-width: 40rem;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.4rem;
  background: var(--white, #fff);
  border-radius: 2.4rem;
  box-shadow: 0 0 2.4rem 0 rgba(161, 161, 161, 0.25);
}

body > .quick-modal .quick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

body > .quick-modal .quick-head h4 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: var(--fw-bold, 700);
}

body > .quick-modal .quick-head .close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  font-size: 2rem;
  color: var(--black, #222);
  background: transparent;
  border: none;
  cursor: pointer;
}

body > .quick-modal .quick-body {
  max-height: 50vh;
  overflow-y: auto;
  font-size: 1.4rem;
  line-height: 1.8;
  color: var(--black, #222);
  word-break: keep-all;
}

body > .quick-modal .quick-foot {
  margin-top: 2.4rem;
  text-align: center;
}

body > .quick-modal .quick-foot .btn-close-link {
  display: block;
  padding: 1.4rem 2rem;
  background: var(--black, #222);
  color: var(--white, #fff);
  border-radius: 0.8rem;
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: var(--fw-medium, 500);
}

/* 반응형 */
@media (max-width: 992px) {
  .quick_floating.quick_2 {
    right: 1.6rem;
    bottom: 1.6rem;
  }

  /* 톱니에서 circle_size를 직접 px로 지정한 경우 그 값을 그대로 따르고,
     변수 미설정(기본) 시에만 모바일 축소 */
  .quick_floating.quick_2 .menu-list li + li {
    margin-top: 0.4rem;
  }

  .quick_floating.quick_2 .menu-list a:hover {
    padding-right: 1.2rem;
  }
}
