/* Chat titip JastipDekat. Tanpa CSS grid atau gap. Aman untuk WebView lama. */
/* Versi mode terang saja (pending, belum di-deploy). */
/* Mode gelap dihapus: tidak mengikuti prefers-color-scheme, data-theme=dark tidak mengubah warna. */
.jd-chat-root{
  color-scheme:light only;
  --jd-ink:#24332b;--jd-muted:#69776e;--jd-green:#24734f;--jd-green-dark:#18583b;
  --jd-mint:#eaf4ed;--jd-cream:#fffaf2;--jd-line:#e6e9e3;--jd-white:#fff;
  --jd-page:#f8f8f3;--jd-shadow:0 12px 32px rgba(39,65,48,.09);
  --jd-warn-bg:#fff1d9;--jd-warn:#865714;--jd-me:#24734f;
}
.jd-chat-backdrop{
  position:fixed;inset:0;z-index:80;background:rgba(24,30,26,.45);
  display:none;
}
.jd-chat-backdrop.is-on{display:block}
.jd-chat-sheet{
  position:absolute;left:0;right:0;bottom:0;top:auto;
  height:100%;max-height:100%;
  background:var(--jd-cream);color:var(--jd-ink);
  display:flex;flex-direction:column;
  font-family:ui-rounded,"Segoe UI",Arial,sans-serif;
  box-shadow:var(--jd-shadow);
}
@media (min-width:720px){
  .jd-chat-sheet{
    left:50%;right:auto;top:24px;bottom:24px;
    width:420px;height:auto;max-height:calc(100% - 48px);
    margin-left:-210px;border-radius:22px;overflow:hidden;
  }
}
.jd-chat-head{
  display:flex;align-items:center;
  padding:10px 12px;padding-top:calc(10px + env(safe-area-inset-top));
  border-bottom:1px solid var(--jd-line);background:var(--jd-cream);flex:0 0 auto;
}
.jd-chat-theme{display:none}
.jd-chat-back{
  border:0;background:transparent;color:var(--jd-green);
  min-width:44px;min-height:44px;font-size:22px;font-weight:800;cursor:pointer;
}
.jd-chat-titles{flex:1 1 auto;min-width:0;padding:0 8px}
.jd-chat-titles h2{
  margin:0;font-size:17px;letter-spacing:-.3px;line-height:1.2;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.jd-chat-titles p{margin:2px 0 0;font-size:12px;color:var(--jd-muted);font-weight:650}
.jd-chat-hint{
  margin:10px 14px 0;padding:10px 12px;border-radius:16px;
  background:var(--jd-mint);color:var(--jd-green-dark);
  font-size:13px;font-weight:650;line-height:1.35;border:1px solid var(--jd-line);
}
.jd-chat-hint a{color:var(--jd-green);font-weight:800}
.jd-chat-wait{
  display:none;margin:8px 14px 0;padding:8px 12px;border-radius:14px;
  background:var(--jd-warn-bg);color:var(--jd-warn);font-size:13px;font-weight:700;
}
.jd-chat-wait.is-on{display:block}
.jd-chat-thread{
  flex:1 1 auto;overflow:auto;padding:14px 14px 8px;background:var(--jd-page);
  -webkit-overflow-scrolling:touch;
}
.jd-chat-day{text-align:center;font-size:11px;color:var(--jd-muted);font-weight:700;margin:0 0 12px}
.jd-chat-row{display:flex;align-items:flex-end;margin:0 0 12px}
.jd-chat-row-me{justify-content:flex-end}
#jdChatThread .jd-chat-row-me > div{min-width:0;max-width:78%}
#jdChatThread .jd-chat-row-me .jd-chat-bubble{max-width:none}
.jd-chat-av{
  width:28px;height:28px;border-radius:10px;background:var(--jd-green);color:#fff;
  font-size:10px;font-weight:800;display:flex;align-items:center;justify-content:center;
  margin-right:8px;flex:0 0 auto;
}
.jd-chat-bubble{
  max-width:78%;padding:10px 12px;border-radius:16px;font-size:15px;line-height:1.4;
  word-wrap:break-word;
}
.jd-chat-row-ai .jd-chat-bubble{
  background:var(--jd-white);border:1px solid var(--jd-line);border-bottom-left-radius:6px;
}
.jd-chat-row-me .jd-chat-bubble{
  background:var(--jd-me);color:#fff;border-bottom-right-radius:6px;
}
.jd-chat-who{font-size:11px;font-weight:800;color:var(--jd-green-dark);margin:0 0 4px}
.jd-chat-time{font-size:10px;color:var(--jd-muted);font-weight:700;margin:4px 36px 0}
.jd-chat-row-me .jd-chat-time{text-align:right;margin:4px 4px 0}
.jd-chat-form{
  display:flex;align-items:center;flex:0 0 auto;
  padding:8px 10px calc(10px + env(safe-area-inset-bottom));
  border-top:1px solid var(--jd-line);background:var(--jd-cream);
}
.jd-chat-input{
  flex:1 1 auto;min-height:48px;border:1.5px solid #cbded0;border-radius:16px;
  padding:10px 12px;background:var(--jd-white);color:var(--jd-ink);margin-right:8px;
}
.jd-chat-send{
  flex:0 0 auto;min-width:72px;min-height:48px;border:0;border-radius:14px;
  background:var(--jd-green);color:#fff;font-weight:800;cursor:pointer;
}
.jd-chat-send:disabled{opacity:.55;cursor:not-allowed}
.jd-chat-err{margin:0 14px 8px;color:#a33b35;font-size:13px;font-weight:700;display:none}
.jd-chat-err.is-on{display:block}
.jd-og-fromchat{display:inline-block;margin:0 0 6px;padding:3px 8px;border-radius:999px;
  background:var(--mint, #eaf4ed);color:var(--green-dark, #18583b);font-size:11px;font-weight:800}
.jd-og-priv{display:block;margin:4px 0 0;font-size:13px;color:var(--ink,#24332b);font-weight:650}

.jd-chat-bubble a.jd-chat-card-link{
  color:var(--jd-green);font-weight:700;text-decoration:underline;
  text-underline-offset:2px;word-break:break-all;
}
.jd-chat-bubble a.jd-chat-card-link:focus-visible{outline:3px solid #8cc7a3;outline-offset:2px}

/* Tombol aksi di kartu: tanpa CSS gap, aman Android 7-8, mode terang saja. */
.jd-card-acts{
  display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;
  max-width:100%;
}
.jd-card-acts .btn{
  margin:0 0 6px 6px;
  vertical-align:middle;
  min-height:42px;
  padding:8px 11px;
  font-size:13px;
  font-weight:800;
  line-height:1.2;
  white-space:nowrap;
}
.jd-card-acts .btn:first-child{margin-left:0}
.jd-btn-chat-titip{
  border-radius:12px;
}
/* Baris tombol lebar penuh di bawah ongkos, supaya Chat titip duduk di samping Mau nitip. */
.card-foot .jd-card-acts{
  flex:1 1 100%;
  margin-top:6px;
  justify-content:flex-end;
}

.jd-chat-badge-ambil{
  display:inline-block;
  margin-left:4px;
  padding:1px 7px;
  border-radius:999px;
  background:#24734f;
  color:#fff;
  font-size:10px;
  font-weight:800;
  letter-spacing:.01em;
  vertical-align:middle;
}
.jd-chat-hint .jd-chat-badge-ambil{ margin:0 4px 0 0; }
.jd-chat-taken{
  margin:0 0 10px;
  padding:8px 12px;
  border-radius:12px;
  background:#eaf4ed;
  border:1px solid #dce8df;
  color:#18583b;
  font-size:12px;
  font-weight:700;
  text-align:center;
}
.jd-chat-sys{
  margin:6px 18px 10px;
  padding:8px 12px;
  border-radius:12px;
  background:#f3f7ee;
  color:#4d5c52;
  font-size:12px;
  text-align:center;
  line-height:1.45;
}
.jd-chat-row-jp .jd-chat-bubble{
  background:#e7f6ee;
  border:1px solid #cfe8d8;
}
.jd-chat-row-jp .jd-chat-av{
  background:#24734f;
  color:#fff;
}

@media(max-width:540px){
  .card-foot{flex-wrap:wrap}
}
