/* ============ PDF 영수증 (A4) 전용 스타일 ============ */
/* receipt_buyer_pdf.html 용. html-to-pdf 출력 전용.
   피그마 프레임: 1920 × 2717 (A4 비율). */

@import url('https://fonts.googleapis.com/css2?family=Nanum+Gothic:wght@400;700;800&display=swap');

@page {
  size: 1920px 2717px;
  margin: 0;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #e5e5e5;
}

.rcp-page,
.rcp-page * {
  box-sizing: border-box;
}

.rcp-page {
  position: relative;
  width: 1920px;
  height: 2717px;
  margin: 0 auto;
  background: #ffffff;
  font-family: 'Nanum Gothic', sans-serif;
  color: #303030;
  overflow: hidden;
}

/* ============ 타이틀 영역 ============ */
.rcp-title {
  position: absolute;
  top: 98px;
  left: 130px;
  width: 690px;
  margin: 0;
  font-size: 70px;
  font-weight: 800;
  line-height: 1;
  color: #303030;
  text-align: center;
  white-space: nowrap;
}

/* 평행사변형 형태의 라이트 그레이 라인 (피그마 Group 2: 948×13) */
.rcp-title-line {
  position: absolute;
  top: 142px;
  left: 851px;
  width: 948px;
  height: 13px;
  background: url("../assets/img/rectangle_1.png") no-repeat center / 100% 100%;
}

/* ============ 좌측 카드: 영수증 정보 ============ */
.rcp-info-card {
  position: absolute;
  top: 395px;
  left: 134px;
  width: 794.328px;
  height: 382px;
  padding: 41px 73.47px 41px 74px;
  background: #f5f6f7;
  border-radius: 10px;
}

.rcp-info-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.rcp-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.rcp-info-row dt,
.rcp-info-row dd {
  margin: 0;
  padding: 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 60px;
  color: #303030;
  white-space: nowrap;
}

.rcp-info-row dd {
  text-align: right;
}

/* ============ 우측 상단: 영수증 + 총 결제금액 ============ */
.rcp-summary-title {
  position: absolute;
  top: 400px;
  right: 132px;
  margin: 0;
  font-size: 70px;
  font-weight: 700;
  line-height: 1;
  color: #303030;
  letter-spacing: 7px;
  text-transform: uppercase;
  text-align: right;
  white-space: nowrap;
}

.rcp-summary-numbers {
  position: absolute;
  top: 511px;
  right: 132px;
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 50px;
  color: #7d7d7d;
  text-align: right;
}

.rcp-summary-numbers p {
  margin: 0;
  white-space: nowrap;
}

.rcp-summary-total {
  position: absolute;
  top: 656.48px;
  left: 1140.27px;
  width: 649.73px;
  height: 116.42px;
  background: url("../assets/img/rectangle.png") no-repeat center / 100% 100%;
}

.rcp-summary-total-label {
  position: absolute;
  top: 50%;
  left: 73.73px;
  transform: translateY(-50%);
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  color: #303030;
  white-space: nowrap;
}

.rcp-summary-total-value {
  position: absolute;
  top: 50%;
  right: 39px;
  transform: translateY(-50%);
  font-size: 45px;
  font-weight: 800;
  letter-spacing: 2.25px;
  line-height: 1;
  color: #303030;
  text-align: right;
  white-space: nowrap;
}

/* ============ 영수증 상세정보 테이블 ============ */
.rcp-detail {
  position: absolute;
  top: 1021px;
  left: 130px;
  width: 1660px;
  height: 475px;
}

.rcp-detail-mark {
  position: absolute;
  top: 8px;
  left: 0;
  width: 25px;
  height: 25px;
  background: #303030;
}

.rcp-detail-title {
  position: absolute;
  top: 0.09px;
  left: 55.34px;
  margin: 0;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 1.26px;
  line-height: 1;
  color: #303030;
  white-space: nowrap;
}

.rcp-detail-cols {
  position: absolute;
  top: 0;
  left: 0;
  width: 1660px;
  height: 41px;
}

.rcp-detail-col {
  position: absolute;
  top: 0;
  width: 156px;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 1.26px;
  line-height: 1;
  color: #303030;
  text-align: center;
  white-space: nowrap;
}

.rcp-detail-col--qty   { left: 832px; }  /* 중심 1040 - 78 - 130(테이블 기준) */
.rcp-detail-col--price { left: 1133px; } /* 중심 1341 - 78 - 130 */
.rcp-detail-col--total { left: 1456px; } /* 중심 1664 - 78 - 130 */

.rcp-detail-bar {
  position: absolute;
  top: 87px;
  left: 0;
  width: 1660px;
  height: 8px;
  background: url("../assets/img/rectangle_4.png") no-repeat center / 100% 100%;
}

.rcp-detail-body {
  position: absolute;
  top: 88px;
  left: 0;
  width: 1660px;
  height: 180px;
  border-left: 2px solid #cdcdcd;
  border-right: 2px solid #cdcdcd;
}

.rcp-detail-name {
  position: absolute;
  top: 52px;  /* 1161 - 1109 */
  left: 63px; /* 195 - (130 + 2 border) */
  margin: 0;
  font-size: 35px;
  font-weight: 700;
  line-height: 1;
  color: #303030;
  white-space: nowrap;
}

.rcp-detail-sub {
  position: absolute;
  top: 107.95px; /* 1216.95 - 1109 */
  left: 63px;
  margin: 0;
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
  color: #7d7d7d;
  white-space: nowrap;
}

.rcp-detail-value {
  position: absolute;
  top: 76px; /* 1185 - 1109 */
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
  color: #303030;
  text-align: right;
  white-space: nowrap;
}

.rcp-detail-value--qty   { right: 670px; } /* 1788(inner right) - 1118 */
.rcp-detail-value--price { right: 369px; } /* 1788 - 1419 */
.rcp-detail-value--total { right: 46px; }  /* 1788 - 1742 */

.rcp-detail-divider {
  position: absolute;
  top: 266px; /* 1287 - 1021 */
  left: 0;
  width: 1660px;
  height: 2px;
  background: #cdcdcd;
}

.rcp-detail-total {
  position: absolute;
  top: 429px; /* 1450 - 1021 */
  left: 1020px; /* 1150 - 130 */
  width: 597.03px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rcp-detail-total-label {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 1.5px;
  line-height: 1;
  color: #303030;
  text-transform: uppercase;
  white-space: nowrap;
}

.rcp-detail-total-value {
  margin: 0;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1;
  color: #303030;
  text-align: right;
  white-space: nowrap;
}

/* ============ 하단 회색 영역 (메타 정보) ============ */
.rcp-meta-bg {
  position: absolute;
  top: 1835px;
  left: 2px;
  width: 1920px;
  height: 650px;
  background: #f5f6f7;
}

.rcp-meta-card {
  position: absolute;
  top: 38px;   /* 1873 - 1835 */
  left: 378px; /* 380 - 2 */
  width: 1164px;
  height: 376px;
  padding: 57px 170px 49px 166px;
  background: #ffffff;
}

.rcp-meta-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.rcp-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.rcp-meta-row dt {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 60px;
  color: #7d7d7d;
  white-space: nowrap;
}

.rcp-meta-row dd {
  margin: 0;
  font-size: 28px;
  font-weight: 400;
  line-height: 60px;
  color: #7d7d7d;
  text-align: right;
  white-space: nowrap;
}

.rcp-notes {
  position: absolute;
  top: 461px;  /* 2296 - 1835 */
  left: 488px; /* 490 - 2 */
  width: 945px;
  margin: 0;
  font-size: 26px;
  font-weight: 400;
  line-height: 46px;
  color: #303030;
  opacity: 0.8;
}

.rcp-notes p {
  margin: 0;
  white-space: nowrap;
}

/* ============ 푸터: 구분선 + CoReset 로고 ============ */
.rcp-footer-line {
  position: absolute;
  top: 2483.42px; /* 피그마 y=2485.42, 이미지 inset -2px → 시작 y=2483.42 */
  left: 89.73px;
  width: 1744.7px;
  height: 0;
  border-top: 2px dashed #cdcdcd;
}

.rcp-footer-logo {
  position: absolute;
  top: 2539px;
  left: 764px;
  width: 393px;
  height: 99px;
  opacity: 0.3;
}

.rcp-footer-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ============ 판매자용 영수증 PDF (seller 모디파이어) ============ */
/* buyer 대비 차이점:
   - 상세정보 테이블 높이: 475 → 565 (기록수수료 행 추가)
   - body 높이: 180 → 353 (두 행 + 중간 divider 포함)
   - 하단 divider 추가 (body 하단 y=1460)
   - 총 결제금액 섹션 위치 시프트 (top 429→519, left 1020→1015) */

.rcp-page--seller .rcp-detail {
  height: 565px;
}

.rcp-page--seller .rcp-detail-body {
  height: 353px;
}

/* 기록수수료 행 (판매자 전용 row2, body 내부 기준 top 오버라이드) */
.rcp-detail-name--row2  { top: 224px; } /* 1333 - 1109 */
.rcp-detail-sub--row2   { top: 280px; } /* 1389 - 1109 */
.rcp-detail-value--row2 { top: 248px; } /* 1357 - 1109 */

/* 하단 divider (판매자 전용, body 하단 y=1460) */
.rcp-detail-divider--bottom {
  top: 439px; /* 1460 - 1021 */
}

/* 총 결제금액 섹션 위치 재정의 (판매자 전용) */
.rcp-page--seller .rcp-detail-total {
  top: 519px; /* 1540 - 1021 */
  left: 1015px; /* 1145 - 130 */
}
