/* ==========================================
   FLOATING BANNER - floating-banner.css
   prefix: fbanner-
   ========================================== */

/* ---- 전체 wrapper ---- */
.fbanner-wrap {
  position: fixed;
  bottom: 130px;
  right: 47px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none; /* 자식만 클릭 가능 */
}

/* ---- 메뉴 패널 ---- */
.fbanner-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;

  /* 초기 숨김 */
  opacity: 0;
  transform: translateY(16px) scale(0.95);
  transform-origin: bottom right;
  transition:
    opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  visibility: hidden;
}
.fbanner-menu.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
}

/* ---- 각 메뉴 버튼 ---- */
.fbanner-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px 13px 16px;
  background: #fff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.10),
    0 1px 4px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s ease,
    background 0.2s ease;
  text-decoration: none;
  color: inherit;

  /* stagger 진입 */
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s ease,
    background 0.2s ease;
}
.fbanner-menu.is-open .fbanner-item:nth-child(1) {
  opacity: 1; transform: translateY(0); transition-delay: 0.06s;
}
.fbanner-menu.is-open .fbanner-item:nth-child(2) {
  opacity: 1; transform: translateY(0); transition-delay: 0.12s;
}
.fbanner-item:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.13),
    0 2px 6px rgba(0, 0, 0, 0.07);
  background: #f7f9ff;
}
.fbanner-item:active {
  transform: translateY(0);
}

/* ---- 아이콘 영역 ---- */
.fbanner-item__icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #444;
  font-size: 18px;
}

/* ---- 텍스트 ---- */
.fbanner-item__text {
  font-size: 18px;
  font-weight: 600;
  color: #222;
  letter-spacing: -0.01em;
}

/* ---- 토글 버튼 (+ / ×) ---- */
.fbanner-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: #08369d;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  box-shadow:
    0 6px 20px rgba(8, 54, 157, 0.40),
    0 2px 6px rgba(8, 54, 157, 0.20);
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.fbanner-toggle:hover {
  transform: scale(1.08);
  background: #062762;
  box-shadow:
    0 10px 28px rgba(8, 54, 157, 0.45),
    0 3px 8px rgba(8, 54, 157, 0.25);
}
.fbanner-toggle:active {
  transform: scale(0.96);
}

/* 아이콘 회전 */
.fbanner-toggle__icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.25s ease,
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.fbanner-toggle__plus {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
.fbanner-toggle__close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.7);
}

/* 열린 상태 */
.fbanner-toggle.is-open .fbanner-toggle__plus {
  opacity: 0;
  transform: rotate(90deg) scale(0.7);
}
.fbanner-toggle.is-open .fbanner-toggle__close {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* SVG 아이콘 */
.fbanner-toggle svg {
  width: 24px;
  height: 24px;
}
.fbanner-item__icon svg {
  width: 20px;
  height: 20px;
}

/* ==========================================
   반응형 — 모바일
   ========================================== */
@media (max-width: 768px) {
  .fbanner-wrap {
    bottom: calc(100px + env(safe-area-inset-bottom));
    right: 20px;
  }
  .fbanner-toggle {
    width: 52px;
    height: 52px;
  }
  .fbanner-toggle svg {
    width: 22px;
    height: 22px;
  }
  .fbanner-item {
    padding: 12px 18px 12px 14px;
  }
  .fbanner-item__text {
    font-size: 14px;
  }
}