@charset "utf-8";

/* ============================================
   텔레그램 우측 퀵메뉴 컴포넌트
   접두사: tg-qmenu (기존 사이트 오염 방지)
   디자인: 글래스모피즘 + 그라디언트 악센트
============================================ */

/* ─── 컴포넌트 리셋 ─── */
.tg-qmenu,
.tg-qmenu * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ─── 래퍼 (고정 위치) ─── */
/* 태블릿 이하(768px 미만)에서는 숨김 처리 */
.tg-qmenu {
    display: none;
    position: fixed;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    z-index: 2147483647;
    /*opacity: 0;*/
    /*pointer-events: none;*/
    transition: opacity 0.6s ease,
        transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tg-qmenu.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* ─── 내부 nav: 수직 flex ─── */
.tg-qmenu nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* ─── 스크롤 버튼 (최상단/최하단) ─── */
/* 기본: 숨김 상태 → JS에서 스크롤 위치에 따라 is-active 클래스 추가 */
.tg-qmenu__scroll-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
    color: #ffffff;
    box-shadow: 0 3px 12px rgba(42, 171, 238, 0.35);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    outline: none;
    -webkit-tap-highlight-color: transparent;
    /* 기본 숨김 */
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

/* 스크롤 위치에 따라 표시 */
.tg-qmenu__scroll-btn.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.tg-qmenu__scroll-btn:active {
    transform: scale(0.9);
}

.tg-qmenu__scroll-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    transition: transform 0.25s ease;
}

/* 위 화살표 바운스 */
.tg-qmenu__scroll-btn--top .tg-qmenu__scroll-icon {
    animation: tg-qmenu-bounce-up 2s ease-in-out infinite;
}

/* 아래 화살표 바운스 */
.tg-qmenu__scroll-btn--bottom .tg-qmenu__scroll-icon {
    animation: tg-qmenu-bounce-down 2s ease-in-out infinite;
}

@keyframes tg-qmenu-bounce-up {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}

@keyframes tg-qmenu-bounce-down {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(2px);
    }
}

/* ─── 메뉴 리스트 ─── */
.tg-qmenu__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    list-style: none;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    padding: 6px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ─── 메뉴 링크 ─── */
.tg-qmenu__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    text-decoration: none;
    color: #475569;
    border-radius: 12px;
    background-color: transparent;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* 리플 이펙트 배경 */
.tg-qmenu__link::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(42, 171, 238, 0.12);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

/* ─── SVG 아이콘 ─── */
.tg-qmenu__icon {
    width: 20px;
    height: 20px;
    margin-bottom: 3px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── 아이콘 개별 애니메이션 ─── */

/* 웹접속K: 종이비행기 날아가는 느낌 (대각선 이동 + 기울기) */
.tg-qmenu__icon--fly {
    animation: tg-qmenu-fly 3s ease-in-out infinite;
}

@keyframes tg-qmenu-fly {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(2px, -2px) rotate(-5deg);
    }

    50% {
        transform: translate(0, -3px) rotate(0deg);
    }

    75% {
        transform: translate(-1px, -1px) rotate(3deg);
    }
}

/* 웹접속Z: 종이비행기 보내기 펄스 (살짝 커졌다 작아짐) */
.tg-qmenu__icon--send {
    animation: tg-qmenu-send 2.5s ease-in-out infinite;
}

@keyframes tg-qmenu-send {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    30% {
        transform: scale(1.1) rotate(-3deg);
    }

    60% {
        transform: scale(0.95) rotate(2deg);
    }
}

/* 다운로드: 화살표 아래로 바운스 */
.tg-qmenu__icon--download {
    animation: tg-qmenu-download 2s ease-in-out infinite;
}

@keyframes tg-qmenu-download {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(3px);
    }
}

/* 꿀팁: 전구 반짝임 (밝기 변화 + 미세 회전) */
.tg-qmenu__icon--bulb {
    animation: tg-qmenu-bulb 3s ease-in-out infinite;
}

@keyframes tg-qmenu-bulb {

    0%,
    100% {
        transform: rotate(0deg);
        opacity: 1;
    }

    25% {
        transform: rotate(-8deg);
        opacity: 0.7;
    }

    50% {
        transform: rotate(0deg);
        opacity: 1;
    }

    75% {
        transform: rotate(8deg);
        opacity: 0.7;
    }
}

/* ─── 텍스트 ─── */
.tg-qmenu__text {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1;
    white-space: nowrap;
}

/* 텍스트 내부 링크 상속 */
.tg-qmenu__text a {
    color: inherit;
    text-decoration: none;
}

/* ─── Hover (데스크탑) ─── */
@media (hover: hover) and (pointer: fine) {
    .tg-qmenu__scroll-btn:hover {
        background: linear-gradient(135deg, #1a9fdf 0%, #0088cc 100%);
        box-shadow: 0 6px 20px rgba(42, 171, 238, 0.5);
        transform: translateY(-2px);
    }

    .tg-qmenu__link:hover {
        background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
        color: #ffffff;
        box-shadow: 0 4px 14px rgba(42, 171, 238, 0.35);
        transform: scale(1.08);
    }

    .tg-qmenu__link:hover::before {
        width: 120%;
        height: 120%;
    }

    .tg-qmenu__link:hover .tg-qmenu__icon {
        transform: scale(1.12) translateY(-1px);
    }
}

/* ─── Active (모바일 터치) ─── */
.tg-qmenu__link:active {
    transform: scale(0.92);
    transition-duration: 0.1s;
}

/* ─── 구분선 (메뉴 아이템 사이) ─── */
.tg-qmenu__item:not(:last-child)::after {
    content: "";
    display: block;
    width: 24px;
    height: 1px;
    margin: 0 auto;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.06), transparent);
}

/* ============================================
   반응형: 768px 이상 (데스크탑)
============================================ */
@media (min-width: 768px) {
    .tg-qmenu {
        display: block;
        right: 20px;
    }

    .tg-qmenu nav {
        gap: 8px;
    }

    .tg-qmenu__scroll-btn {
        width: 40px;
        height: 40px;
    }

    .tg-qmenu__scroll-icon {
        width: 20px;
        height: 20px;
    }

    .tg-qmenu__list {
        gap: 6px;
        padding: 8px;
        border-radius: 22px;
    }

    .tg-qmenu__link {
        width: 56px;
        height: 56px;
        border-radius: 14px;
    }

    .tg-qmenu__icon {
        width: 22px;
        height: 22px;
        margin-bottom: 4px;
    }

    .tg-qmenu__text {
        font-size: 10px;
    }

    .tg-qmenu__item:not(:last-child)::after {
        width: 28px;
    }
}

/* ============================================
   반응형: 1024px 이상 (와이드 데스크탑)
============================================ */
@media (min-width: 1024px) {
    .tg-qmenu {
        right: 24px;
    }

    .tg-qmenu__scroll-btn {
        width: 44px;
        height: 44px;
    }

    .tg-qmenu__scroll-icon {
        width: 22px;
        height: 22px;
    }

    .tg-qmenu__list {
        gap: 8px;
        padding: 10px;
        border-radius: 24px;
    }

    .tg-qmenu__link {
        width: 60px;
        height: 60px;
        border-radius: 16px;
    }

    .tg-qmenu__icon {
        width: 24px;
        height: 24px;
        margin-bottom: 5px;
    }

    .tg-qmenu__text {
        font-size: 11px;
    }
}