/* ============================================================
   플로팅 채팅 위젯 (네온 그라디언트 배너 적용)
   ============================================================ */
/* 1. 래퍼 */
#wprc-float-wrap {
    position: fixed !important;
    bottom: 24px !important;
    left: 24px !important;
    z-index: 999999 !important;
}

/* 2. 메인 버튼 (원형 말풍선 프로필) */
#wprc-float-btn {
    appearance: none !important;
    width: 72px !important;
    height: 72px !important;
    /* 완전한 원형 버튼 */
    border-radius: 50% !important;
    padding: 3px !important;
    border: none !important;
    cursor: pointer !important;
    display: block !important;
    background: transparent !important;
    box-shadow: 0 8px 24px rgba(17, 46, 129, 0.4) !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    outline: none !important;
}

#wprc-float-btn:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 28px rgba(17, 46, 129, 0.6) !important;
}

/* 3. 보라색/핑크 네온 테두리 회전 애니메이션 */
#wprc-float-btn::before {
    content: '' !important;
    position: absolute !important;
    top: -50% !important;
    left: -50% !important;
    width: 200% !important;
    height: 200% !important;
    background: conic-gradient(
        transparent,
        #3b5bdb, /* 밝은 블루 */
        transparent 30%,
        transparent 50%,
        #112E81, /* 메인 네이비 */
        #4dabf7, /* 하늘색 하이라이트 */
        transparent 80%
    ) !important;
    animation: rotateBorder 4s linear infinite !important;
    z-index: 0 !important;
    pointer-events: none !important;
}

@keyframes rotateBorder {
    to { transform: rotate(360deg); }
}

/* 4. 내부 콘텐츠 영역 (보라색 배경, 원형 맞춤) */
#wprc-float-btn .banner-content {
    position: relative !important;
    background-color: #112E81 !important;
    border-radius: 50% !important;
    padding: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1 !important;
    width: 100% !important;
    height: 100% !important;
    box-sizing: border-box !important;
    box-shadow: inset 0 0 15px rgba(77, 171, 247, 0.18) !important;
}

/* 5. 아바타 (원형 안에 꽉 채움) */
#wprc-float-btn .banner-avatar {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    margin: 0 !important;
}

/* 6. 텍스트 영역 (원형에서 숨김) */
#wprc-float-btn .banner-text {
    display: none !important;
}

/* 7. 상태 점 (우측 하단 고정) */
#wprc-float-btn .online-status {
    display: none !important;
}

.mobile-only-status {
    display: block !important;
    position: absolute !important;
    bottom: 2px !important;
    right: 2px !important;
    width: 14px !important;
    height: 14px !important;
    background-color: #555 !important;
    border-radius: 50% !important;
    border: 2px solid #112E81 !important;
    z-index: 2 !important;
}

#wprc-float-btn.wprc-float-online .mobile-only-status {
    background-color: #00E676 !important;
    animation: pulseStatus 2s infinite !important;
}

/* 상태 점 자체의 미세한 박동 */
@keyframes pulseStatus {
    0%   { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.6); }
    70%  { box-shadow: 0 0 0 6px rgba(0, 230, 118, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}

/* 접속 중: 버튼 둘레로 퍼지는 번짐(글로우) 효과 */
#wprc-float-btn.wprc-float-online {
    animation: wprcOnlineGlow 2.2s ease-out infinite !important;
}

@keyframes wprcOnlineGlow {
    0% {
        box-shadow: 0 8px 24px rgba(17, 46, 129, 0.4),
                    0 0 0 0 rgba(17, 46, 129, 0.55);
    }
    70% {
        box-shadow: 0 8px 24px rgba(17, 46, 129, 0.4),
                    0 0 0 20px rgba(17, 46, 129, 0);
    }
    100% {
        box-shadow: 0 8px 24px rgba(17, 46, 129, 0.4),
                    0 0 0 0 rgba(17, 46, 129, 0);
    }
}

/* 접속 중에도 hover 시 살짝 떠오르되 글로우 유지 */
#wprc-float-btn.wprc-float-online:hover {
    transform: translateY(-4px) !important;
}

/* 8. 미읽 뱃지 */
#wprc-float-badge {
    position: absolute !important;
    top: -2px !important;
    right: -2px !important;
    min-width: 20px !important;
    height: 20px !important;
    box-sizing: border-box !important;
    background: #CB2957 !important;
    border-radius: 999px !important;
    color: #f5f5f5 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 16px !important;
    text-align: center !important;
    padding: 0 5px !important;
    border: 2px solid #112E81 !important;
    z-index: 3 !important;
}


/* =========================================================
   9. 모바일 반응형: 버튼 크기만 소폭 축소
   ========================================================= */
@media (max-width: 768px) {
    #wprc-float-btn {
        width: 64px !important;
        height: 64px !important;
    }
}

/* 모달 컨테이너 */
#wprc-float-modal {
    width: 380px;
    height: 620px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0,0,0,0.22);
    background: #fff;
    animation: wprc-float-in 0.22s ease;
    /* 모달 내부가 모바일 UI를 쓰므로 flex 레이아웃 */
    display: flex;
    flex-direction: column;
}
#wprc-float-modal .wprc-is-mobile {
    width: 100% !important;
    height: 100% !important;
    min-height: 0;
}
#wprc-float-modal .wprc-mobile-wrapper {
    height: 100% !important;
    min-height: 0;
}
/* 모달 내부 채팅 메시지 영역 스크롤 보장 */
#wprc-float-modal .wprc-mob-messages-wrap {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

@keyframes wprc-float-in {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* 모바일: 모달이 전체화면 */
@media (max-width: 480px) {
    #wprc-float-wrap {
        bottom: 16px;
        left: 16px;
    }
    #wprc-float-modal {
        position: fixed;
        top: var(--top-banner-height, 0px);
        bottom: 0; right: 0; left: 0;
        width: 100%;
        height: calc(100dvh - var(--top-banner-height, 0px));
        height: calc(var(--wprc-vh, 100vh) - var(--top-banner-height, 0px));
        border-radius: 0;
    }
}
