/* ===== 웨이팅 페이지 스타일 ===== */
body.waiting {
    margin: 0;
    padding: 0;
    background: #1a1a2e;
    min-height: 100vh;
    font-family: 'Noto Sans KR', sans-serif;
}
body.waiting::before {
    content: '';
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.35);
    z-index: 0;
}
#full_bg {
    position: fixed;
    inset: 0;
    z-index: 0;
}

/* ===== 웨이팅 레이아웃 ===== */
#waiting {
    position: relative;
    z-index: 10;
    display: flex;
    min-height: 100vh;
    max-width: 900px;
    margin: 0 auto;
    align-items: stretch;
}

/* ===== 왼쪽: 도움말 영역 ===== */
#waiting .help {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    gap: 16px;
    cursor: pointer;
}
#help_msg {
    color: rgba(255,255,255,0.75);
    font-size: 14px;
    line-height: 1.8;
    text-align: center;
}
#company {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.5px;
}
#qrcode {
    background: #fff;
    border-radius: 12px;
    padding: 10px;
    display: inline-flex;
}
#qrcode img {
    width: 120px;
    height: 120px;
    display: block;
}
#cnt_wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 320px;
}
#cnt_wrap > div {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 10px 16px;
    color: #fff;
    font-size: 13px;
    text-align: center;
    line-height: 1.6;
}
#cnt_wrap r {
    font-weight: 700;
    font-size: 18px;
    color: #ffd166;
    margin: 0 2px;
}
#cnt0 r span {
    display: inline-block;
    background: #ffd166;
    color: #333;
    border-radius: 6px;
    padding: 2px 8px;
    margin: 2px;
    font-size: 14px;
}

/* ===== 오른쪽: 전화번호 입력 ===== */
#waiting .phone {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
}
#wait-form {
    width: 100%;
    max-width: 300px;
}

/* 메시지 영역 */
#phone_msg {
    text-align: center;
    padding: 20px 10px;
}
#phone_msg .msg {
    color: #fff;
    font-size: 15px;
    line-height: 1.8;
}
#phone_msg .msg .word {
    margin-bottom: 16px;
}
#phone_msg .대기번호 {
    background: rgba(255,209,102,0.15);
    border: 1px solid rgba(255,209,102,0.4);
    border-radius: 10px;
    padding: 12px 20px;
    margin-top: 14px;
    font-size: 16px;
    font-weight: 700;
    color: #ffd166;
}
#phone_msg .대기번호 r {
    font-size: 28px;
    margin-left: 6px;
}

/* 삭제/유지 버튼 */
#phone_msg button {
    display: inline-block;
    margin: 6px 4px 0;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.4;
    min-width: 80px;
}
#phone_msg .기존대기삭제 {
    background: #ef4444;
    color: #fff;
}
#phone_msg .기존대기삭제:hover { background: #dc2626; }
#phone_msg .기존대기유지 {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}
#phone_msg .기존대기유지:hover { background: rgba(255,255,255,0.25); }

/* 전화번호 디스플레이 */
#phone-display {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 10px;
    padding: 14px 18px;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 2px;
    margin-bottom: 14px;
}

/* 키패드 */
#keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.number-btn {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    padding: 16px 8px;
    cursor: pointer;
    transition: background 0.15s;
    text-align: center;
    font-family: inherit;
}
.number-btn:hover {
    background: rgba(255,255,255,0.22);
}
.number-btn:active {
    background: rgba(255,255,255,0.35);
    transform: scale(0.96);
}
.number-btn.blank {
    background: transparent;
    border: none;
    cursor: default;
    pointer-events: none;
}
.number-btn.confirm {
    grid-column: 1 / -1;
    font-size: 15px;
    font-weight: 700;
    background: #2563eb;
    border-color: #1d4ed8;
    padding: 16px;
    letter-spacing: 0.5px;
    border-radius: 10px;
}
.number-btn.confirm:hover { background: #1d4ed8; }
.number-btn.confirm[disabled],
.number-btn.confirm[style*="opacity: 0.5"] {
    opacity: 0.45 !important;
    cursor: not-allowed;
}
#backspace {
    font-size: 18px;
}

/* 푸터 */
#copy {
    position: fixed;
    bottom: 10px;
    right: 14px;
    color: rgba(255,255,255,0.3);
    font-size: 11px;
    z-index: 20;
}
#disp_error_msg {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(220,38,38,0.9);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    z-index: 100;
}

/* ===== 라이트 모드 ===== */
html[data-theme="light"] body.waiting {
    background: #ffffff;
}
html[data-theme="light"] body.waiting::before {
    filter: brightness(1) saturate(.7);
    opacity: .06;
}
html[data-theme="light"] #help_msg {
    color: rgba(0,0,0,.65);
}
html[data-theme="light"] #company {
    color: #111;
}
html[data-theme="light"] #cnt_wrap > div {
    background: rgba(0,0,0,.05);
    border-color: rgba(0,0,0,.1);
    color: #111;
}
html[data-theme="light"] #cnt_wrap r {
    color: #d97706;
}
html[data-theme="light"] #phone-display {
    background: #f5f5f7;
    border-color: rgba(0,0,0,.18);
    color: #111;
}
html[data-theme="light"] .number-btn {
    background: rgba(0,0,0,.05);
    border-color: rgba(0,0,0,.12);
    color: #111;
}
html[data-theme="light"] .number-btn:hover {
    background: rgba(0,0,0,.1);
}
html[data-theme="light"] .number-btn:active {
    background: rgba(0,0,0,.18);
}
html[data-theme="light"] #phone_msg .msg {
    color: #111;
}
html[data-theme="light"] #phone_msg .대기번호 {
    background: rgba(217,119,6,.1);
    border-color: rgba(217,119,6,.35);
    color: #b45309;
}
html[data-theme="light"] #phone_msg .기존대기유지 {
    background: rgba(0,0,0,.07);
    color: #333;
    border-color: rgba(0,0,0,.2);
}
html[data-theme="light"] #phone_msg .기존대기유지:hover {
    background: rgba(0,0,0,.13);
}
html[data-theme="light"] #copy {
    color: rgba(0,0,0,.3);
}

/* ===== 모바일 ===== */
@media (max-width: 600px) {
    #waiting {
        flex-direction: column;
    }
    #waiting .help {
        padding: 24px 20px 16px;
        gap: 10px;
    }
    #qrcode img { width: 90px; height: 90px; }
    #cnt_wrap { flex-direction: column; max-width: 100%; }
    #cnt0 { flex: 0 0 100%; width: 100%; }
    #cnt_wrap > div { flex: 1; font-size: 12px; padding: 8px 10px; }
    #cnt_wrap r { font-size: 16px; }
    #waiting .phone { padding: 16px 20px 32px; }
    .number-btn { font-size: 18px; padding: 14px 6px; }
    #phone-display { font-size: 18px; }
}
