/* ============================================================
 * 공통 말풍선 팝오버 (LayerBubble)
 *   어떤 요소(앵커) 바로 아래에 붙어서 뜨는 안내/상세 팝오버.
 *   모달처럼 화면을 덮지 않고, 앵커 옆/아래에 딱 붙어 뜬다.
 *   사용법(JS): LayerBubble.toggle(anchorEl, '내용텍스트');
 *   상세:       LayerBubble.show(anchorEl, content, { html:true, width:560, className:'' })
 * ============================================================ */
.layer-bubble{
    position: fixed; z-index: 1200;
    width: 520px; max-width: calc(100vw - 24px);
    background: #fff;
    border: 1px solid #94a3b8;
    border-radius: 10px;
    box-shadow: 0 7px 18px rgba(15,23,42,.28), 0 2px 6px rgba(15,23,42,.16);
    padding: 13px 30px 13px 15px;
    animation: layerBubblePop .12s ease-out;
}
/* 위쪽 꼬리(▲) — 앵커를 가리킴. 위치는 JS 가 --tail 로 맞춘다 */
.layer-bubble::before{
    content: ''; position: absolute; top: -7px; left: var(--tail, 16px);
    width: 13px; height: 13px; background: #fff;
    border-left: 1px solid #94a3b8; border-top: 1px solid #94a3b8;
    transform: rotate(45deg);
}
.layer-bubble-body{
    white-space: pre-wrap; word-break: break-word;
    font-size: 12px; line-height: 1.75; color: #334155;
}
.layer-bubble-close{
    position: absolute; top: 7px; right: 9px; cursor: pointer;
    color: #94a3b8; font-weight: 800; font-size: 13px; line-height: 1;
}
.layer-bubble-close:hover{ color: #475569; }
/* 서명 이미지 전용 변형 — 이미지 크기에 딱 맞게 여백 최소화(× 자리만 우측 확보) */
.layer-bubble.sig-bubble{ padding: 9px 26px 9px 9px; }
@keyframes layerBubblePop{ from{ opacity:0; transform:translateY(-4px);} to{ opacity:1; transform:none;} }

/* 아래 공간이 모자라 위로 뒤집힌 경우 — 꼬리(▼)도 아래로 내린다 (2026-09-17) */
.layer-bubble.is-above::before{
    top: auto; bottom: -7px;
    border-left: none; border-top: none;
    border-right: 1px solid #94a3b8; border-bottom: 1px solid #94a3b8;
}
/* 위아래 모두 빠듯할 때는 **본문만** 스크롤한다(높이는 JS 가 잡아 준다).
   ⚠ .layer-bubble 에 overflow 를 걸면 박스 밖에 그리는 꼬리(::before)가 잘린다. */
.layer-bubble-body{ overflow-y: auto; }
/* 확인 말풍선 — 처음부터 포커스된 버튼이 보이게. 마우스로 연 직후엔 브라우저가 테두리를 안 그린다. (2026-11-05)
   본문이 overflow 라 바깥 테두리는 잘려서 안쪽으로 그린다. */
.lb-confirm [data-lb-answer]:focus{
    outline: none !important;
    background: #e2e8f0 !important;
    color: #334155 !important;
    border-color: #64748b !important;
    box-shadow: inset 0 0 0 1px #64748b !important;
}
/* 확인 말풍선은 공통 모달(9999) 안에서도 쓴다 — 뒤로 숨으면 눌러야 할 버튼이 가려진다 (2026-11-05) */
.layer-bubble.lb-confirm { z-index: 10000; }

/* 로그인 — 아이디·비밀번호 틀림 말풍선(비밀번호 칸 아래). 글자만큼만 좁게, 빨간 글씨 한 줄 (2026-11-20)
   pages.css 는 @import 라 버전이 안 붙어 캐시에 묶인다 → 직접 링크되는 이 파일에 둔다 */
.layer-bubble.login-err-bubble { width: max-content !important; max-width: calc(100vw - 24px) !important; padding: 7px 26px 7px 11px !important; border-color: #fca5a5 !important; }
.layer-bubble.login-err-bubble::before { border-color: #fca5a5 !important; }
.layer-bubble.login-err-bubble .layer-bubble-body { white-space: nowrap !important; font-size: 12px !important; font-weight: 600 !important; color: #b91c1c !important; line-height: 1.5 !important; }
.layer-bubble.login-err-bubble .layer-bubble-close { top: 8px !important; right: 8px !important; }
