/* Yayan Digital — chatbot widget */
.ydc { --ydc-brand: var(--primary, #8a1538); --ydc-bg: var(--surface, #fff); --ydc-ink: var(--text, #1c1917); --ydc-muted: var(--muted, #78716c); --ydc-line: var(--line, #e7e5e4); --ydc-soft: var(--surface-2, #f5f5f4); }
.ydc-fab { position: fixed; right: 18px; bottom: 18px; z-index: 900; width: 58px; height: 58px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff;
  background: var(--ydc-brand); box-shadow: 0 10px 30px rgba(0, 0, 0, .22); cursor: pointer; transition: transform .2s; }
.ydc-fab:hover { transform: scale(1.06); }
.ydc-fab.is-open { transform: scale(.9); }
body:has(.ydc-fab) .to-top { bottom: 88px; }
.to-top { transition: bottom .2s; }
.ydc-panel { position: fixed; right: 18px; bottom: 88px; z-index: 901; width: min(400px, calc(100vw - 24px)); height: min(640px, calc(100vh - 110px)); display: flex; flex-direction: column;
  background: var(--ydc-bg); color: var(--ydc-ink); border: 1px solid var(--ydc-line); border-radius: 20px; box-shadow: 0 24px 70px rgba(0, 0, 0, .25); overflow: hidden; animation: ydcIn .22s ease; }
@keyframes ydcIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.ydc-panel[hidden] { display: none; }
.ydc-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--ydc-brand); color: #fff; }
.ydc-head > div { flex: 1; min-width: 0; line-height: 1.25; }
.ydc-head b { display: block; font-size: .98rem; }
.ydc-head small { opacity: .85; font-size: .78rem; }
.ydc-av { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: grid; place-items: center; flex: none; }
.ydc-av svg { width: 20px; height: 20px; }
.ydc-ib { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; flex: none; }
.ydc-head .ydc-ib:hover { background: rgba(255, 255, 255, .16); }
.ydc-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--ydc-soft); overscroll-behavior: contain; }
.ydc-msg { max-width: 86%; padding: 9px 12px; border-radius: 16px; font-size: .92rem; line-height: 1.5; overflow-wrap: anywhere; }
.ydc-msg p { margin: 0 0 6px; } .ydc-msg p:last-child { margin: 0; }
.ydc-msg ul { margin: 4px 0 6px; padding-left: 18px; } .ydc-msg li { margin: 2px 0; }
.ydc-msg a { color: inherit; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.ydc-a { align-self: flex-start; background: var(--ydc-bg); border: 1px solid var(--ydc-line); border-bottom-left-radius: 6px; }
.ydc-u { align-self: flex-end; background: var(--ydc-brand); color: #fff; border-bottom-right-radius: 6px; }
.ydc-photo { display: block; max-width: 200px; max-height: 200px; border-radius: 10px; margin-bottom: 6px; }
.ydc-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.ydc-card { display: flex; gap: 10px; align-items: stretch; padding: 8px; border: 1px solid var(--ydc-line); border-radius: 14px; background: var(--ydc-soft); }
.ydc-cimg { position: relative; flex: none; width: 68px; height: 68px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--ydc-bg); }
.ydc-cimg img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.ydc-cimg:hover img { transform: scale(1.05); }
.ydc-n { position: absolute; right: 4px; bottom: 4px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .68rem; border-radius: 6px; padding: 1px 5px; }
.ydc-cbody { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ydc-cbody b { font-size: .84rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ydc-price em { font-style: normal; font-weight: 700; color: var(--ydc-brand); font-size: .86rem; }
.ydc-price s, .ydc-vfoot s { color: var(--ydc-muted); font-size: .74rem; }
.ydc-cbody small { color: var(--ydc-muted); font-size: .72rem; }
.ydc-cbtns { display: flex; gap: 5px; margin-top: auto; padding-top: 4px; flex-wrap: wrap; }
.ydc-b1, .ydc-b2, .ydc-btns a { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 3px 10px; border-radius: 999px; font: inherit; font-size: .74rem; font-weight: 700; text-decoration: none !important; cursor: pointer; white-space: nowrap; }
.ydc-b1 { background: var(--ydc-brand); color: #fff !important; border: 0; }
.ydc-b2 { background: var(--ydc-bg); color: var(--ydc-ink); border: 1px solid var(--ydc-line); }
.ydc-b2:hover { border-color: var(--ydc-brand); color: var(--ydc-brand); }
.ydc-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ydc-btns a { background: var(--ydc-bg); color: var(--ydc-brand) !important; border: 1.5px solid var(--ydc-brand); }
.ydc-btns a:hover { background: var(--ydc-brand); color: #fff !important; }
.ydc-gal { display: flex; gap: 6px; overflow-x: auto; margin-top: 10px; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.ydc-gal button { flex: none; width: 150px; height: 150px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; scroll-snap-align: start; background: var(--ydc-soft); }
.ydc-gal img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ydc-viewer { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; background: var(--ydc-bg); animation: ydcIn .18s ease; }
.ydc-vtop { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 8px 10px 14px; border-bottom: 1px solid var(--ydc-line); }
.ydc-vtop b { flex: 1; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ydc-vtop .ydc-ib { color: var(--ydc-ink); }
.ydc-vimg { position: relative; flex: 1 1 0; min-height: 0; overflow: hidden; background: var(--ydc-soft); }
.ydc-vimg img { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.ydc-vnav { position: absolute; top: 50%; left: 8px; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .45); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.ydc-vnx { left: auto; right: 8px; }
.ydc-vcount { position: absolute; bottom: 8px; right: 10px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .72rem; border-radius: 8px; padding: 2px 7px; }
.ydc-vthumbs { flex: none; display: flex; gap: 6px; overflow-x: auto; padding: 8px 10px; border-top: 1px solid var(--ydc-line); }
.ydc-vthumbs button { flex: none; width: 52px; height: 52px; padding: 0; border: 2px solid transparent; border-radius: 9px; overflow: hidden; cursor: pointer; background: none; }
.ydc-vthumbs button.is-on { border-color: var(--ydc-brand); }
.ydc-vthumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ydc-vfoot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--ydc-line); }
.ydc-vfoot em { font-style: normal; font-weight: 800; color: var(--ydc-brand); }
.ydc-typing { display: flex; align-items: center; gap: 4px; }
.ydc-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--ydc-muted); animation: ydcDot 1.1s infinite ease-in-out; }
.ydc-typing span:nth-child(2) { animation-delay: .15s; } .ydc-typing span:nth-child(3) { animation-delay: .3s; }
.ydc-typing small { margin-left: 6px; color: var(--ydc-muted); font-size: .78rem; }
@keyframes ydcDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ydc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; background: var(--ydc-soft); }
.ydc-chips[hidden] { display: none; }
.ydc-chips button { border: 1px solid var(--ydc-line); background: var(--ydc-bg); color: var(--ydc-ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .82rem; cursor: pointer; }
.ydc-chips button:hover { border-color: var(--ydc-brand); color: var(--ydc-brand); }
.ydc-prev { display: flex; align-items: center; gap: 8px; padding: 8px 12px 0; background: var(--ydc-bg); }
.ydc-prev[hidden] { display: none; }
.ydc-prev img { width: 54px; height: 54px; object-fit: cover; border-radius: 10px; }
.ydc-prev button { border: 0; background: var(--ydc-soft); border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; cursor: pointer; color: var(--ydc-ink); }
.ydc-in { display: flex; align-items: flex-end; gap: 6px; padding: 10px; border-top: 1px solid var(--ydc-line); background: var(--ydc-bg); }
.ydc-in .ydc-ib { color: var(--ydc-muted); }
.ydc-in .ydc-ib:hover { background: var(--ydc-soft); color: var(--ydc-ink); }
.ydc-in textarea { flex: 1; resize: none; border: 1px solid var(--ydc-line); border-radius: 14px; padding: 9px 12px; font: inherit; font-size: .93rem; line-height: 1.4; max-height: 120px; background: var(--ydc-bg); color: var(--ydc-ink); outline: none; }
.ydc-in textarea:focus { border-color: var(--ydc-brand); }
.ydc-send { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--ydc-brand); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
@media (min-width: 900px) { .ydc-panel.is-wide { width: min(640px, calc(100vw - 40px)); height: min(780px, calc(100vh - 110px)); } }
.ydc-panel { transition: width .2s, height .2s; }
@media (max-width: 560px) {
  .ydc-panel { right: 0; left: 0; bottom: 0; width: 100%; height: calc(100dvh - 56px); border-radius: 18px 18px 0 0; }
  .ydc-fab { right: 14px; bottom: 14px; width: 54px; height: 54px; }
  html.ydc-on .ydc-fab { display: none; }
}
@media print { .ydc { display: none !important; } }
