/* Doft AI Support chat widget. Namespaced under .doft-aichat to avoid clashes. */
.doft-aichat { position: fixed; right: 20px; bottom: 20px; z-index: 2147483000; }

.doft-aichat .dac-panel {
	position: fixed; right: 20px; bottom: 20px;
	width: 380px; max-width: calc(100vw - 32px);
	height: 560px; max-height: calc(100vh - 100px);
	background: #fff; border-radius: 14px;
	box-shadow: 0 12px 40px rgba(0,0,0,.22);
	display: none; flex-direction: column; overflow: hidden;
	font-family: inherit;
}
.doft-aichat.dac-open .dac-panel { display: flex; }

.doft-aichat .dac-header {
	background: #2E7FF1; color: #fff;
	padding: 12px 14px; display: flex; align-items: center; justify-content: space-between;
}
.doft-aichat .dac-title { font-weight: 600; font-size: 15px; display: flex; align-items: center; }
.doft-aichat .dac-dot { width: 8px; height: 8px; border-radius: 50%; background: #57e08a; margin-right: 8px; }
.doft-aichat .dac-actions { display: flex; align-items: center; gap: 4px; }
.doft-aichat .dac-new { background: none; border: 0; color: #fff; font-size: 18px; line-height: 1; cursor: pointer; opacity: .9; padding: 2px 6px; border-radius: 6px; }
.doft-aichat .dac-new:hover { opacity: 1; background: rgba(255,255,255,.15); }
.doft-aichat .dac-close { background: none; border: 0; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; opacity: .9; padding: 0 4px; }
.doft-aichat .dac-close:hover { opacity: 1; }

.doft-aichat .dac-body { flex: 1; overflow-y: auto; padding: 14px; background: #f6f8fb; }
.doft-aichat .dac-msg { display: flex; margin-bottom: 10px; }
.doft-aichat .dac-msg.dac-user { justify-content: flex-end; }
.doft-aichat .dac-bubble {
	max-width: 80%; padding: 9px 12px; border-radius: 12px;
	font-size: 14px; line-height: 1.45; word-wrap: break-word; white-space: normal;
}
.doft-aichat .dac-bot .dac-bubble { background: #fff; color: #1f2d3d; border: 1px solid #e6ebf1; border-bottom-left-radius: 4px; }
.doft-aichat .dac-user .dac-bubble { background: #2E7FF1; color: #fff; border-bottom-right-radius: 4px; }
.doft-aichat .dac-sources { margin-top: 6px; font-size: 11px; color: #8a97a6; }
.doft-aichat .dac-bubble .dac-h { font-weight: 600; margin: 8px 0 3px; font-size: 14.5px; }
.doft-aichat .dac-bubble .dac-h:first-child { margin-top: 0; }
.doft-aichat .dac-bubble .dac-li { margin: 2px 0; }
.doft-aichat .dac-bubble .dac-sp { height: 7px; }
.doft-aichat .dac-bubble .dac-hr { border: 0; border-top: 1px solid #e6ebf1; margin: 9px 0; }
.doft-aichat .dac-bubble a { color: #2E7FF1; text-decoration: underline; }
.doft-aichat .dac-bubble strong { font-weight: 600; }

.doft-aichat .dac-typing .dac-bubble span {
	display: inline-block; width: 6px; height: 6px; margin: 0 1px; border-radius: 50%;
	background: #b7c2cf; animation: dac-blink 1.2s infinite both;
}
.doft-aichat .dac-typing .dac-bubble span:nth-child(2) { animation-delay: .2s; }
.doft-aichat .dac-typing .dac-bubble span:nth-child(3) { animation-delay: .4s; }
@keyframes dac-blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }

.doft-aichat .dac-form { display: flex; border-top: 1px solid #e6ebf1; padding: 8px; background: #fff; }
.doft-aichat .dac-input {
	flex: 1; border: 1px solid #d8dee6; border-radius: 20px;
	padding: 8px 14px; font-size: 14px; outline: none;
}
.doft-aichat .dac-input:focus { border-color: #2E7FF1; }
.doft-aichat .dac-send {
	background: #2E7FF1; color: #fff; border: 0; border-radius: 50%;
	width: 38px; height: 38px; margin-left: 8px; cursor: pointer; font-size: 16px;
}
.doft-aichat .dac-send:hover { background: #2670da; }
.doft-aichat .dac-disclaimer { font-size: 10px; color: #9aa6b2; text-align: center; padding: 4px 0 8px; background: #fff; }

@media (max-width: 480px) {
	.doft-aichat .dac-panel { right: 8px; bottom: 8px; height: calc(100vh - 60px); max-height: none; }
}

/* Floating launcher bubble (auto-shown on supported pages) */
.doft-aichat .dac-launcher {
	position: fixed; right: 20px; bottom: 20px;
	width: 56px; height: 56px; border-radius: 50%;
	background: #2E7FF1; color: #fff; border: 0; cursor: pointer;
	box-shadow: 0 6px 20px rgba(46,127,241,.45);
	display: flex; align-items: center; justify-content: center;
	z-index: 2147483001; transition: transform .15s ease, background .15s ease;
}
.doft-aichat .dac-launcher:hover { background: #2670da; transform: scale(1.06); }

/* Full-page mode for the in-app webview (/support-chat) */
.doft-aichat.dac-fullpage .dac-panel {
	position: fixed; inset: 0; right: 0; bottom: 0;
	width: 100%; height: 100%; max-width: none; max-height: none;
	border-radius: 0; box-shadow: none;
}
