/* =========================================
   기본 레이아웃 (PC 대응 1260px)
   ========================================= */
html {
  font-size: 0.7937vw;
}
@media (min-width: 1260px) {
  html {
    font-size: 10px;
  }
}
body {
  font-size: 1.6rem; /* 본문 기본 크기 (약 16px) */
  background-color: #f1f1f1;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
}

.order-wrap {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  background-color: #eef0f2;
  padding-bottom: 10rem;
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
  min-height: 100vh;
}

/* =========================================
   1. 헤더 스타일
   ========================================= */
.order-header {
  background-color: #fff;
  height: 15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5.2rem;
}

.order-header .btn-back {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.order-header .btn-back img {
  width: 5.8rem;
  height: auto;
}

.order-header h1 {
  font-size: 5rem;
  font-weight: 700;
  color: #000;
}

/* 헤더 오른쪽 아이콘 (장바구니) */
.header-right .cart-icon-btn {
  background: none;
  border: none;
  position: relative;
  padding: 0;
}
.cart-icon-btn img {
  width: 12.9rem;
  height: auto;
  margin-top: 3.8rem;
}
.cart-icon-btn .badge {
  position: absolute;
  left: 0rem;
  top: -3.4rem;
  background-color: #ff598d;
  color: #fff;
  font-size: 5rem;
  font-weight: 700;
  width: 7.8rem;
  height: 7.8rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding-bottom: 0.8rem;
}

/* =========================================
   2. 새로고침 안내바
   ========================================= */
.refresh-notice {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 3rem 5.2rem;
  color: #999;
  font-size: 3.6rem;
  letter-spacing: -0.025em;
}
.refresh-notice span {
  font-size: 3.6rem;
  letter-spacing: -0.025em;
}

.refresh-icon {
  width: 8.5rem;
  height: 8.5rem;
  /* 노란색 아이콘이 없다면 필터로 색상 조정 가능하지만, 
       이미지가 노란색이면 그대로 사용 */
}

/* =========================================
   3. 주문 카드 (공통)
   ========================================= */
.order-list {
  padding: 0 5.2rem; /* 좌우 여백 */
  display: flex;
  flex-direction: column;
  gap: 3.2rem; /* 카드 사이 간격 */
}

.order-card {
  background-color: #fff;
  border-radius: 3rem;
  padding: 6rem 5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* --- 카드 상단 (가게정보 + QR) --- */
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 5rem;
}

.info-area {
  display: flex;
  flex-direction: column;
}

.store-name {
  font-size: 5.2rem;
  font-weight: 700;
  color: #333;
  line-height: 1;
  margin-bottom: 3.2rem;
  letter-spacing: -0.025em;
}

.order-date {
  font-size: 3.8rem;
  color: #848484;
  line-height: 1;
  margin-bottom: 3.5rem;
  letter-spacing: -0.025em;
}

.order-number {
  display: inline-block;
  font-size: 4.4rem;
  color: #000;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.order-number span.gold {
  display: inline-block;
  text-align: center;
  background-color: #ffca00; /* 노란색 뱃지 */
  font-size: 4.4rem;
  color: #000;
  align-content: center;
  width: 19.8rem;
  height: 9rem;
  border-radius: 3rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* QR 버튼 */
.btn-qr {
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 2rem;
  width: 16rem;
  height: 16rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  cursor: pointer;
}
.btn-qr img {
  width: 23rem;
  height: 23rem;
  object-fit: contain;
}
.btn-qr span {
  font-size: 2.8rem;
  font-weight: 700;
}

/* --- 카드 중단 (메뉴명 + 가격) --- */
.card-mid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5rem;
  padding-bottom: 3rem;
  /* border-bottom: 1px solid #eee; (선택사항) */
}

.menu-info {
  display: flex;
  align-items: center;
  gap: 2.6rem;
}

.menu-name {
  font-size: 4.8rem;
  font-weight: 700;
  color: #333;
  letter-spacing: -0.025em;
}

.btn-receipt {
  background-color: #eff2f4;
  border: none;
  color: #303030;
  font-size: 2.8rem;
  width: 21.7rem;
  height: 6.9rem;
  border-radius: 3rem;
  cursor: pointer;
  letter-spacing: -0.025em;
}

.menu-price {
  font-size: 4.8rem;
  font-weight: 500;
  color: #333;
  letter-spacing: -0.025em;
}

/* =========================================
   4. 상태별 버튼 스타일 (하단)
   ========================================= */
.status-btn {
  width: 100%;
  border: none;
  border-radius: 2rem;
  padding: 3rem 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.2rem;
  height: 15.3rem;
}

.status-btn .main-text {
  font-size: 4.4rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
}

.status-btn .sub-text {
  font-size: 3.6rem;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
}

/* --- 색상 변형 (Variants) --- */

/* CASE 1: 주문 취소 (빨강) */
.btn-cancel {
  background-color: #ff4545; /* 진한 빨강 */
  color: #fff;
  box-shadow: 0 5px 15px rgba(255, 69, 69, 0.3);
}

/* CASE 2: 조리중 (주황) */
.btn-cooking {
  background-color: #ff8900; /* 주황색 */
  color: #fff;
  box-shadow: 0 5px 15px rgba(255, 138, 0, 0.3);
}

/* CASE 3: 조리 완료 (노랑) */
.btn-complete {
  background-color: #ffca00; /* 노란색 */
  color: #000;
  box-shadow: 0 5px 15px rgba(255, 205, 9, 0.3);
}

/* CASE 4: 이력 삭제 (연한 핑크) */
.btn-delete {
  background-color: #fde9eb; /* 연한 핑크 */
  color: #f05047; /* 글자는 빨강 */
  padding: 3.5rem 0; /* 한 줄일 때 높이 맞춤 */
}
/* =========================================
   5. 영수증 모달 (Receipt Popup)
   ========================================= */
.receipt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: none; /* 기본 숨김 */
  overflow-y: auto; /* 내용 길면 스크롤 */
  justify-content: center;
}

.receipt-overlay.active {
  display: flex;
}

.receipt-content-wrapper {
  width: 100%;
  max-width: 1170px;
  padding: 10rem 3.2rem 5rem 3.2rem; /* 상하좌우 여백 */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- 1. 영수증 종이 (흰색 카드) --- */
.receipt-card {
  background-color: #fff;
  width: 100%;
  border-radius: 3rem;
  padding: 6rem 5rem;
  position: relative;
  margin-bottom: 3rem;
}

/* 닫기 버튼 (좌상단 절대위치) */
.btn-close-receipt {
  position: absolute;
  top: 4rem;
  left: 4rem;
  background: none;
  border: none;
  cursor: pointer;
}
.btn-close-receipt img {
  width: 5rem;
  height: 5rem;
}

/* 헤더 (타이틀) */
.receipt-header {
  text-align: center;
  margin-bottom: 5rem;
  margin-top: 2rem;
}
.r-store-name {
  font-size: 6rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 2rem;
}
.r-order-num {
  font-size: 4.8rem;
  font-weight: 500;
  color: #333;
  letter-spacing: -0.02em;
}

/* 매장 정보 박스 */
.receipt-info-box {
  background-color: #f9f9f9;
  margin-bottom: 4rem;
  padding: 2rem; /* 필요시 내부 여백 추가 */
  border-radius: 2rem; /* (선택) 박스 둥글게 */
  letter-spacing: -0.025em;
}

/* [핵심] 한 줄(Row)을 Flex로 만들어서 좌우 배치 */
.r-info-row {
  display: flex;
  align-items: flex-start; /* 글자가 길어지면 상단 기준 정렬 */
  margin-bottom: 1rem;
  font-size: 3.8rem;
  color: #888;
  line-height: 1.5;
}

/* 왼쪽 제목 (등록번호, 주소 등) */
.r-info-row .label {
  white-space: nowrap; /* 줄바꿈 방지 (제목은 한 줄로 유지) */
  margin-right: 1.5rem; /* 제목과 내용 사이 간격 */
  min-width: 9rem; /* (선택) 제목들 줄맞춤을 위해 고정 너비 사용 가능 */
}

/* 오른쪽 내용 (주소, 날짜 등) */
.r-info-row .val {
  word-break: keep-all; /* 단어 단위로 줄바꿈 */
  flex: 1; /* 남은 공간을 모두 차지 */

  /* 두 번째 줄이 제목 아래로 가지 않고, 여기서부터 시작함 */
}

/* 구분선 */
.r-divider {
  border: none;
  border-top: 2px solid #a5aeb7;
  margin: 4rem 0;
}

/* --- 메뉴 리스트 --- */
.receipt-items {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.r-item-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 4.8rem;
  font-weight: 700;
  color: #333;
  letter-spacing: -0.025em;
}

/* 옵션 리스트 */
.r-opt-list {
  list-style: none;
  margin-top: 1rem;
  padding-left: 2rem; /* 들여쓰기 */
}
.r-opt-list li {
  font-size: 4rem;
  color: #888;
  line-height: 1.4;
  display: flex;
  justify-content: space-between; /* 옵션 가격 우측 정렬 시 */
  padding-right: 0;
  letter-spacing: -0.025em;
}
.r-opt-list li .opt-p {
  /* 옵션 가격 스타일 */
  letter-spacing: -0.025em;
}

/* --- 요약 및 합계 --- */
.r-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.r-row.bold {
  font-size: 4.8rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 2rem;
  letter-spacing: -0.025em;
}
.r-row.sub {
  font-size: 4rem;
  color: #888;
  letter-spacing: -0.025em;
}

/* 총 결제금액 */
.receipt-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 4.8rem;
  font-weight: 800;
  color: #333;
  margin-top: 2rem;
  letter-spacing: -0.025em;
}

/* --- 2. 하단 팁 박스 (검은색) --- */
.tip-box {
  background-color: #000;
  width: 100%;
  border-radius: 4rem; /* 둥근 모서리 */
  padding: 3.5rem 4rem;
  display: flex;
  align-items: center;
  justify-content: center; /* 내용 중앙 정렬 */
  gap: 3rem;
  position: relative;
}

.tip-icon {
  width: 6.4rem;
  height: auto;
  position: absolute;
  left: 7.7rem;
}

.tip-box span {
  color: #fff;
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}
/* =========================================
   6. QR 코드 모달 (QR Popup)
   ========================================= */
.qr-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: none; /* 기본 숨김 */
  justify-content: center;
  align-items: center; /* 화면 중앙 정렬 */
  overflow-y: auto;
}

.qr-overlay.active {
  display: flex;
}

.qr-content-wrapper {
  width: 100%;
  max-width: 1170px;
  padding: 0 3.2rem; /* 좌우 여백 */
}

.qr-card {
  background-color: #fff;
  width: 100%;
  border-radius: 3rem;
  /* 요청하신 패딩: 상10 / 좌우3.2 / 하5 */
  padding: 10rem 3.2rem 5rem 3.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* 1. 상단 주문번호 박스 (금색 버튼 스타일) */
.qr-top-box {
  width: 100%;
  height: 15.3rem;
  background-color: #ffca00; /* 금색(노랑) */
  border-radius: 3rem;
  margin-bottom: 12rem;

  /* 텍스트 스타일 */
  color: #333333;
  font-size: 4.8rem;
  font-weight: 700;
  line-height: 1;

  /* 내용 중앙 정렬 */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 2. 안내 문구 */
.qr-desc {
  font-size: 4.2rem;
  font-weight: 700;
  color: #000;
  line-height: 1;
  margin-bottom: 6.4rem;
  text-align: center;
}

/* 3. QR 이미지 영역 */
.qr-img-area img {
  width: 60rem;
  height: 60rem;
  object-fit: contain;
  margin-bottom: 22.9rem;
}

/* 4. 하단 닫기 버튼 */
.btn-qr-close {
  width: 100%;
  height: 15.3rem;
  background-color: #eaeafb; /* 요청하신 색상 */
  border-radius: 3rem; /* 버튼 통일성을 위해 3rem 적용 (필요시 수정 가능) */
  border: none;
  cursor: pointer;

  /* 텍스트 스타일 */
  font-size: 4.4rem;
  font-weight: 700;
  color: #000;

  display: flex;
  align-items: center;
  justify-content: center;
}
