/* Cayman Client Portal — chat widget */
.cecp-chat { --ch-navy: var(--c-navy, #0B1F3A); --ch-teal: var(--c-teal, #0E8C8C); --ch-coral: var(--c-coral, #F27059); position: fixed; right: 20px; bottom: 20px; z-index: 9990; font-family: Inter, system-ui, sans-serif; font-size: 15px; line-height: 1.5; }
.cecp-chat *, .cecp-chat *::before { box-sizing: border-box; }
.cecp-chat .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.cecp-chat__fab { width: 60px; height: 60px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--ch-teal), #2EC4B6); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 12px 30px -8px rgba(14,140,140,.7); position: relative; transition: transform .2s; }
.cecp-chat__fab:hover { transform: scale(1.06); }
.cecp-chat__fab:focus-visible { outline: 3px solid var(--ch-navy); outline-offset: 3px; }
.cecp-chat[data-state="open"] .cecp-chat__fab { transform: scale(.9); }
.cecp-chat__badge { position: absolute; top: -2px; right: -2px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ch-coral); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.cecp-chat__badge[hidden] { display: none; }
.cecp-chat__panel { position: absolute; right: 0; bottom: 76px; width: min(390px, calc(100vw - 24px)); height: min(600px, calc(100vh - 110px)); background: #fff; border-radius: 18px; box-shadow: 0 30px 60px -15px rgba(11,31,58,.45); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #E3E8EF; animation: cecp-chat-in .2s ease-out; }
.cecp-chat__panel[hidden] { display: none; }
@keyframes cecp-chat-in { from { opacity: 0; transform: translateY(10px); } }
.cecp-chat__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--ch-navy); color: #fff; }
.cecp-chat__head strong { display: block; font-size: 15px; }
.cecp-chat__status { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: rgba(255,255,255,.75); }
.cecp-chat__dot { width: 8px; height: 8px; border-radius: 50%; background: #2EC4B6; box-shadow: 0 0 0 3px rgba(46,196,182,.25); }
.cecp-chat.is-human .cecp-chat__dot { background: var(--ch-coral); box-shadow: 0 0 0 3px rgba(242,112,89,.3); }
.cecp-chat__tools { display: flex; gap: 4px; }
.cecp-chat__tools button { background: transparent; border: 0; color: rgba(255,255,255,.8); width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.cecp-chat__tools button:hover { background: rgba(255,255,255,.1); color: #fff; }
.cecp-chat__log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #F5F8FB; }
.cecp-chat__msg { max-width: 86%; padding: 10px 13px; border-radius: 14px 14px 14px 4px; background: #fff; border: 1px solid #E3E8EF; color: #13233A; word-wrap: break-word; }
.cecp-chat__msg--visitor, .cecp-chat__msg--client { align-self: flex-end; background: var(--ch-teal); color: #fff; border-color: transparent; border-radius: 14px 14px 4px 14px; }
.cecp-chat__msg--visitor a, .cecp-chat__msg--client a { color: #fff; }
.cecp-chat__msg--staff { background: #FFF6F4; border-color: #FBD3CB; }
.cecp-chat__msg--system { align-self: center; background: transparent; border: 1px dashed #C9D3DE; color: #6B7A8C; font-size: 13px; text-align: center; max-width: 100%; }
.cecp-chat__msg--pending { opacity: .7; }
.cecp-chat__msg.is-failed { opacity: 1; box-shadow: 0 0 0 2px #D64545; }
.cecp-chat__who { display: block; font-size: 11.5px; font-weight: 700; opacity: .65; margin-bottom: 2px; }
.cecp-chat__text a { color: var(--ch-teal); font-weight: 600; }
.cecp-chat__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cecp-chat__actions a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--ch-navy); color: #fff !important; text-decoration: none; font-size: 13px; font-weight: 600; }
.cecp-chat__typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: #fff; border-radius: 14px; border: 1px solid #E3E8EF; }
.cecp-chat__typing span:not(.screen-reader-text) { width: 7px; height: 7px; border-radius: 50%; background: #9AA8B8; animation: cecp-dot 1.2s infinite; }
.cecp-chat__typing span:nth-child(2) { animation-delay: .15s; } .cecp-chat__typing span:nth-child(3) { animation-delay: .3s; }
@keyframes cecp-dot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.cecp-chat__quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px; background: #F5F8FB; }
.cecp-chat__quick:not(:empty) { padding-bottom: 10px; }
.cecp-chat__quick button { padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--ch-teal); background: #fff; color: var(--ch-teal); font-family: inherit; font-weight: 600; font-size: 13px; line-height: 1.2; cursor: pointer; }
.cecp-chat__quick button:hover { background: var(--ch-teal); color: #fff; }
.cecp-chat__form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #E3E8EF; align-items: flex-end; }
.cecp-chat__form textarea { flex: 1; resize: none; border: 1.5px solid #E3E8EF; border-radius: 12px; padding: 9px 12px; font: inherit; max-height: 120px; color: #13233A; }
.cecp-chat__form textarea:focus { outline: none; border-color: var(--ch-teal); }
.cecp-chat__form button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--ch-teal); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.cecp-chat__form button:hover { background: var(--ch-navy); }
.cecp-chat__note { margin: 0; padding: 0 12px 10px; font-size: 11px; color: #8996A6; }
.cecp-chat__note a { color: inherit; }
@media (max-width: 480px) {
	.cecp-chat { right: 12px; bottom: 12px; }
	.cecp-chat__panel { position: fixed; inset: 0; width: 100%; height: 100%; border-radius: 0; bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { .cecp-chat * { animation: none !important; transition: none !important; } }
@media print { .cecp-chat { display: none; } }
