/* ChatDock front-end */
.cdk-w, .cdk-w *, .cdk-lb, .cdk-lb * { box-sizing: border-box; }
.cdk-w { position: fixed; z-index: 99990; display: none; flex-direction: column; align-items: flex-end; gap: 10px; line-height: 1.4; font-size: 14px; color: #222; max-width: calc(100vw - 16px); }
.cdk-w.cdk-show { display: flex; }
.cdk-w.cdk-pos-left, .cdk-w.cdk-pos-custom { align-items: flex-start; }
.cdk-w button, .cdk-w a { font-family: inherit; }
.cdk-w svg { display: block; width: 100%; height: 100%; }

/* main row + button */
.cdk-mrow { display: flex; align-items: center; gap: 10px; }
.cdk-main { position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: calc(var(--cdk-size) - 6px);
    height: calc(var(--cdk-size) - 6px);
    min-width: calc(var(--cdk-size) - 6px);
    padding: 0 !important;
    margin: 0;
    border: var(--cdk-bw) solid var(--cdk-bc) !important;
    border-radius: var(--cdk-radius) !important;
    background: var(--cdk-color) !important;
    color: var(--cdk-icon) !important;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .22) !important;
    transition: transform .15s ease, box-shadow .15s ease !important;
    overflow: hidden !important;
    text-decoration: none !important; min-height: auto !important;}
.cdk-main:hover { transform: scale(1.05); box-shadow: 0 6px 18px rgba(0,0,0,.28); }
.cdk-main:focus-visible, .cdk-ch:focus-visible, .cdk-x:focus-visible { outline: 3px solid rgba(0,120,255,.6); outline-offset: 2px; }
.cdk-main-ic, .cdk-main-cl { display: block; width: 60%; height: 60%; }
.cdk-main-ic.cdk-ic-img { width: 62%; height: 62%; }
.cdk-main-ic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cdk-main-cl { display: none; }
.cdk-open .cdk-main-ic { display: none; }
.cdk-open .cdk-main-cl { display: block; }
.cdk-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff; }
.cdk-pos-left .cdk-badge, .cdk-pos-custom .cdk-badge { right: auto; left: -4px; }

/* CTA */
.cdk-cta { background: var(--cdk-cta-bg); color: var(--cdk-cta-color); padding: 8px 14px; border-radius: 18px; box-shadow: 0 2px 10px rgba(0,0,0,.18); cursor: pointer; white-space: nowrap; font-weight: 600; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; }
.cdk-cta.cdk-gone { display: none; }
.cdk-cta-inside .cdk-main { width: auto; padding: 0 18px 0 14px; gap: 8px; border-radius: calc(var(--cdk-size) / 2); }
.cdk-cta-inside.cdk-shape-square .cdk-main { border-radius: var(--cdk-radius) !important; }
.cdk-cta-inside .cdk-main-ic, .cdk-cta-inside .cdk-main-cl { width: calc(var(--cdk-size) * .44); height: calc(var(--cdk-size) * .44); flex: 0 0 auto; }
.cdk-cta-in { font-weight: 600; white-space: nowrap; }

/* channel list: simple view */
.cdk-list { display: none; flex-direction: column; gap: 5px; }
.cdk-open .cdk-list { display: flex; animation: cdk-rise .2s ease; }
.cdk-has-panel .cdk-list, .cdk-has-panel .cdk-card { display: none; }
.cdk-iv-horizontal .cdk-list { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; max-width: 80vw; }
.cdk-pos-left.cdk-iv-horizontal .cdk-list, .cdk-pos-custom.cdk-iv-horizontal .cdk-list { justify-content: flex-start; }
.cdk-list .cdk-ch { position: relative; display: inline-flex; width: calc(var(--cdk-size) * .85); height: calc(var(--cdk-size) * .85); padding: 0; border: 0; background: none !important; cursor: pointer; text-decoration: none; }
.cdk-ic { display: flex; align-items: center; justify-content: center; width: 100%; border-radius: var(--cdk-radius); color: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.2); padding: 22%; transition: transform .15s ease; overflow: hidden; }
.cdk-ic.cdk-ic-img { padding: 0; }
.cdk-ic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cdk-list .cdk-ch:hover .cdk-ic { transform: scale(1.08); }
.cdk-tip { position: absolute; top: 50%; transform: translateY(-50%); right: calc(100% + 10px); background: #222; color: #fff; padding: 5px 10px; border-radius: 6px; font-size: 13px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
.cdk-pos-left .cdk-tip, .cdk-pos-custom .cdk-tip { right: auto; left: calc(100% + 10px); }
.cdk-list .cdk-ch:hover .cdk-tip, .cdk-list .cdk-ch:focus-visible .cdk-tip { opacity: 1; }
.cdk-iv-horizontal .cdk-tip { top: auto; bottom: calc(100% + 8px); right: auto; left: 50%; transform: translateX(-50%); }

/* channel list: chat view */
.cdk-card { display: none; width: 300px; max-width: calc(100vw - 32px); background: #fff; border-radius: 14px; box-shadow: 0 10px 34px rgba(0,0,0,.25); overflow: hidden; }
.cdk-open .cdk-card { display: block; animation: cdk-rise .2s ease; }
.cdk-card-h { background: var(--cdk-color); color: var(--cdk-icon); padding: 16px 18px; font-weight: 700; font-size: 16px; }
.cdk-card .cdk-ch { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid #eee; background: #fff; color: #222; text-align: left; cursor: pointer; text-decoration: none; font-size: 14px; }
.cdk-card .cdk-ch:last-child { border-bottom: 0; }
.cdk-card .cdk-ch:hover { background: #f6f6f8; }
.cdk-card .cdk-ic { width: 38px; height: 38px; flex: 0 0 38px; padding: 9px; border-radius: 50%; box-shadow: none; }
.cdk-card .cdk-ic.cdk-ic-img { padding: 0; }
.cdk-ch-t { font-weight: 600; }

/* popup message */
.cdk-pop { display: none; position: relative; width: 260px; max-width: calc(100vw - 32px); background: #fff; border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.22); cursor: pointer; overflow: hidden; }
.cdk-pop.cdk-in { display: block; animation: cdk-rise .25s ease; }
.cdk-open .cdk-pop { display: none; }
.cdk-pop-d1 .cdk-pop-h { background: var(--cdk-pop-bg); color: var(--cdk-pop-color); padding: 10px 34px 10px 14px; font-weight: 700; }
.cdk-pop-d1 .cdk-pop-b { padding: 12px 14px; }
.cdk-pop-d2 { background: var(--cdk-pop-bg); color: var(--cdk-pop-color); padding: 12px 34px 12px 14px; }
.cdk-pop-d2 .cdk-pop-h { font-weight: 700; margin-bottom: 2px; }
.cdk-pop-x { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; padding: 4px; border: 0; background: transparent; color: inherit; cursor: pointer; opacity: .8; }
.cdk-pop-d1 .cdk-pop-x { color: var(--cdk-pop-color); }

/* panels */
.cdk-panel { display: none; width: 320px; max-width: calc(100vw - 24px); background: #fff; border-radius: 14px; box-shadow: 0 10px 34px rgba(0,0,0,.28); overflow: hidden; }
.cdk-has-panel .cdk-panel { display: block; animation: cdk-rise .2s ease; }
.cdk-ph { position: relative; padding: 14px 44px 14px 16px; color: #fff; }
.cdk-ph-t { font-weight: 700; font-size: 16px; }
.cdk-ph-s { font-size: 13px; opacity: .9; margin-top: 2px; }
.cdk-x { position: absolute !important; top: 10px; right: 10px; width: 26px; height: 26px; padding: 5px !important; border: 0 !important; border-radius: 50% !important; background: rgba(255,255,255,.2)!important; color: inherit !important; cursor: pointer; }
.cdk-x:hover { background: rgba(255,255,255,.35); }

/* agents */
.cdk-agent-list { max-height: 55vh; overflow: auto; }
.cdk-agent { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #eee; color: #222; text-decoration: none; }
.cdk-agent:hover { background: #f6f6f8; }
.cdk-av { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; background: #ccc; color: #fff; overflow: hidden; padding: 0; }
.cdk-av svg { width: 22px; height: 22px; }
.cdk-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cdk-agent-t { display: flex; flex-direction: column; min-width: 0; }
.cdk-agent-t small { color: #666; }

/* whatsapp window */
.cdk-wa { position: relative; background: #ECE5DD; }
.cdk-wa-h { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 44px 12px 14px; color: #fff; }
.cdk-wa-t { display: flex; flex-direction: column; min-width: 0; }
.cdk-wa-t small { opacity: .9; }
.cdk-wa-h .cdk-x { color: #fff !important;}
.cdk-wa-b { padding: 18px 14px; min-height: 110px; }
.cdk-wa-bubble { display: inline-block; max-width: 85%; background: #fff; padding: 9px 12px; border-radius: 0 10px 10px 10px; box-shadow: 0 1px 1px rgba(0,0,0,.12); white-space: pre-wrap; word-break: break-word; }
.cdk-wa-f { display: flex; align-items: center; gap: 6px; padding: 8px; background: #f0f0f0; }
.cdk-wa-in { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border: 0; border-radius: 19px; background: #fff; font-size: 14px; color: #222; }
.cdk-wa-send, .cdk-wa-emoji { width: 38px; height: 38px; flex: 0 0 38px; padding: 8px !important; border: 0 !important; border-radius: 50% !important; cursor: pointer !important; }
.cdk-wa-send { background: #25D366; color: #fff; }
.cdk-wa-emoji { background: transparent; color: #666; }
.cdk-wa-picker { display: none; flex-wrap: wrap; gap: 2px; padding: 8px; background: #fff; border-top: 1px solid #ddd; }
.cdk-wa-picker.cdk-in { display: flex; }
.cdk-wa-picker button { width: 34px; height: 34px; border: 0; background: transparent; font-size: 20px; cursor: pointer; border-radius: 6px; }
.cdk-wa-picker button:hover { background: #f0f0f0; }

/* contact form */
.cdk-form { background: var(--cdk-f-bg); color: var(--cdk-f-color); }
.cdk-fm { padding: 14px 16px 16px; max-height: 70vh; overflow: auto; }
.cdk-fr { display: block; margin-bottom: 10px; }
.cdk-fl { display: block; font-weight: 600; margin-bottom: 4px; font-size: 13px; }
.cdk-fi { width: 100%; padding: 9px 10px; border: 1px solid #cfcfd6; border-radius: 8px; background: #fff; color: #222; font-size: 14px; font-family: inherit; }
.cdk-fi:focus { outline: 2px solid var(--cdk-f-btn); outline-offset: 0; border-color: transparent; }
textarea.cdk-fi { resize: vertical; min-height: 80px; }
.cdk-fc { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; margin-bottom: 10px; }
.cdk-fc input { margin-top: 3px; }
.cdk-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.cdk-fb { width: 100%; padding: 11px 14px; border: 0; border-radius: 8px; background: var(--cdk-f-btn); color: var(--cdk-f-btn-color); font-weight: 700; font-size: 14px; cursor: pointer; }
.cdk-fb:disabled { opacity: .6; cursor: default; }
.cdk-fs { min-height: 0; font-size: 13px; margin: 0 0 8px; }
.cdk-fs.cdk-err { color: #c0392b; }
.cdk-thanks { padding: 24px 6px; text-align: center; font-weight: 600; }
.cdk-captcha { margin-bottom: 10px; transform-origin: 0 0; }

/* lightbox */
.cdk-lb { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.65); }
.cdk-lb-box { position: relative; background: #fff; border-radius: 14px; padding: 22px; max-width: 100%; max-height: 100%; overflow: auto; color: #222; }
.cdk-lb-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; padding: 6px; border: 0; border-radius: 50%; background: #eee; color: #333; cursor: pointer; }
.cdk-lb-info { text-align: center; min-width: 260px; }
.cdk-info-h { font-weight: 700; font-size: 16px; margin: 4px 24px 12px; }
.cdk-qr { display: block; margin: 0 auto; width: 240px; max-width: 100%; height: auto; }
.cdk-info-id { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 12px; font-weight: 600; word-break: break-all; }
.cdk-btn { padding: 6px 12px; border: 0; border-radius: 6px; background: #222; color: #fff; cursor: pointer; }
.cdk-lb-video { padding: 0; width: min(860px, 94vw); background: #000; }
.cdk-video { position: relative; width: 100%; padding-top: 56.25%; }
.cdk-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cdk-lb-video .cdk-lb-x { z-index: 2; }

/* background blur */
.cdk-overlay { position: fixed; inset: 0; z-index: 99980; display: none; background: rgba(255,255,255,.25); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.cdk-overlay.cdk-on { display: block; }

/* attention effects (stop once the widget is opened) */
.cdk-att-bounce .cdk-main { animation: cdk-bounce 2.4s infinite; }
.cdk-att-pulse .cdk-main { animation: cdk-pulse 2s infinite; }
.cdk-att-shake .cdk-main { animation: cdk-shake 3s infinite; }
.cdk-att-wobble .cdk-main { animation: cdk-wobble 3s infinite; }
.cdk-att-flash .cdk-main { animation: cdk-flash 2s infinite; }
@keyframes cdk-bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px); } 60% { transform: translateY(-7px); } }
@keyframes cdk-pulse { 0% { box-shadow: 0 0 0 0 var(--cdk-color); } 70% { box-shadow: 0 0 0 16px rgba(0,0,0,0); } 100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); } }
@keyframes cdk-shake { 0%, 80%, 100% { transform: translateX(0); } 84% { transform: translateX(-6px); } 88% { transform: translateX(6px); } 92% { transform: translateX(-5px); } 96% { transform: translateX(5px); } }
@keyframes cdk-wobble { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-12deg); } 88% { transform: rotate(10deg); } 92% { transform: rotate(-6deg); } 96% { transform: rotate(4deg); } }
@keyframes cdk-flash { 0%, 50%, 100% { opacity: 1; } 25%, 75% { opacity: .35; } }
@keyframes cdk-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	.cdk-w *, .cdk-w { animation: none !important; transition: none !important; }
}
@media (max-width: 480px) {
	.cdk-panel { width: calc(100vw - 24px); }
}
