/* =========================================================
 * 공통 확인 레이어 팝업 스타일 (bjn-confirm- 접두사)
 * Bootstrap 변수에 의존하지 않는 독립 정의.
 * z-index: 오버레이 1080 / 카드 1081 — Bootstrap 모달(1055)·사이드바(1050)보다 위.
 * ========================================================= */

/* 오버레이(배경) */
.bjn-confirm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.45);
    z-index: 1080;
    /* 카드 수직 중앙 정렬 */
    align-items: center;
    justify-content: center;
}

.bjn-confirm-overlay.bjn-confirm-open {
    display: flex;
}

/* 카드 */
.bjn-confirm-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    width: fit-content;
    max-width: min(30rem, calc(100vw - 2rem));
    margin: 1rem;
    z-index: 1081;
    overflow: hidden;
}

/* 헤더 영역 */
.bjn-confirm-header {
    display: none;
    padding: 1.5rem 1.5rem 0.5rem;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.75rem;
}

/* 헤더 아이콘 */
.bjn-confirm-icon {
    display: none;
    font-size: 1.6rem;
    color: #2563eb;
    flex-shrink: 0;
}

/* 헤더 제목 */
.bjn-confirm-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #000000;
    margin: 0;
    line-height: 1.3;
    text-align: center;
    width: 100%;
}

/* 본문 안내 문구 */
.bjn-confirm-body {
    padding: 1.5rem 1.5rem 1rem;
    text-align: left;
}

.bjn-confirm-message {
    font-size: 0.9rem;
    color: #4b5563;
    margin: 0;
    line-height: 1.6;
    /* \n을 시각적 줄바꿈으로 처리 */
    white-space: pre-line;
}

/* 강조 헬퍼 클래스 — 마크업 기반(위치 독립) */
.bjn-confirm-em       { color: #2563eb; font-weight: 700; } /* [[[ ]]] 파랑+굵게 */
.bjn-confirm-strong   { font-weight: 700; }                 /* [[ ]]  굵게만 */
.bjn-confirm-em-input { color: #c2410c; font-weight: 700; } /* << >>  주황+굵게 */
.bjn-confirm-message strong,
.bjn-confirm-message b { font-weight: 700; }

/* 버튼 영역 */
.bjn-confirm-footer {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid #f1f3f5;
}

/* 공통 버튼 기본 */
.bjn-confirm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1.4;
    transition: background-color 0.15s, box-shadow 0.15s;
}

.bjn-confirm-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* 취소 버튼 — 회색(secondary) */
.bjn-confirm-btn-cancel {
    background-color: #e5e7eb;
    color: #374151;
}

.bjn-confirm-btn-cancel:hover {
    background-color: #d1d5db;
}

/* 확인 버튼 — 파란색(primary) */
.bjn-confirm-btn-ok {
    background-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.30);
}

.bjn-confirm-btn-ok:hover {
    background-color: #1d4ed8;
}

/* 보조 버튼(사용법 등) — 파랑 아웃라인 */
.bjn-confirm-btn-extra {
    background-color: #ffffff;
    color: #2563eb;
    box-shadow: inset 0 0 0 1px #2563eb;
}

.bjn-confirm-btn-extra:hover {
    background-color: #eff6ff;
}

/* 입력 게이트 영역 */
.bjn-confirm-input-wrap {
    margin-top: 0.75rem;
    text-align: left;
}

/* 입력 안내 문구 */
.bjn-confirm-input-guide {
    font-size: 0.8rem;
    color: #c2410c;
    margin: 0 0 0.4rem;
    line-height: 1.5;
    white-space: pre-line;
}

/* 텍스트 입력란 */
.bjn-confirm-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.4rem 0.6rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.bjn-confirm-input:focus {
    border-color: #fdba74;
    box-shadow: 0 0 0 2px rgba(194, 65, 12, 0.15);
}

/* 확인 버튼 비활성 상태 */
.bjn-confirm-btn-ok:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

/* 반응형: 작은 화면에서 카드가 화면 안에 들어오도록 */
@media (max-width: 480px) {
    .bjn-confirm-card {
        max-width: calc(100vw - 2rem);
    }

    .bjn-confirm-footer {
        flex-direction: column-reverse;
    }

    .bjn-confirm-btn {
        width: 100%;
    }
}
