/* ============================================================================
   /css/rental-plan-panel-20261204.css
   「약정별 요금 한눈에 보기」 패널 — 상품 상세(product.php?rental=…) 왼쪽 사진 아래
   ----------------------------------------------------------------------------
   · 신규 파일입니다. 기존 CSS(rental-20261123.css / rental-policy-20261127.css 등)는
     건드리지 않고, 이 파일의 규칙만으로 동작합니다.
   · 클래스는 모두 rtp- 접두사를 씁니다(rt- 접두사는 기존 상세 페이지가 이미 사용 중).
   · 루트 요소: <aside class="rtp" id="rtQuickPanel">
   · JS(rental-plan-panel-20261204.js)가 #rtOpts 를 읽어 이 안을 채웁니다.
     JS 가 실리지 않으면 aside 는 hidden 상태로 남아 아무것도 그리지 않습니다.
   ========================================================================== */

/* ---------------------------------------------------------------- 0. 토큰 */
.rtp {
  --rtp-ink: var(--sf-ink, #0b1220);
  --rtp-ink2: var(--sf-ink-2, #1e293b);
  --rtp-body: var(--sf-body, #475569);
  --rtp-muted: var(--sf-muted, #7b8794);
  --rtp-line: var(--sf-line, #e6eaf0);
  --rtp-line-soft: var(--sf-line-soft, #f1f4f8);
  --rtp-blue: var(--sf-brand, #2563eb);
  --rtp-blue-soft: var(--sf-brand-soft, #eff4ff);
  position: relative;
  margin: 18px 0 0;
  padding: 18px 18px 14px;
  border: 1px solid var(--rtp-line);
  border-radius: var(--sf-radius, 18px);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 30px rgba(15, 23, 42, .05);
  color: var(--rtp-ink);
  font-family: var(--sf-font, 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif);
  box-sizing: border-box;
}
.rtp *,
.rtp *::before,
.rtp *::after { box-sizing: border-box; }
.rtp[hidden] { display: none !important; }

/* ------------------------------------------------------------------ 1. 머리 */
.rtp__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 12px;
}
.rtp__headText {
  flex: 1 1 190px;
  min-width: 0;
}
.rtp__title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -.02em;
  color: var(--rtp-ink);
}
.rtp__sub {
  margin: 3px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--rtp-muted);
}

/* 머리 오른쪽 — 이미지 저장 · 공유 */
.rtp__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  margin-left: auto;
}
.rtp__act {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--rtp-line);
  border-radius: 9px;
  background: #fff;
  color: var(--rtp-ink2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .14s ease, background-color .14s ease, color .14s ease, opacity .14s ease;
}
.rtp__act svg { flex: 0 0 auto; width: 14px; height: 14px; }
.rtp__act:hover { border-color: #c2cbd8; background: #f8fafc; }
.rtp__act:focus-visible { outline: 2px solid var(--rtp-blue); outline-offset: 2px; }
.rtp__act[disabled] { opacity: .6; cursor: default; }
.rtp__act[disabled]:hover { border-color: var(--rtp-line); background: #fff; }
.rtp__act--share { border-color: var(--rtp-ink); background: var(--rtp-ink); color: #fff; }
.rtp__act--share:hover { border-color: #1f2b3d; background: #1f2b3d; }
.rtp__act[hidden] { display: none !important; }

/* 버튼 아래 짧은 안내(aria-live) */
.rtp__status {
  flex: 1 1 100%;
  margin: 1px 0 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--rtp-muted);
}
.rtp__status[hidden] { display: none !important; }
.rtp__status.is-error { color: #b42318; }

/* --------------------------------------------------------------- 2. 탭(관리) */
.rtp__tabs {
  display: flex;
  gap: 4px;
  margin: 14px 0 10px;
  padding: 4px;
  border-radius: 12px;
  background: #f4f6fa;
}
.rtp__tabs[hidden] { display: none !important; }
.rtp__tab {
  flex: 1 1 0;
  min-width: 0;
  appearance: none;
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 8px 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--rtp-body);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color .14s ease, color .14s ease, box-shadow .14s ease;
}
.rtp__tab:hover { color: var(--rtp-ink2); }
.rtp__tab.is-active {
  background: #fff;
  color: var(--rtp-ink);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .14), inset 0 0 0 1px rgba(11, 18, 32, .07);
}
.rtp__tab:focus-visible { outline: 2px solid var(--rtp-blue); outline-offset: 2px; }

/* --------------------------------------------------------------- 3. 약정 행 */
.rtp__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.rtp__row {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid var(--rtp-line);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .14s ease, box-shadow .14s ease, background-color .14s ease;
}
.rtp__row:hover { border-color: #c2cbd8; }
.rtp__row:focus-visible { outline: 2px solid var(--rtp-blue); outline-offset: 2px; }

/* 선택된 칸 — 진한 테두리 + 체크 */
.rtp__row.is-active,
.rtp__row[aria-checked="true"] {
  border-color: var(--rtp-ink);
  box-shadow: inset 0 0 0 1px var(--rtp-ink);
  background: #fbfcff;
}

/* 체크 표시 */
.rtp__mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border: 1.5px solid #d5dce6;
  border-radius: 50%;
  background: #fff;
  transition: background-color .14s ease, border-color .14s ease;
}
.rtp__mark svg {
  width: 11px;
  height: 11px;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .14s ease, transform .14s ease;
}
.rtp__row.is-active .rtp__mark,
.rtp__row[aria-checked="true"] .rtp__mark {
  background: var(--rtp-ink);
  border-color: var(--rtp-ink);
}
.rtp__row.is-active .rtp__mark svg,
.rtp__row[aria-checked="true"] .rtp__mark svg { opacity: 1; transform: scale(1); }

/* 약정명 + 조건 */
.rtp__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rtp__c {
  display: block;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--rtp-ink2);
  overflow-wrap: anywhere;
}
.rtp__cond {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--rtp-muted);
  overflow-wrap: anywhere;
}
.rtp__cond:empty { display: none; }

/* 금액 */
.rtp__price {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  white-space: nowrap;
  color: var(--rtp-ink);
}
.rtp__price b {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.rtp__price i {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--rtp-muted);
}

/* --------------------------------------------------------------- 4. 하단 안내 */
.rtp__foot {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed var(--rtp-line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rtp__foot p {
  position: relative;
  margin: 0;
  padding-left: 14px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--rtp-body);
}
.rtp__foot p::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rtp-blue);
}
.rtp__foot p[hidden] { display: none !important; }

/* 빈 상태(약정이 1개뿐이라 패널을 접을 때는 hidden) */
.rtp__empty {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--rtp-muted);
}
.rtp__empty[hidden] { display: none !important; }

/* --------------------------------------------------- 5. 데스크톱 sticky */
/* JS 가 "왼쪽 열(사진+썸네일+패널)이 화면 높이에 다 들어갈 때"만 .rt-top 에
   .rtp-sticky 를 붙입니다. 들어가지 않는 화면(노트북 등)에서는 그냥 일반 흐름이라
   사진 아래가 잘리지 않습니다. */
.rt-top.rtp-sticky .rt-media {
  position: sticky;
  top: 16px;
  align-self: start;
}
@media (max-width: 1100px) {
  .rt-top.rtp-sticky .rt-media { position: static; }
}

/* ------------------------------------------------------------- 6. 반응형 */
@media (max-width: 1100px) {
  .rtp { margin-top: 16px; }
}
@media (max-width: 640px) {
  .rtp {
    margin-top: 14px;
    padding: 15px 14px 12px;
    border-radius: 16px;
  }
  .rtp__actions { width: 100%; }/* 좁은 화면: 버튼은 제목 아래 한 줄, 두 버튼이 폭을 나눠 가진다 */
  .rtp__act { flex: 1 1 0; height: 34px; padding: 0 8px; font-size: 12.5px; }
  .rtp__act svg { width: 15px; height: 15px; }
  .rtp__title { font-size: 15.5px; }
  .rtp__sub { font-size: 12px; }
  .rtp__tabs { margin: 12px 0 9px; }
  .rtp__tab { padding: 8px 4px; font-size: 12.5px; }
  .rtp__row { padding: 10px 11px; gap: 9px; }
  .rtp__c { font-size: 13.5px; }
  .rtp__cond { font-size: 11px; }
  .rtp__price b { font-size: 15px; }
  .rtp__foot p { font-size: 12px; }
}

/* ==================================================== 7. 캡처용 이미지(오프스크린)
   「이미지 저장」·「공유」가 html2canvas 로 찍는 합본 이미지의 모양입니다.
   화면 패널과 별개로 .rtp-shot-wrap 을 화면 밖에 잠깐 만들어 찍고 바로 지웁니다.
   관리 유형이 여러 개면 표를 위아래로 이어 붙여 한 장에 담습니다.
   폭은 780px 고정(렌더), html2canvas scale 2 → 완성 PNG 가로 1,560px. */
.rtp-shot-wrap {
  position: fixed;
  left: -12000px;
  top: 0;
  width: 780px;
  z-index: -1;
  pointer-events: none;
  background: #fff;
}
.rtp-shot {
  width: 780px;
  box-sizing: border-box;
  margin: 0;
  padding: 22px 26px 16px;
  border-top: 4px solid #2563eb;
  background: #fff;
  color: #0b1220;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
}
.rtp-shot *,
.rtp-shot *::before,
.rtp-shot *::after { box-sizing: border-box; }

.rtp-shot__eyebrow {
  margin: 0 0 3px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #2563eb;
}
.rtp-shot__title {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.025em;
  color: #0b1220;
  overflow-wrap: anywhere;
}
.rtp-shot__meta {
  margin: 5px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
}
.rtp-shot__meta b { font-weight: 700; color: #334155; }
.rtp-shot__meta .dot { padding: 0 5px; color: #cbd5e1; }

.rtp-shot__body { margin-top: 14px; }
.rtp-shot__sec { margin-top: 12px; }
.rtp-shot__sec:first-child { margin-top: 0; }
.rtp-shot__secHead {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
}
.rtp-shot__badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  background: #eef4ff;
  color: #1d4ed8;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1;
}
.rtp-shot__count {
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
}

.rtp-shot__rows {
  border: 1px solid #e6eaf0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.rtp-shot__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  border-top: 1px solid #f1f4f8;
}
.rtp-shot__row:first-child { border-top: 0; }
/* inset box-shadow 는 html2canvas 가 통짜 검정으로 그리므로 왼쪽 테두리로 표시한다 */
.rtp-shot__row.is-on {
  border-left: 3px solid #0b1220;
  padding-left: 10px;
  background: #f4f8ff;
}
.rtp-shot__mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border: 1.5px solid #d5dce6;
  border-radius: 50%;
  background: #fff;
}
.rtp-shot__mark svg { width: 10px; height: 10px; opacity: 0; }
.rtp-shot__row.is-on .rtp-shot__mark { background: #0b1220; border-color: #0b1220; }
.rtp-shot__row.is-on .rtp-shot__mark svg { opacity: 1; }
.rtp-shot__name {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.rtp-shot__c {
  font-size: 14px;
  font-weight: 800;
  color: #1e293b;
  overflow-wrap: anywhere;
}
.rtp-shot__cond {
  font-size: 11px;
  font-weight: 600;
  color: #7b8794;
  overflow-wrap: anywhere;
}
.rtp-shot__cond:empty { display: none; }
.rtp-shot__price {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  white-space: nowrap;
}
.rtp-shot__price b {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: #0b1220;
}
.rtp-shot__price i {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 600;
  color: #94a3b8;
}

.rtp-shot__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 9px;
  border-top: 1px dashed #e6eaf0;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.4;
  color: #94a3b8;
}
.rtp-shot__note { max-width: 560px; }
.rtp-shot__url { flex: 0 0 auto; font-size: 11px; font-weight: 800; color: #64748b; letter-spacing: .01em; }

@media (prefers-reduced-motion: reduce) {
  .rtp, .rtp * { transition: none !important; }
}

/* ============================================== 8. 기존 「견적서·상품 안내 저장/공유」 버튼 숨김
   2026-12-04 — 제미나이가 만든 #rtShareModalBtn(「📄 견적서 · 상품 안내 저장 / 공유」)이
   들어 있는 .sf-detail-actions-row 한 줄만 화면에서 감춥니다.
   · 마크업·기존 JS·모달(#rtShareModal)은 그대로라서, 아래 규칙 **한 줄을 지우거나 주석 처리하면**
     원래 버튼이 그대로 되살아납니다.
   · 전화 상담 · 카톡 상담 줄은 #rtShareModalBtn 이 없어 :has() 조건에 걸리지 않습니다.
   · :has() 미지원 브라우저에서는 이 규칙만 무시되어 버튼이 보입니다(다른 기능 영향 없음). */
.sf-detail-actions-row:has(#rtShareModalBtn) { display: none !important; }

/* 인쇄(견적서 저장 등)에서는 화면용 그림자만 뺀다 */
@media print {
  .rtp { box-shadow: none; }
}
