/* Dilot chat widget — vanilla CSS, namespaced .dilot-* */

/* mobile: lock the page behind the full-screen panel */
html.dilot-noscroll, html.dilot-noscroll body { overflow: hidden !important; }

.dilot-root {
    --dilot-accent: #0066cc;
    --dilot-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --dilot-text: #1a1a1a;
    --dilot-muted: #667085;
    --dilot-visitor: #eef3fb;
    font-family: var(--dilot-font);
    font-size: var(--dilot-fs, 14px);
    line-height: 1.45;
}

.dilot-bubble {
    position: fixed; bottom: 20px; width: 60px; height: 60px; border-radius: 50%;
    background: var(--dilot-accent); color: #fff; border: none; cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
    display: flex; align-items: center; justify-content: center; z-index: 2147483000;
    transition: transform .15s ease;
}
.dilot-bubble:hover { transform: scale(1.06); }
.dilot-bubble svg { width: 34px; height: 34px; margin-top: -2px; margin-right: -2px; }
/* Green dot on the launcher while the teaser is showing. The bubble is position:fixed, so it is already the
   containing block for this. Animated both ways: the state class is removed before the teaser is torn down. */
.dilot-bubble:after {
    content: "";
    background: #3ec812;
    width: 15px; height: 15px;
    position: absolute;
    border-radius: 90px;
    top: 0px; right: 0px;
    opacity: 0; transform: scale(.4);
    transition: opacity .3s ease, transform .3s cubic-bezier(.2,.9,.3,1.3);
    pointer-events: none;
}
.dilot-bubble.dilot-has-teaser:after { opacity: 1; transform: scale(1); }
.dilot-pos-right { right: 20px; }
.dilot-pos-left { left: 20px; }
/* hide the open-bubble while the panel is open */
.dilot-is-open .dilot-bubble { display: none; }

.dilot-panel {
    position: fixed; bottom: 20px; width: 420px; max-width: calc(100vw - 32px);
    height: 680px; max-height: calc(100dvh - 40px);
    background: #fff; border-radius: 20px; box-shadow: 0 18px 58px rgba(0,0,0,.24);
    display: none; flex-direction: column; overflow: hidden; z-index: 2147483000;
    transition: width .25s ease, height .25s ease;
}
.dilot-panel.dilot-grown { width: 660px; height: 780px; }
.dilot-panel.dilot-open { display: flex; animation: dilotPanelIn .2s ease; }
.dilot-panel.dilot-pos-right { transform-origin: bottom right; }
.dilot-panel.dilot-pos-left { transform-origin: bottom left; }
@keyframes dilotPanelIn { from { opacity: 0; transform: scale(.9) translateY(8px); } to { opacity: 1; transform: none; } }

.dilot-header {
    background: var(--dilot-accent); color: #fff; padding: 16px 10px 16px 16px;
    display: flex; align-items: center; justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0px 0px 18px hsl(0deg 0% 12.16% / 23%);
}
/* Darker accent block curving into the top-right corner, sitting behind the close button. */
.dilot-header:after {
    content: "";
    background-color: color-mix(in srgb, var(--dilot-accent) 80%, #000);
    width: 120px; height: 120px;
    border-radius: 999px;
    position: absolute; right: -60px; z-index: 0;
    pointer-events: none;
    transition: background-color .15s ease;
}
/* Hovering the close button deepens the corner shade. */
.dilot-header:has(.dilot-close:hover):after { background-color: color-mix(in srgb, var(--dilot-accent) 74%, #000); }
.dilot-headinfo { display: flex; align-items: center; gap: 10px; min-width: 0; }
/* Header controls must sit above the corner shape. */
.dilot-actions { position: relative; z-index: 1; }
.dilot-avatar {
    width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.25);
    display: flex; align-items: center; justify-content: center; font-weight: 700;
    overflow: hidden; flex: 0 0 auto;
}
.dilot-avatar.dilot-avatar-has-img { background: transparent; }
.dilot-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dilot-botname { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dilot-headtext { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.dilot-botsub {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: #fff; opacity: .7; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dilot-botsub-dot {
    width: 7px; height: 7px; border-radius: 50%; background: #2ed15f; flex: 0 0 auto;
}
.dilot-actions { display: flex; align-items: center; gap: 24px; }
.dilot-iconbtn {
    background: transparent; border: none; color: #fff; cursor: pointer; padding: 0;
    width: 36px; height: 36px; border-radius: 9px; line-height: 0;
    display: flex; align-items: center; justify-content: center; transition: background .15s ease;
}
.dilot-iconbtn:hover { background: rgba(255,255,255,.18); }
.dilot-iconbtn svg { width: 23px; height: 23px; display: block; }
/* Close sits on the darker corner shape, so it stays transparent and just grows a little on hover. */
.dilot-close { background: transparent; transition: transform .15s ease; }
.dilot-close:hover { background: transparent; transform: scale(1.12); }
.dilot-close:active { transform: scale(.96); }
@media (prefers-reduced-motion: reduce) { .dilot-close { transition: none; } .dilot-close:hover { transform: none; } }
.dilot-menuwrap { position: relative; display: flex; }
.dilot-menupop {
    position: absolute; top: 70px; right: 10px; min-width: 186px; padding: 6px;
    background: #fff; color: var(--dilot-text); border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.18); z-index: 6;
    opacity: 0; visibility: hidden; transform: scale(.9) translateY(-6px); transform-origin: top right;
    transition: opacity .14s ease, transform .14s cubic-bezier(.2,.9,.3,1.1), visibility .14s;
}
.dilot-panel.dilot-menuopen .dilot-menupop { opacity: 1; visibility: visible; transform: scale(1) translateY(0); }
@media (prefers-reduced-motion: reduce) { .dilot-menupop { transition: none; } }
.dilot-menuitem {
    display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
    background: transparent; border: none;
    font: inherit; font-size: calc(1em - 1px); color: var(--dilot-text); padding: 8px 10px;
    border-radius: 7px; cursor: pointer;
}
.dilot-menuitem svg { width: 16px; height: 16px; flex: 0 0 auto; opacity: .7; }
.dilot-menuitem:hover { background: #f0f0f0; }

.dilot-messages { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #fff; scrollbar-width: thin; scrollbar-color: #dcdfe4 transparent; }
.dilot-messages::-webkit-scrollbar { width: 6px; }
.dilot-messages::-webkit-scrollbar-thumb { background: #dcdfe4; border-radius: 3px; }
.dilot-messages::-webkit-scrollbar-track { background: transparent; }

.dilot-msg { max-width: 82%; padding: 11px 16px; border-radius: 12px; word-wrap: break-word; }
.dilot-msg-assistant { align-self: flex-start; background: #f3f4f4; border: none; color: var(--dilot-text); box-shadow: none; }
.dilot-msg-visitor { align-self: flex-end; background: var(--dilot-accent); color: #fff; }
.dilot-msg-visitor a { color: #fff; text-decoration: underline; }
.dilot-root .dilot-msg strong, .dilot-root .dilot-msg b { font-weight: 700; }
@keyframes dilotMsgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dilot-msg.dilot-in { animation: dilotMsgIn .22s ease; }
.dilot-msg p { margin: 0 0 8px; }
.dilot-msg p:last-child { margin-bottom: 0; }
.dilot-msg a { color: var(--dilot-accent); }

.dilot-contact-btn {
    display: inline-block; margin-top: 8px; padding: 8px 14px; background: var(--dilot-accent);
    color: #fff !important; text-decoration: none; border-radius: 8px; font-weight: 600; font-size: inherit;
}

/* inline product card (ecommerce) */
.dilot-product-card {
    display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 6px;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; text-decoration: none;
    color: var(--dilot-text) !important;
    box-shadow: 0 2px 12px hsl(0deg 0% 13.82% / 14%);
    transition: box-shadow .15s ease, transform .15s ease;
}
.dilot-product-card:hover { box-shadow: 0 2px 12px hsl(0deg 0% 13.82% / 19%); transform: scale(1.015); }
@media (prefers-reduced-motion: reduce) { .dilot-product-card { transition: none; } .dilot-product-card:hover { transform: none; } }
.dilot-pc-img {
    flex: 0 0 auto; width: 44px; height: 44px; object-fit: cover; border-radius: 8px; background: #f3f4f4;
}
.dilot-pc-title { font-weight: 700; font-size: .95em; line-height: 1.3; }
.dilot-contact-actions { display: flex; gap: 8px; margin-top: 8px; }
.dilot-ca-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--dilot-accent); color: #fff; text-decoration: none;
    transition: opacity .15s;
}
.dilot-ca-btn:hover { opacity: .88; }
.dilot-msg a.dilot-ca-btn { color: #fff; }
.dilot-ca-btn svg { stroke: #fff; }
.dilot-ca-mail svg { width: 24px; height: 24px; }
.dilot-ca-tel svg { width: 22px; height: 22px; }

/* typing dots */
.dilot-typing { align-self: flex-start; display: flex; gap: 4px; padding: 10px 12px; }
.dilot-typing span {
    width: 7px; height: 7px; border-radius: 50%; background: var(--dilot-muted);
    animation: dilot-wave 1.2s infinite ease-in-out;
}
.dilot-typing span:nth-child(2) { animation-delay: .15s; }
.dilot-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dilot-wave { 0%,60%,100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }

.dilot-fs2 { font-size: 1.15em; }
.dilot-fs3 { font-size: 1.45em; }
.dilot-inputrow { padding: 0 12px 12px; background: transparent; }
.dilot-inputbar {
    display: flex; align-items: stretch; gap: 6px; padding: 6px 6px 6px 14px;
    background: #fff; border: 1px solid #e6e8eb; border-radius: 16px;
    box-shadow: 0 0 12px hsl(0deg 0% 13.82% / 14%);
}
.dilot-inputbar:focus-within { border-color: var(--dilot-accent); }
.dilot-inputrow textarea {
    flex: 1; resize: none; box-sizing: border-box; border: none; border-radius: 0;
    padding: 8px 0; font: inherit; line-height: 1.4; min-height: calc(1.4em + 16px); max-height: 140px;
    overflow-y: hidden; background: transparent; outline: none;
}
.dilot-inputrow textarea::placeholder { color: #8b93a1; }
.dilot-send {
    flex: 0 0 auto; align-self: stretch; width: 48px; min-height: 40px; background: var(--dilot-accent); color: #fff;
    border: none; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.dilot-send svg { width: 20px; height: 20px; display: block; }
.dilot-send:disabled { opacity: .5; cursor: default; }
/* "Maak groter" is desktop-only. */
@media (max-width: 640px) { .dilot-grow-item { display: none; } }
/* keep OUR focus style even when a site builder forces :focus-visible { outline: auto } */
.dilot-root textarea:focus, .dilot-root textarea:focus-visible,
.dilot-root input:focus, .dilot-root input:focus-visible {
    outline: none !important; border-color: var(--dilot-accent) !important;
}

/* ── Pre-chat identification form (redesigned) ───────────────────────────────
   A soft "hero" header tinted with the site accent, staggered field entrance,
   floating-ish labels, focus lift, and a shake on invalid input. */
.dilot-idform {
    display: flex; flex-direction: column; overflow: hidden;
    flex: 1 1 auto; min-height: 0;
}
.dilot-idform-in  { animation: dilotIdIn .26s cubic-bezier(.2,.7,.3,1); }
.dilot-idform-out { animation: dilotIdOut .17s ease forwards; }
@keyframes dilotIdIn  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes dilotIdOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-8px); } }

.dilot-idform-head {
    padding: 22px 20px 18px; text-align: center; position: relative;
    background:
        radial-gradient(120% 90% at 50% -20%, color-mix(in srgb, var(--dilot-accent) 16%, transparent), transparent 70%);
    border-bottom: 1px solid #eef0f3;
}
.dilot-idform-avatar {
    display: inline-flex; width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
    margin-bottom: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.12);
    animation: dilotIdPop .4s cubic-bezier(.2,.8,.2,1.2) both;
}
.dilot-idform-avatar img { width: 100%; height: 100%; object-fit: cover; }
@keyframes dilotIdPop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.dilot-idform-title { font-weight: 700; font-size: 1.08em; color: var(--dilot-text, #1b1f24); }
.dilot-idform-sub   { margin-top: 3px; font-size: .9em; color: var(--dilot-muted, #6b7280); }

.dilot-idform-body {
    padding: 16px 18px 4px; display: flex; flex-direction: column; gap: 13px;
    overflow-y: auto;
}
.dilot-idfield {
    display: flex; flex-direction: column; gap: 5px;
    opacity: 0; transform: translateY(8px);
    animation: dilotIdField .34s ease forwards;
    animation-delay: calc(.06s * var(--i, 0) + .05s);
}
@keyframes dilotIdField { to { opacity: 1; transform: none; } }
.dilot-idfield-label { font-size: 14px; font-weight: 600; color: var(--dilot-muted, #6b7280); padding-left: 2px; }
.dilot-idreq { color: var(--dilot-accent); font-style: normal; margin-left: 3px; }
.dilot-idform input {
    border: 1.5px solid #e1e4e9; border-radius: 10px; padding: 11px 12px; font: inherit; outline: none;
    color: var(--dilot-text, #1a1a1a); -webkit-text-fill-color: var(--dilot-text, #1a1a1a); /* theme-proof: visitor input stays dark */
    background: #f7f8f9; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.dilot-idform input::placeholder { color: #aeb4bd; }
.dilot-idform input:focus {
    border-color: var(--dilot-accent); background: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--dilot-accent) 18%, transparent);
}
.dilot-idform input.dilot-idbad {
    border-color: #e5484d;
    box-shadow: 0 0 0 3px color-mix(in srgb, #e5484d 16%, transparent);
}
.dilot-idform-go {
    margin: 12px 18px 18px; background: var(--dilot-accent); color: #fff; border: none; border-radius: 10px;
    padding: 12px; cursor: pointer; font-weight: 600; font-size: 1em;
    display: flex; align-items: center; justify-content: center; text-align: center; /* theme-proof centering */
    transition: transform .12s ease, filter .16s ease; box-shadow: 0 4px 12px color-mix(in srgb, var(--dilot-accent) 32%, transparent);
}
/* While the pre-chat form gates the panel, shrink the panel to the form's height (desktop only) so there's no
   empty space under the button. Mobile stays full-screen (its own rule below). Capped so many fields still scroll. */
@media (min-width: 481px) {
    .dilot-panel.dilot-idgate { height: auto; max-height: calc(100dvh - 40px); }
}
.dilot-idform-go:hover   { filter: brightness(1.06); }
.dilot-idform-go:active  { transform: translateY(1px) scale(.99); }
.dilot-shake { animation: dilotShake .34s cubic-bezier(.36,.07,.19,.97); }
@keyframes dilotShake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-5px); }
    40%, 60% { transform: translateX(5px); }
}
/* Respect reduced-motion: keep it usable, drop the movement. */
@media (prefers-reduced-motion: reduce) {
    .dilot-idform-in, .dilot-idform-out, .dilot-idform-avatar, .dilot-idfield, .dilot-shake { animation: none; }
    .dilot-idfield { opacity: 1; transform: none; }
}

/* mobile: full-screen panel, above everything */
@media (max-width: 480px) {
    .dilot-root { font-size: var(--dilot-fs-mobile, var(--dilot-fs, 14px)); }
    /* iOS Safari zooms the page in when a focused field's font-size is < 16px.
       Force 16px on every text-entry field on mobile so tapping the chat input
       (or a form field) never triggers that zoom. Desktop is unaffected. */
    .dilot-inputrow textarea,
    .dilot-idform input,
    .dilot-escfield input,
    .dilot-escfield textarea { font-size: 16px; }
    .dilot-iconbtn { width: 40px; height: 40px; }
    .dilot-iconbtn svg { width: 23px; height: 23px; }
    .dilot-panel.dilot-open {
        bottom: 0; right: 0; left: 0; top: 0;
        width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0;
        animation: dilotPanelInMobile .2s ease;
    }
    .dilot-panel.dilot-closing { animation: dilotPanelOutMobile .2s ease forwards; }
    .dilot-inputrow { padding-bottom: 16px; }
}
@keyframes dilotPanelInMobile { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
@keyframes dilotPanelOutMobile { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(.99); } }

/* suggested-question chips (under first bot message) */
.dilot-chips { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; margin-top: 2px; }
.dilot-chip {
    font: inherit; font-size: calc(1em - 1px); background: #ffffff; color: #292929;
    border: 1px solid #dcdcdc; border-radius: 16px; box-shadow: 0 2px 10px rgba(30,30,30,.09);
    padding: 7px 14px; cursor: pointer; transition: border-color .15s ease;
}
.dilot-chip:hover { border-color: var(--dilot-accent); }

/* teaser bubble above the chat bubble */
@keyframes dilot-teaser-in {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
.dilot-teaser {
    position: fixed; bottom: 92px; max-width: fit-content; background: #fff; color: var(--dilot-text);
    border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.18); padding: 10px 38px 10px 18px;
    cursor: pointer; z-index: 2147482999; font-size: 15px;
    animation: dilot-teaser-in .6s cubic-bezier(.2,.8,.3,1) both;
}
/* Dismissed: fade back down, then the node is removed once the transition has run. */
.dilot-teaser.dilot-teaser-out {
    animation: none;
    opacity: 0; transform: translateY(10px);
    transition: opacity .28s ease, transform .28s ease;
}
.dilot-is-open .dilot-teaser { display: none; }
@media (prefers-reduced-motion: reduce) {
    .dilot-teaser { animation: none; }
    .dilot-teaser.dilot-teaser-out { transition: opacity .28s ease; transform: none; }
    .dilot-bubble:after { transition: opacity .28s ease; transform: scale(1); }
}
.dilot-teaser-x { position: absolute; top: 7px; right: 9px; background: transparent; border: none; cursor: pointer; color: var(--dilot-muted); line-height: 1; padding: 2px; display: inline-flex; align-items: center; justify-content: center; }
.dilot-teaser-x svg { width: 16px; height: 16px; }
.dilot-panel { position: fixed; } /* ensure popup's absolute parent */


/* chat escalation — offer button + inline mini-form */
.dilot-esc-offer { margin-top: 8px; font-size: 13.5px; color: var(--dilot-muted); }

/* WhatsApp contact action — server-decided; brand green, icon + label */
.dilot-wa-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px;
    padding: 9px 14px; width: 100%; box-sizing: border-box; background: #25d366; color: #fff !important;
    border: 0; border-radius: 8px; font-weight: 600; font-size: inherit; text-decoration: none !important;
    cursor: pointer; transition: background 150ms ease;
}
.dilot-wa-btn:hover { background: #1eb757; }
.dilot-wa-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }

.dilot-esc-btn {
    display: inline-block; margin-top: 8px; padding: 8px 14px; background: #fff; width: 100%;
    text-align: center; transition: all 150ms ease;
    color: var(--dilot-accent); border: 1px solid var(--dilot-accent); border-radius: 8px; font-weight: 600; font-size: inherit; cursor: pointer;
}
.dilot-esc-btn:hover {
   background: #ebebeb; transition: all 150ms ease;
}
.dilot-esc-btn:disabled { opacity: .5; cursor: default; }
.dilot-escform {
    align-self: stretch; background: #f4f4f5; border: 1px solid #dfdfdf; border-radius: 12px;
    padding: 12px; display: flex; flex-direction: column; gap: 8px;
}
.dilot-escfield { display: flex; flex-direction: column; gap: 1px; }
.dilot-escfield label { font-size: 13px; margin-bottom: 3px; color: #252525; font-weight: 600; }
.dilot-escfield input, .dilot-escfield textarea {
    border: 1px solid #d7dbe0; border-radius: 8px; padding: 7px 9px; font: inherit; font-size: 13px; outline: none; resize: vertical;
}
.dilot-escfield input:focus, .dilot-escfield textarea:focus { border-color: var(--dilot-accent); }
.dilot-esc-skip {
    align-self: flex-start; background: transparent; border: none; color: var(--dilot-accent);
    font: inherit; font-size: 12px; cursor: pointer; padding: 2px 0; text-decoration: underline;
}
.dilot-esc-submit { background: var(--dilot-accent); color: #fff; border: none; border-radius: 8px; padding: 9px; cursor: pointer; font-weight: 600; text-align: center; width: 100%; }
.dilot-esc-submit:disabled { opacity: .5; cursor: default; }
.dilot-esc-err { color: #dc2626; font-size: 12.5px; }
.dilot-esc-intro { margin-top: 8px; font-size: 13.5px; line-height: 1.45; color: var(--dilot-text); }
/* Form rendered INSIDE the assistant bubble: blend into the message, not a separate card. */
.dilot-msg-assistant .dilot-escform {
    background: transparent; border: none; border-top: 1px solid #e3e3e3;
    border-radius: 0; padding: 10px 0 0; margin-top: 8px;
}

/* submit spinner */
.dilot-spin { display:inline-block; width:15px; height:15px; border:2px solid rgba(255,255,255,.45); border-top-color:#fff; border-radius:50%; animation: dilot-spin .6s linear infinite; }
@keyframes dilot-spin { to { transform: rotate(360deg); } }

/* invalid required field highlight */
.dilot-escfield input.dilot-bad{border-color:#dc2626}
.dilot-escfield input.dilot-bad:focus{border-color:#dc2626}
/* Escalation form loading placeholders (shimmer) — shown while the form fetches, sized like real inputs
   so the form doesn't jump in. */
.dilot-esc-shimmer { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.dilot-shimmer-field {
    height: 38px;
    border-radius: 8px;
    background: linear-gradient(90deg, #eceef1 25%, #f5f6f8 37%, #eceef1 63%);
    background-size: 400% 100%;
    animation: dilot-shimmer 1.4s ease infinite;
}
.dilot-shimmer-field:nth-child(2) { width: 92%; }
.dilot-shimmer-field:nth-child(3) { width: 78%; }
@keyframes dilot-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
    .dilot-shimmer-field { animation: none; }
}
/* Inline video (Phase 1a): application-owned click-to-load facade + responsive 16:9 player. */
.dilot-video { margin-top: 10px; border-radius: 12px; overflow: hidden; }
.dilot-video-facade {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; width: 100%; aspect-ratio: 16 / 9; border: 0; cursor: pointer; color: #fff;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    font: inherit; padding: 12px; text-align: center;
}
.dilot-video-facade:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.dilot-video-play {
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; border-radius: 50%; background: rgba(0,0,0,0.55);
}
.dilot-video-play svg { width: 26px; height: 26px; }
.dilot-video-title { font-size: 13px; font-weight: 600; line-height: 1.3; max-width: 90%; }
.dilot-video-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
.dilot-video-fallback { display: inline-block; margin-top: 8px; font-weight: 600; text-decoration: underline; }
/* Real captured thumbnail as the facade poster (fixes the blank facade); play badge sits on top. */
.dilot-video-facade.has-poster { background-size: cover; background-position: center; }
.dilot-video-facade.has-poster::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.28); }
.dilot-video-facade.has-poster .dilot-video-play,
.dilot-video-facade.has-poster .dilot-video-title { position: relative; z-index: 1; }
/* Dilot-native player (Batch 2): chromeless provider iframe + our own controls. */
.dilot-player { position: relative; width: 100%; background: #000; overflow: hidden; }
.dilot-pc-tap { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.dilot-pc-top {
    position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center;
    justify-content: flex-end; gap: 4px; padding: 6px 8px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0));
    transition: opacity 0.2s ease;
}
.dilot-pc {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0));
    transition: opacity 0.2s ease;
}
.dilot-player.dilot-hide-ui .dilot-pc-top,
.dilot-player.dilot-hide-ui .dilot-pc { opacity: 0; pointer-events: none; }
.dilot-pc-btn {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; cursor: pointer;
    background: transparent; color: #fff;
}
.dilot-pc-btn:hover { background: rgba(255,255,255,0.16); }
.dilot-pc-btn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.dilot-pc-btn svg { width: 18px; height: 18px; }
.dilot-pc-seek { flex: 1 1 auto; min-width: 40px; height: 4px; accent-color: #fff; cursor: pointer; }
.dilot-pc-time { flex: 0 0 auto; font-size: 11px; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dilot-player:fullscreen { display: flex; align-items: center; justify-content: center; }
.dilot-player:fullscreen .dilot-video-frame { height: 100%; aspect-ratio: auto; }