/* White Shed Chatbot — front-end widget styles */

.wsc-root {
	--wsc-primary: #1b4332;
	--wsc-bg: #ffffff;
	--wsc-bot-bubble: #f1f3f2;
	--wsc-text: #1f2421;
	--wsc-radius: 16px;
	position: fixed;
	bottom: 24px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.45;
}

.wsc-root.wsc-pos-right { right: 24px; }
.wsc-root.wsc-pos-left  { left: 24px; }

/* Launcher button */
#wsc-launcher {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--wsc-primary);
	border: none;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0,0,0,0.2);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease;
	position: relative;
}
#wsc-launcher:hover { transform: scale(1.06); }
#wsc-launcher:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.wsc-launcher-icon { display: block; }
.wsc-icon-chat, .wsc-icon-close {
	position: absolute;
	width: 26px;
	height: 26px;
}
.wsc-icon-chat::before {
	content: "";
	display: block;
	width: 26px;
	height: 22px;
	background: #fff;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 4h16a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H8l-4 4V6a1 1 0 0 1 1-1z'/></svg>") center/contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 4h16a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H8l-4 4V6a1 1 0 0 1 1-1z'/></svg>") center/contain no-repeat;
}
.wsc-icon-close {
	opacity: 0;
	font-size: 0;
}
.wsc-icon-close::before {
	content: "\2715";
	color: #fff;
	font-size: 22px;
	line-height: 26px;
}
#wsc-launcher[aria-expanded="true"] .wsc-icon-chat { opacity: 0; }
#wsc-launcher[aria-expanded="true"] .wsc-icon-close { opacity: 1; }

/* Chat window */
.wsc-window {
	position: absolute;
	bottom: 76px;
	width: 360px;
	max-width: calc(100vw - 32px);
	height: 520px;
	max-height: calc(100vh - 140px);
	background: var(--wsc-bg);
	border-radius: var(--wsc-radius);
	box-shadow: 0 12px 40px rgba(0,0,0,0.25);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	animation: wsc-pop 0.18s ease;
}
.wsc-root.wsc-pos-right .wsc-window { right: 0; }
.wsc-root.wsc-pos-left  .wsc-window { left: 0; }

@keyframes wsc-pop {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.wsc-header {
	background: var(--wsc-primary);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}
.wsc-header-logo {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	object-fit: cover;
	background: #fff;
}
.wsc-header-text { display: flex; flex-direction: column; line-height: 1.2; }
.wsc-header-text strong { font-size: 15px; }
.wsc-header-status { font-size: 12px; opacity: 0.85; }
#wsc-close-btn {
	margin-left: auto;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
}

.wsc-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #fafbfa;
}

.wsc-msg {
	max-width: 82%;
	padding: 10px 13px;
	border-radius: 14px;
	font-size: 14px;
	word-wrap: break-word;
	white-space: pre-line;
}
.wsc-msg-bot {
	background: var(--wsc-bot-bubble);
	color: var(--wsc-text);
	align-self: flex-start;
	border-bottom-left-radius: 4px;
}
.wsc-msg-user {
	background: var(--wsc-primary);
	color: #fff;
	align-self: flex-end;
	border-bottom-right-radius: 4px;
}

.wsc-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-self: stretch;
}
.wsc-option-btn {
	background: #fff;
	border: 1.5px solid var(--wsc-primary);
	color: var(--wsc-primary);
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 14px;
	cursor: pointer;
	text-align: left;
	transition: background 0.12s ease, color 0.12s ease;
}
.wsc-option-btn:hover { background: var(--wsc-primary); color: #fff; }

.wsc-cta-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: var(--wsc-primary);
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 12px 14px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	width: 100%;
}
.wsc-cta-btn:hover { filter: brightness(1.08); }
.wsc-cta-btn.wsc-secondary {
	background: #fff;
	color: var(--wsc-primary);
	border: 1.5px solid var(--wsc-primary);
}

.wsc-composer-area {
	border-top: 1px solid #eee;
	padding: 12px;
	flex-shrink: 0;
	background: #fff;
}

.wsc-form-field { margin-bottom: 10px; }
.wsc-form-field label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 4px;
	color: #444;
}
.wsc-form-field input,
.wsc-form-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 9px 10px;
	border: 1px solid #d5d9d7;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
}
.wsc-form-field textarea { resize: vertical; min-height: 50px; }
.wsc-field-error {
	color: #c0392b;
	font-size: 12px;
	margin-top: 3px;
}
.wsc-checkbox-field {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 12px;
	color: #444;
	margin-bottom: 12px;
}
.wsc-checkbox-field input { margin-top: 3px; }

.wsc-typing {
	align-self: flex-start;
	display: flex;
	gap: 4px;
	padding: 10px 13px;
	background: var(--wsc-bot-bubble);
	border-radius: 14px;
	border-bottom-left-radius: 4px;
}
.wsc-typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #999;
	animation: wsc-bounce 1.2s infinite ease-in-out;
}
.wsc-typing span:nth-child(2) { animation-delay: 0.15s; }
.wsc-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes wsc-bounce {
	0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
	30% { transform: translateY(-4px); opacity: 1; }
}

.wsc-meet-success {
	background: #eaf7ee;
	border: 1px solid #bfe6cb;
	border-radius: 10px;
	padding: 10px;
	margin-top: 4px;
}

@media (max-width: 420px) {
	.wsc-window {
		width: calc(100vw - 24px);
		height: calc(100vh - 110px);
		bottom: 72px;
	}
	.wsc-root.wsc-pos-right, .wsc-root.wsc-pos-left { right: 12px; left: 12px; }
}
