/* AI Support Chat — widget styles */
:root {
	--aisc-color: #2563eb;                 /* primary (Elementor: --e-global-color-primary) */
	--aisc-accent: var(--aisc-color);      /* links/stars (Elementor: --e-global-color-accent) */
	--aisc-text: #1f2937;                  /* body text (Elementor: --e-global-color-text) */
	--aisc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#aisc-widget-root, #aisc-panel { font-family: var(--aisc-font); color: var(--aisc-text); }
#aisc-widget-root { position: fixed; bottom: 20px; right: 20px; z-index: 99999; }

#aisc-launcher {
	width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
	background: var(--aisc-color); color: #fff; font-size: 24px;
	box-shadow: 0 4px 14px rgba(0,0,0,.25); transition: transform .15s;
}
#aisc-launcher:hover { transform: scale(1.08); }
#aisc-launcher.aisc-open { font-size: 20px; }

/* Teaser bubble above the launcher */
#aisc-teaser {
	position: fixed; bottom: 88px; right: 20px; max-width: 260px;
	background: #fff; border: 1px solid #e5e5e5; border-radius: 14px 14px 3px 14px;
	box-shadow: 0 6px 24px rgba(0,0,0,.18); padding: 12px 14px;
	display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.45;
	animation: aisc-teaser-in .35s ease-out;
}
#aisc-teaser-text { cursor: pointer; }
#aisc-teaser-x { background: none; border: none; color: #aaa; cursor: pointer; font-size: 12px; padding: 0 2px; flex-shrink: 0; }
#aisc-teaser-x:hover { color: #555; }
@keyframes aisc-teaser-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

#aisc-panel {
	position: fixed; bottom: 88px; right: 20px; width: 360px; max-width: calc(100vw - 32px);
	height: 520px; max-height: calc(100vh - 120px);
	background: #fff; border-radius: 14px; box-shadow: 0 8px 32px rgba(0,0,0,.28);
	display: flex; flex-direction: column; overflow: hidden;
}

#aisc-head {
	background: var(--aisc-color); color: #fff; padding: 12px 14px; font-weight: 600;
	display: flex; align-items: center; gap: 8px;
}
#aisc-mode { font-weight: 400; font-size: 12px; opacity: .9; flex: 1; text-align: right; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.aisc-mode-av { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); }
.aisc-w-av { width: 18px; height: 18px; border-radius: 50%; vertical-align: -5px; margin-right: 5px; }
#aisc-min { background: none; border: none; color: #fff; font-size: 16px; cursor: pointer; padding: 0 4px; }

#aisc-contact { padding: 28px 24px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; flex: 1; justify-content: center; }
.aisc-c-emoji { font-size: 40px; text-align: center; line-height: 1; }
.aisc-c-title { margin: 0; text-align: center; font-size: 19px; font-weight: 700; color: var(--aisc-text); }
.aisc-c-sub { margin: 0 0 6px; text-align: center; font-size: 13px; line-height: 1.55; color: #6b7280; }
#aisc-contact input {
	width: 100%; box-sizing: border-box; padding: 12px 14px; font-size: 14px;
	border: 1.5px solid #e2e4e9; border-radius: 10px; outline: none;
	transition: border-color .15s, box-shadow .15s; background: #fafafa;
}
#aisc-contact input:focus { border-color: var(--aisc-color); background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--aisc-color) 15%, transparent); }
#aisc-contact button {
	width: 100%; box-sizing: border-box; background: var(--aisc-color); color: #fff;
	border: none; border-radius: 10px; padding: 13px; cursor: pointer;
	font-size: 15px; font-weight: 600; margin-top: 4px; transition: filter .15s;
}
#aisc-contact button:hover { filter: brightness(1.08); }
#aisc-contact a { color: #9ca3af; font-size: 12.5px; text-align: center; text-decoration: none; padding: 4px; }
#aisc-contact a:hover { color: #6b7280; text-decoration: underline; }

/* Conversation-ended state */
#aisc-ended {
	display: flex; flex-direction: column; align-items: center; gap: 10px;
	padding: 14px; border-top: 1px solid #eee; background: #fafafa;
}
#aisc-ended span { font-size: 13px; color: #6b7280; }
#aisc-ended button {
	background: var(--aisc-color); color: #fff; border: none; border-radius: 9px;
	padding: 9px 18px; cursor: pointer; font-size: 13.5px; font-weight: 600;
}
#aisc-ended button:hover { filter: brightness(1.08); }

#aisc-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
#aisc-msgs { flex: 1; overflow-y: auto; padding: 12px; background: #f6f7f9; }

.aisc-w-msg { max-width: 82%; margin-bottom: 8px; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.aisc-w-who { display: block; font-size: 10px; color: #999; margin-bottom: 1px; text-transform: uppercase; letter-spacing: .03em; }
.aisc-w-customer { background: var(--aisc-color); color: #fff; margin-left: auto; border-bottom-right-radius: 3px; }
.aisc-w-bot { background: #fff; border: 1px solid #e6e6e6; border-bottom-left-radius: 3px; }
.aisc-w-agent { background: #e7f7ed; border: 1px solid #cbe9d6; border-bottom-left-radius: 3px; }
.aisc-w-system { background: #fdf6e3; border: 1px solid #f1e3b8; font-size: 12px; max-width: 100%; text-align: center; color: #7a6420; }
.aisc-w-msg a { color: inherit; text-decoration: underline; }
.aisc-stars a { font-size: 20px; text-decoration: none; color: var(--aisc-accent, #e8b817); margin: 0 2px; }

#aisc-offline-bar { padding: 10px 12px; background: #fff8e6; border-top: 1px solid #f0e3bb; font-size: 13px; line-height: 1.6; }
#aisc-offline-bar input { padding: 6px 8px; border: 1px solid #ccc; border-radius: 6px; width: 130px; }
#aisc-offline-bar button { background: var(--aisc-color); color: #fff; border: none; border-radius: 6px; padding: 6px 10px; cursor: pointer; }

#aisc-typing { display: flex; gap: 4px; padding: 6px 14px; }
#aisc-typing span { width: 7px; height: 7px; border-radius: 50%; background: #bbb; animation: aisc-blink 1.2s infinite; }
#aisc-typing span:nth-child(2) { animation-delay: .2s; }
#aisc-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes aisc-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

#aisc-inputbar { display: flex; align-items: center; border-top: 1px solid #e8e8e8; }
#aisc-input { flex: 1; border: none; padding: 12px 6px; font-size: 14px; resize: none; outline: none; font-family: inherit; }
#aisc-send { background: none; border: none; color: var(--aisc-color); font-size: 18px; padding: 0 14px; cursor: pointer; }
#aisc-attach { background: none; border: none; font-size: 17px; padding: 0 6px 0 12px; cursor: pointer; opacity: .65; }
#aisc-attach:hover { opacity: 1; }
.aisc-w-img { max-width: 100%; max-height: 220px; border-radius: 10px; display: block; margin-top: 4px; cursor: zoom-in; }

#aisc-foot { text-align: center; font-size: 11px; padding: 5px 0 8px; color: #999; background: #fff; }
#aisc-foot a { color: #999; }

/* Product recommendation cards */
.aisc-products { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 10px; max-width: 92%; }
.aisc-product { display: flex; gap: 10px; background: #fff; border: 1px solid #e4e4e7; border-radius: 12px; padding: 8px; align-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.aisc-product img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.aisc-product-noimg { width: 64px; height: 64px; border-radius: 8px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.aisc-product-info { min-width: 0; flex: 1; }
.aisc-product-title { font-size: 13px; font-weight: 600; line-height: 1.3; margin-bottom: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.aisc-product-price { font-size: 13px; color: var(--aisc-color); font-weight: 600; margin-bottom: 5px; }
.aisc-product-actions { display: flex; gap: 6px; }
.aisc-product-btn { font-size: 12px; padding: 5px 12px; border-radius: 7px; text-decoration: none !important; line-height: 1.2; display: inline-block; }
.aisc-product-view { border: 1px solid var(--aisc-color); color: var(--aisc-color) !important; background: #fff; }
.aisc-product-cart { background: var(--aisc-color); color: #fff !important; }
.aisc-product-btn:hover { opacity: .85; }

@media (max-width: 480px) {
	#aisc-panel { right: 8px; bottom: 80px; width: calc(100vw - 16px); height: 70vh; }
}
