.qr-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: auto; /* UI 클릭 가능하게 */
}

.qr-box {
  width: 250px;
  height: 250px;
  border: 3px solid #00ff00;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#closeScanBtn {
  position: absolute;
  bottom: 5%;
  right: 5%;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 10px 15px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  z-index: 10000;
}

/* ============================================================
   결제 방법 바텀시트
   ============================================================ */
.qr-pay-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 0;
    z-index: 1100;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.qr-pay-sheet.open {
    transform: translateY(0);
}
.qr-pay-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1099;
}
.qr-pay-handle {
    width: 36px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin: 12px auto 4px;
}
.qr-pay-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    padding: 12px 20px 16px;
    border-bottom: 1px solid #f0f0f0;
}
.qr-pay-opt-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border: none;
    background: #fff;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    text-align: left;
}
.qr-pay-opt-btn:active { background: #f9fafb; }
.qr-pay-opt-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f0fafa;
    color: #2ac1bc;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.qr-pay-opt-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.qr-pay-opt-name {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}
.qr-pay-opt-desc {
    font-size: 12px;
    color: #9ca3af;
}
.qr-pay-opt-arrow {
    color: #d1d5db;
    font-size: 13px;
}
.qr-pay-cancel-btn {
    display: block;
    width: calc(100% - 40px);
    margin: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
    padding: 13px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}
.qr-pay-cancel-btn:active { background: #f9fafb; }

/* ============================================================
   주문 옵션 바텀시트
   ============================================================ */
.qr-opt-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 0 0 env(safe-area-inset-bottom);
    z-index: 1100;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}
.qr-opt-sheet.open {
    transform: translateY(0);
}

.qr-opt-section {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.qr-opt-label {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}
.qr-opt-label-sub {
    font-size: 11px;
    font-weight: 400;
    color: #999;
}
.qr-opt-memo {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: #333;
    resize: none;
    box-sizing: border-box;
    line-height: 1.5;
}
.qr-opt-memo:focus { outline: none; border-color: #2ac1bc; }

.qr-opt-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}
.qr-opt-toggle-row + .qr-opt-toggle-row {
    border-top: 1px solid #f5f5f5;
}
.qr-opt-toggle-label {
    font-size: 14px;
    color: #333;
}

/* iOS 스타일 토글 */
.qr-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 26px;
    flex-shrink: 0;
}
.qr-toggle-switch input { opacity: 0; width: 0; height: 0; }
.qr-toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 26px;
    transition: background 0.2s;
    cursor: pointer;
}
.qr-toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.qr-toggle-switch input:checked + .qr-toggle-slider { background: #2ac1bc; }
.qr-toggle-switch input:checked + .qr-toggle-slider::before { transform: translateX(18px); }

.qr-opt-receipt {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
}
.qr-opt-receipt:focus { outline: none; border-color: #2ac1bc; }

.qr-opt-next-btn {
    display: block;
    width: calc(100% - 40px);
    margin: 16px 20px 8px;
    padding: 15px;
    background: #FA3E3F;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}
.qr-opt-next-btn:active { background: #e03535; }

/* ============================================================
   주문 상세 바텀시트
   ============================================================ */
.qr-orddet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 20px 12px;
    border-bottom: 1px solid #f0f0f0;
}
.qr-orddet-title {
    font-size: 16px;
    font-weight: 700;
}
.qr-orddet-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #888;
    cursor: pointer;
    padding: 4px 0;
}
.qr-orddet-section {
    padding: 14px 20px;
    border-bottom: 1px solid #f5f5f5;
}
.qr-orddet-section-top {
    display: flex;
    align-items: center;
    gap: 10px;
}
.qr-orddet-dt {
    font-size: 13px;
    color: #aaa;
}
.qr-orddet-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}
.qr-orddet-items {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}
.qr-orddet-opt-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 0;
    font-size: 13px;
    border-bottom: 1px solid #fafafa;
}
.qr-orddet-opt-row:last-child { border-bottom: none; }
.qr-orddet-opt-label {
    color: #888;
    flex-shrink: 0;
    min-width: 72px;
}
.qr-orddet-opt-val {
    color: #333;
}
.qr-orddet-opt-tag {
    display: inline-block;
    background: #f5f5f5;
    color: #555;
    font-size: 12px;
    border-radius: 10px;
    padding: 2px 10px;
}
.qr-orddet-footer {
    background: #fafafa;
}
.qr-orddet-pay-row {
    margin-bottom: 8px;
}
.qr-orddet-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.qr-orddet-total-label {
    font-size: 14px;
    color: #888;
}
/* 카드에 클릭 커서 */
.qr-ord-card { cursor: pointer; }

/* ── QR 코드 없이 진입 시 안내 화면 ─────────────────────────────────────── */
.qr-required-icon-wrap {
    width: 120px;
    height: 120px;
    background: #e8faf9;
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    box-shadow: 0 4px 24px rgba(42,193,188,0.15);
}
.qr-required-icon {
    width: 72px;
    height: 72px;
}
.qr-scan-line {
    animation: qrScanMove 1.8s ease-in-out infinite;
}
@keyframes qrScanMove {
    0%   { transform: translateY(-28px); opacity: 0; }
    20%  { opacity: 0.8; }
    80%  { opacity: 0.8; }
    100% { transform: translateY(28px);  opacity: 0; }
}
.qr-required-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 280px;
    background: #f9fafb;
    border-radius: 14px;
    padding: 16px 20px;
    text-align: left;
}
.qr-required-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #374151;
    line-height: 1.4;
}
.qr-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #2ac1bc;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}