/* 배너 3종 (C-13) — 네이티브 alert()/confirm() 대체 (GEMINI.md §3.2)
   4개 앱이 공유하는 api.js/main.js/ui-render.js가 window.Banner를 호출하므로
   live.css(라이브 앱 전용)가 아닌 별도 파일로 분리하여 전 앱에 링크한다.

   대비(WCAG 2.x, 텍스트 4.5:1 / 비텍스트 3:1) 계산 근거:
     #047857 on #ecfdf5 = 5.21:1  (NOTICE 라벨)
     #b3261e on #fef2f2 = 5.97:1  (ERROR 라벨)
     #1e40af on #eff6ff = 8.01:1  (CONFIRM 라벨)
     #333333 on 위 3색 배경 = 11.5~12.0:1 (본문)
     흰색 on #b3261e = 6.54:1     (확인 버튼)
     흰색 SVG on #059669/#2196f3 = 3.77:1 / 3.12:1 (비텍스트 아이콘 → 3:1 충족)
   흰 텍스트를 --success/--warning/--accent-live 위에 얹지 않는다(전부 4.5:1 미달). */

.banner-container {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000; /* components.css 모달과 동일 계층 */
    width: min(560px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.banner {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.banner__icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner__icon svg {
    width: 22px;
    height: 22px;
    stroke: #ffffff;
    stroke-width: 2.5;
    fill: none;
}

.banner__body {
    flex: 1 1 auto;
    min-width: 0;
}

.banner__label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.banner__msg {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-strong);
    white-space: pre-line;
    word-break: break-word;
}

.banner__close {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 20px;
    line-height: 1;
    border-radius: 8px;
    cursor: pointer;
}

.banner__close:hover {
    background: rgba(0, 0, 0, 0.06);
}

.banner__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

.banner__btn {
    min-height: 40px;
    padding: 0 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.banner__btn:active {
    transform: scale(0.95);
}

.banner__btn--cancel {
    background: var(--surface);
    color: var(--text-strong);
    border: 1.5px solid var(--border);
}

.banner__btn--confirm {
    background: var(--error);
    color: #ffffff;
    border: 1.5px solid var(--error);
}

/* --- 변형 3종 --- */
.banner--notice {
    background: #ecfdf5;
    border-color: var(--success);
}

.banner--notice .banner__icon {
    background: var(--success);
}

.banner--notice .banner__label {
    color: #047857;
}

.banner--error {
    background: #fef2f2;
    border-color: var(--error);
}

.banner--error .banner__icon {
    background: var(--error);
}

.banner--error .banner__label {
    color: var(--error);
}

.banner--confirm {
    background: #eff6ff;
    border-color: var(--accent-live);
}

.banner--confirm .banner__icon {
    background: var(--accent-live);
}

.banner--confirm .banner__label {
    color: #1e40af;
}

/* 포커스 링 (디자인시스템 §8) */
.banner__close:focus-visible,
.banner__btn:focus-visible {
    outline: 2px solid var(--accent-live);
    outline-offset: 2px;
}
