/* DIME landing v2 — bagian "receipt": printer logam hitam + struk kertas termal yang dicetak sesuai gulir.
   Kertas = satu-satunya permukaan terang di halaman. Monokrom. Semua selektor di bawah #receipt. */

#receipt { --pw: 384px; --lg: 64px; --nw: 248px; padding-bottom: 40px; }

/* ---------- Kepala bagian ---------- */
#receipt .rc-head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; }
#receipt .rc-intro .sub { margin-top: 0; }
#receipt .rc-links { display: flex; align-items: center; gap: 22px; margin-top: 26px; flex-wrap: wrap; }

/* ---------- Lintasan & panggung menempel ---------- */
#receipt .rc-track { position: relative; height: 185vh; margin-top: 56px; }
#receipt .rc-stage {
  position: sticky; top: var(--nav-h, 64px); height: calc(100vh - var(--nav-h, 64px));
  display: flex; flex-direction: column; padding-top: 18px; padding-bottom: 0;
}

/* ---------- Kepala printer (pelat) ---------- */
#receipt .rc-printer {
  --chamfer: 18px;
  flex: none; position: relative; z-index: 4;
  display: grid; grid-template-columns: minmax(0, 1fr) 400px minmax(0, 1fr);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.014) 0 1px, transparent 1px 3px),
    radial-gradient(60% 140% at 50% 120%, rgba(210,220,240,.07), transparent 60%),
    linear-gradient(180deg, #16171b 0%, #0c0d10 62%, #08090b 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 -1px 0 rgba(0,0,0,.8), 0 30px 60px -30px rgba(0,0,0,.9);
}
#receipt .rc-zone { padding: 20px 24px 22px; min-width: 0; }
#receipt .rc-zone + .rc-zone { border-left: 1px solid var(--hair); }
#receipt .rc-zl { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
#receipt .rc-live { font-size: 10.5px; color: var(--dim); letter-spacing: .06em; }
#receipt .rc-live::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--steel-2); margin-right: 7px; vertical-align: 1px; box-shadow: 0 0 6px rgba(255,255,255,.6); }

/* chip model */
#receipt .rc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#receipt .rc-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 10px;
  font: 500 12px/1 var(--mono); letter-spacing: .01em; color: var(--muted); cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
  border: 1px solid var(--hair-2); border-radius: 3px;
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
#receipt .rc-chip i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.18); transition: background .25s, box-shadow .25s; }
#receipt .rc-chip:hover { color: var(--text); border-color: rgba(255,255,255,.28); }
#receipt .rc-chip[aria-checked="true"] { color: var(--white); border-color: rgba(255,255,255,.55); background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.025)); }
#receipt .rc-chip[aria-checked="true"] i { background: var(--white); box-shadow: 0 0 8px rgba(255,255,255,.9); }
#receipt .rc-chip:focus-visible, #receipt .rc-range:focus-visible { outline: 1px solid var(--white); outline-offset: 2px; }
#receipt .rc-empty { font-size: 12px; color: var(--dim); }

/* zona tengah: layar baca kecil + kisi ventilasi */
#receipt .rc-head-c { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; text-align: center; }
#receipt .rc-read {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%; height: 30px; padding: 0 14px;
  font-size: 11.5px; color: var(--steel-2); letter-spacing: .02em;
  background: #050506; border: 1px solid rgba(255,255,255,.07); border-radius: 2px;
  box-shadow: inset 0 1px 6px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.05);
}
#receipt .rc-read span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#receipt .rc-led { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--white); box-shadow: 0 0 10px rgba(255,255,255,.9); animation: pulse 2.4s ease-in-out infinite; }
#receipt .rc-read2 { display: flex; gap: 16px; font-size: 10.5px; letter-spacing: .12em; color: var(--dim); }
#receipt .rc-read2 b { color: var(--text); font-weight: 500; letter-spacing: .02em; margin-left: 4px; }
#receipt .rc-vents { display: flex; gap: 7px; margin-top: 4px; }
#receipt .rc-vents i { width: 16px; height: 3px; border-radius: 2px; background: #030304; box-shadow: inset 0 1px 1px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.07); }

/* slider ukuran prompt */
#receipt .rc-val { font-size: 11.5px; color: var(--dim); white-space: nowrap; }
#receipt .rc-val b { color: var(--text); font-weight: 500; }
#receipt .rc-range {
  --p: 35%;
  -webkit-appearance: none; appearance: none; width: 100%; height: 18px; margin: 0; background: transparent; cursor: pointer; display: block;
}
#receipt .rc-range::-webkit-slider-runnable-track {
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,.85) 0 var(--p), rgba(255,255,255,.12) var(--p) 100%);
}
#receipt .rc-range::-moz-range-track { height: 2px; background: rgba(255,255,255,.12); }
#receipt .rc-range::-moz-range-progress { height: 2px; background: rgba(255,255,255,.85); }
#receipt .rc-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; margin-top: -7px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #ffffff, #c9ccd3 55%, #7d828b 100%);
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 0 12px rgba(225,235,255,.45);
}
#receipt .rc-range::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fff, #c9ccd3 55%, #7d828b); box-shadow: 0 0 12px rgba(225,235,255,.45); }
#receipt .rc-ticks { position: relative; height: 14px; margin-top: 4px; font-size: 9.5px; color: var(--dim); letter-spacing: .04em; }
#receipt .rc-ticks span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
#receipt .rc-ticks span:nth-child(1) { left: 0; transform: none; }
#receipt .rc-ticks span:nth-child(2) { left: 30.3%; }
#receipt .rc-ticks span:nth-child(3) { left: 60.6%; }
#receipt .rc-ticks span:nth-child(4) { left: auto; right: 0; transform: none; }
#receipt .rc-check { margin-top: 12px; }
#receipt .rc-check .btn { height: 30px; font-size: 12.5px; }
#receipt .rc-vout { margin-top: 8px; font-size: 10.5px; line-height: 1.5; color: var(--dim); min-height: 32px; }
#receipt .rc-vout b { color: var(--text); font-weight: 500; }
#receipt .rc-vout .ok { color: var(--white); }
#receipt .rc-vout a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(255,255,255,.3); }

/* ---------- Celah printer: garis gelap dengan bibir cahaya putih dingin ---------- */
#receipt .rc-slot { position: relative; z-index: 5; flex: none; width: calc(var(--pw) + 40px); max-width: 100%; height: 12px; margin: -7px auto 0; border-radius: 2px;
  background: linear-gradient(180deg, #000 0%, #020203 60%, #0b0c0e 100%);
  box-shadow: inset 0 2px 4px rgba(0,0,0,1), 0 0 0 1px rgba(255,255,255,.05); }
#receipt .rc-slot i { position: absolute; left: 6%; right: 6%; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--edge) 18%, var(--edge) 82%, transparent); box-shadow: var(--edge-glow); }
#receipt .rc-slot::after { content: ''; position: absolute; left: 10%; right: 10%; top: 100%; height: 40px; pointer-events: none;
  background: radial-gradient(50% 100% at 50% 0%, rgba(225,235,255,.10), transparent 70%); }

/* ---------- Jendela kertas ---------- */
#receipt .rc-feed { position: relative; flex: 1; min-height: 0; margin-top: -6px; overflow: hidden; }
/* bayangan celah di atas kertas yang baru keluar */
#receipt .rc-feed::before { content: ''; position: absolute; z-index: 3; top: 0; left: 50%; width: calc(var(--pw) + 20px); transform: translateX(-50%); height: 30px; pointer-events: none;
  background: linear-gradient(180deg, rgba(4,4,5,.9), rgba(4,4,5,.35) 40%, transparent); }
#receipt .rc-roll { position: absolute; left: 0; right: 0; top: 0; transform-origin: 50% 0; will-change: transform; }
#receipt .rc-paper-wrap { width: var(--pw); margin: 0 auto; filter: drop-shadow(0 28px 34px rgba(0,0,0,.65)) drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
#receipt .rc-ghost { position: absolute; left: 0; right: 0; top: 0; z-index: 1; transform-origin: 50% 0; pointer-events: none;
  transition: transform .45s cubic-bezier(.5,0,.75,0), opacity .32s ease-in; }

/* ---------- Kertas termal ---------- */
#receipt .rc-paper {
  position: relative; color: #1c1e22;
  background:
    linear-gradient(90deg, rgba(0,0,0,.06), transparent 7%, transparent 93%, rgba(0,0,0,.06)),
    radial-gradient(120% 40% at 50% 0%, rgba(255,255,255,.5), transparent 70%),
    repeating-linear-gradient(0deg, rgba(0,0,0,.014) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, #e9eaee 0%, #e3e4e8 55%, #dcdee3 100%);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 7px) no-repeat, conic-gradient(from -45deg at 50% 100%, #000 90deg, #0000 0) bottom / 14px 7px repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - 7px) no-repeat, conic-gradient(from -45deg at 50% 100%, #000 90deg, #0000 0) bottom / 14px 7px repeat-x;
}
#receipt .rc-p-in { position: relative; padding: 40px 32px 34px; font: 400 12px/1.55 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; text-shadow: 0 0 .35px rgba(0,0,0,.45); }
#receipt .rc-off { padding: 40px 0; text-align: center; color: #55585f; }

#receipt .rc-ph { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px dashed rgba(20,22,26,.32); }
#receipt .rc-ph img { width: 30px; height: 30px; border-radius: 50%; filter: grayscale(1) contrast(1.15); box-shadow: 0 0 0 1px rgba(20,22,26,.25); }
#receipt .rc-ph b { display: block; font-weight: 500; font-size: 11.5px; letter-spacing: .22em; color: #121316; }
#receipt .rc-ph small { display: block; font-size: 9.5px; letter-spacing: .04em; color: #6a6d74; margin-top: 2px; }
#receipt .rc-paper .example-tag { color: #3a3d43; border-color: rgba(20,22,26,.45); height: 19px; font-size: 9px; }
#receipt .rc-paper .rc-real { border-style: solid; color: #111; border-color: #111; }

#receipt .rc-model { position: relative; padding: 16px 0 14px; border-bottom: 1px dashed rgba(20,22,26,.32); margin-bottom: 10px; }
#receipt .rc-k { display: block; font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: #71747b; }
#receipt .rc-model strong { display: block; font: 500 17px/1.25 var(--sans); letter-spacing: -.01em; color: #0e0f12; margin-top: 5px; text-shadow: none; }
#receipt .rc-id { display: block; font-size: 10.5px; color: #6a6d74; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* stempel hasil cek tarif */
#receipt .rc-stamp { position: absolute; right: -4px; top: 14px; padding: 5px 8px; font: 500 9px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase;
  color: rgba(22,24,28,.78); border: 1.5px solid rgba(22,24,28,.7); border-radius: 2px; transform: rotate(-4deg) scale(1.2); opacity: 0; pointer-events: none;
  transition: opacity .35s var(--ease), transform .45s var(--ease); mix-blend-mode: multiply; }
#receipt .rc-stamp:empty { display: none; }
#receipt .rc-stamp.show { opacity: 1; transform: rotate(-4deg) scale(1); }

#receipt .rc-l { position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 0; }
#receipt .rc-l .v { color: #0e0f12; font-weight: 500; }
#receipt .rc-2 { flex-wrap: wrap; row-gap: 0; padding: 6px 0 7px; }
#receipt .rc-2 em { flex-basis: 100%; font-style: normal; font-size: 10.5px; color: #6a6d74; margin-top: 1px; }
#receipt .rc-rule { height: 0; border-top: 1px dashed rgba(20,22,26,.42); margin: 10px 0 8px; position: relative; }
#receipt .rc-rule::after { content: ''; position: absolute; left: 0; right: 0; top: 2px; border-top: 1px dashed rgba(20,22,26,.42); }
#receipt .rc-total { align-items: center; padding: 8px 0 10px; }
#receipt .rc-total > span:first-of-type { font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; font-weight: 500; }
#receipt .rc-total .v { font-size: 23px; letter-spacing: -.02em; font-weight: 500; }
#receipt .rc-small { font-size: 10.5px; color: #55585f; padding: 3px 0; }
#receipt .rc-code { margin: 12px 0 8px; }
#receipt .rc-bar { display: block; width: 100%; height: 40px; fill: #17181b; }
#receipt .rc-time { justify-content: center; color: #75787f; letter-spacing: .06em; padding-top: 6px; }

/* penanda kecil di tepi kertas (cocok dengan nomor catatan) */
#receipt .mk { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; font: 500 8.5px/1 var(--mono); font-style: normal; letter-spacing: 0; flex: none; }
#receipt .rc-paper .mk { position: absolute; top: 50%; margin-top: -7.5px; color: #3a3d43; border: 1px solid rgba(20,22,26,.42); text-shadow: none; }
#receipt .rc-paper .rc-2 .mk { top: 13px; margin-top: -7.5px; }
#receipt .rc-paper .mk.l { left: -25px; }
#receipt .rc-paper .mk.r { right: -25px; }

/* ---------- Catatan pinggir (desktop): ikut bergerak bersama kertas ---------- */
#receipt .rc-notes { list-style: none; margin: 0; padding: 0; position: absolute; left: 0; right: 0; top: 0; height: 0; pointer-events: none; }
#receipt .rc-note {
  position: absolute; width: min(var(--nw), calc(50% - var(--pw) / 2 - var(--lg) - 8px));
  display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center;
  opacity: 0; transition: opacity .55s var(--ease), transform .7s var(--ease);
}
#receipt .rc-note.l { right: calc(50% + var(--pw) / 2 + var(--lg)); grid-template-columns: 1fr auto; text-align: right; transform: translateX(-12px); }
#receipt .rc-note.r { left: calc(50% + var(--pw) / 2 + var(--lg)); transform: translateX(12px); }
#receipt .rc-note.on { opacity: 1; transform: none; pointer-events: auto; }
#receipt .rc-note .mk { color: var(--text); border: 1px solid rgba(255,255,255,.4); }
#receipt .rc-note.l .mk { grid-column: 2; grid-row: 1; }
#receipt .rc-note.l b { grid-column: 1; grid-row: 1; }
#receipt .rc-note b { font: 500 11px/18px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text); white-space: nowrap; }
#receipt .rc-note > span { grid-column: 1 / -1; margin-top: 7px; font-size: 14px; line-height: 1.55; color: var(--muted); }
#receipt .rc-note a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); text-underline-offset: 3px; white-space: nowrap; }
#receipt .rc-note a:hover { text-decoration-color: var(--white); }
#receipt .rc-note code { font: 12.5px var(--mono); color: var(--text); }
#receipt .rc-note em { font-style: normal; color: var(--text); }
/* garis penunjuk rambut dari catatan ke tepi kertas, digambar dari sisi kertas */
#receipt .rc-note::before { content: ''; position: absolute; top: calc(9px + var(--off, 0px)); width: calc(var(--lg) - 4px); height: 1px; transition: transform .7s var(--ease) .05s; }
#receipt .rc-note.l::before { left: calc(100% + 4px); transform-origin: 100% 50%; transform: scaleX(0); background: linear-gradient(90deg, rgba(255,255,255,.15), rgba(255,255,255,.75)); }
#receipt .rc-note.r::before { right: calc(100% + 4px); transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(270deg, rgba(255,255,255,.15), rgba(255,255,255,.75)); }
#receipt .rc-note.on::before { transform: scaleX(1); }
#receipt .rc-note::after { content: ''; position: absolute; top: calc(6px + var(--off, 0px)); width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--edge); background: var(--ink); box-shadow: 0 0 8px rgba(225,235,255,.6); opacity: 0; transition: opacity .3s .45s; }
#receipt .rc-note.l::after { left: calc(100% + var(--lg) - 4px); }
#receipt .rc-note.r::after { right: calc(100% + var(--lg) - 4px); }
#receipt .rc-note.on::after { opacity: 1; }

/* ---------- Layar lebar sedang ---------- */
@media (max-width: 1100px) {
  #receipt { --pw: 352px; --lg: 40px; }
  #receipt .rc-printer { grid-template-columns: minmax(0, 1fr) 300px minmax(0, 1fr); }
  #receipt .rc-zone { padding: 18px 18px 20px; }
  #receipt .rc-p-in { padding: 36px 28px 30px; }
  #receipt .rc-note > span { font-size: 13px; }
}
@media (max-width: 960px) and (min-width: 761px) {
  #receipt { --pw: 330px; --lg: 28px; }
  #receipt .rc-head { grid-template-columns: 1fr; }
  #receipt .rc-printer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #receipt .rc-head-c { display: none; }
  #receipt .rc-note b { white-space: normal; }
}
/* layar pendek: pelat lebih ringkas */
@media (max-height: 820px) and (min-width: 761px) {
  #receipt .rc-zone { padding-top: 14px; padding-bottom: 14px; }
  #receipt .rc-zl { margin-bottom: 8px; }
  #receipt .rc-check { margin-top: 8px; }
  #receipt .rc-vents { display: none; }
}

/* ---------- HP: tanpa sematan panjang; struk dicetak sekali, catatan jadi daftar ---------- */
@media (max-width: 760px) {
  #receipt { --pw: min(100%, 340px); padding-bottom: 72px; }
  #receipt .rc-head { grid-template-columns: 1fr; gap: 22px; }
  #receipt .rc-track { height: auto; margin-top: 40px; }
  #receipt .rc-stage { position: relative; top: 0; height: auto; padding-top: 0; }
  #receipt .rc-printer { grid-template-columns: 1fr; }
  #receipt .rc-zone { padding: 18px 18px 18px; }
  #receipt .rc-zone + .rc-zone { border-left: 0; border-top: 1px solid var(--hair); }
  #receipt .rc-head-c { flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; padding-top: 14px; padding-bottom: 14px; }
  #receipt .rc-read { flex: 1 1 100%; justify-content: flex-start; }
  #receipt .rc-vents { display: none; }
  #receipt .rc-chip { height: 32px; }
  #receipt .rc-check .btn { width: 100%; height: 38px; }
  #receipt .rc-slot { width: calc(var(--pw) + 28px); max-width: calc(100% - 8px); }
  #receipt .rc-feed { flex: none; }
  #receipt .rc-roll { position: relative; }
  #receipt .rc-p-in { padding: 34px 26px 30px; }
  #receipt .rc-paper .mk.l { left: -21px; }
  #receipt .rc-paper .mk.r { right: -21px; }
  #receipt .rc-total .v { font-size: 21px; }

  #receipt .rc-notes { position: static; height: auto; pointer-events: auto; margin-top: 28px; border-top: 1px solid var(--hair); }
  #receipt .rc-note { position: static; width: auto; grid-template-columns: auto 1fr; text-align: left; transform: translateY(8px);
    padding: 16px 0 18px; border-bottom: 1px solid var(--hair); }
  #receipt .rc-note.l { grid-template-columns: auto 1fr; text-align: left; transform: translateY(8px); }
  #receipt .rc-note.l .mk { grid-column: 1; }
  #receipt .rc-note.l b { grid-column: 2; }
  #receipt .rc-note.on { transform: none; }
  #receipt .rc-note::before, #receipt .rc-note::after { display: none; }
  #receipt .rc-note b { white-space: normal; }
  #receipt .rc-note > span { font-size: 14px; }
}

#receipt .rc-snap .rc-note, #receipt .rc-snap .rc-note::before, #receipt .rc-snap .rc-note::after { transition: none; }

@media (prefers-reduced-motion: reduce) {
  #receipt .rc-note, #receipt .rc-note::before, #receipt .rc-note::after, #receipt .rc-stamp { transition: none; }
  #receipt .rc-led { animation: none; }
}
