#lucky-chat-widget-root {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 999999;
	font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
}

#lucky-chat-widget-root * { box-sizing: border-box; }

.lcw-bubble {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: linear-gradient(135deg, #e9cd6f, #d4af37 45%, #111 130%);
	box-shadow: 0 8px 24px rgba(0,0,0,.35);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border: 2px solid #d4af37;
}

.lcw-bubble svg { width: 26px; height: 26px; fill: #111; }

.lcw-window {
	position: absolute;
	bottom: 76px;
	right: 0;
	width: 340px;
	height: 460px;
	background: #111;
	border: 1px solid #2b2b2b;
	border-radius: 14px;
	overflow: hidden;
	display: none;
	flex-direction: column;
	box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.lcw-window.open { display: flex; }

.lcw-header {
	background: linear-gradient(135deg, #d4af37, #b8912b);
	padding: 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: 0 0 auto;
}

.lcw-header strong { color: #111; font-size: 15px; }
.lcw-header span { color: #2b2200; font-size: 11px; display: block; }
.lcw-close { cursor: pointer; color: #111; font-weight: 700; font-size: 18px; line-height: 1; }

#lcw-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
	background: #181818;
}

.lcw-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: #181818;
}

.lcw-msg {
	max-width: 78%;
	padding: 8px 12px;
	border-radius: 12px;
	font-size: 13px;
	line-height: 1.4;
	color: #f2f2f2;
}

.lcw-msg.agent {
	align-self: flex-start;
	background: #262626;
	border-bottom-left-radius: 2px;
}

.lcw-msg.visitor {
	align-self: flex-end;
	background: linear-gradient(135deg, #e9cd6f, #d4af37);
	color: #111;
	font-weight: 500;
	border-bottom-right-radius: 2px;
}

.lcw-composer {
	display: flex;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid #2b2b2b;
	flex: 0 0 auto;
}

.lcw-composer input {
	flex: 1;
	background: #1c1c1c;
	border: 1px solid #2b2b2b;
	border-radius: 8px;
	padding: 10px 12px;
	color: #f2f2f2;
	font-size: 13px;
}

.lcw-send {
	background: linear-gradient(135deg, #e9cd6f, #d4af37);
	color: #111;
	border: none;
	border-radius: 8px;
	padding: 10px 16px;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
}

/* -------------------------------------------------- */
/* Account bar shown above messages when logged in     */
/* -------------------------------------------------- */

.lcw-account-bar {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 14px;
	background: #1c1c1c;
	border-bottom: 1px solid #2b2b2b;
	font-size: 11px;
	color: #9c9c9c;
}

.lcw-account-bar strong { color: #f2f2f2; font-weight: 600; }

.lcw-account-bar button {
	background: none;
	border: none;
	color: #d4af37;
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
	padding: 0;
	text-decoration: underline;
}

/* -------------------------------------------------- */
/* Login / Register / Guest auth screens               */
/* -------------------------------------------------- */

.lcw-auth {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow-y: auto;
	padding: 22px 20px 18px;
}

.lcw-auth-intro {
	text-align: center;
	margin-bottom: 16px;
}

.lcw-auth-badge {
	width: 46px;
	height: 46px;
	margin: 0 auto 10px;
	border-radius: 50%;
	background: linear-gradient(135deg, #e9cd6f, #d4af37 60%, #111 140%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #111;
	border: 2px solid #d4af37;
}

.lcw-auth-intro h3 {
	margin: 0 0 4px;
	color: #f2f2f2;
	font-size: 16px;
	font-weight: 700;
}

.lcw-auth-intro p {
	margin: 0;
	color: #9c9c9c;
	font-size: 12px;
}

.lcw-tabs {
	display: flex;
	background: #1c1c1c;
	border: 1px solid #2b2b2b;
	border-radius: 10px;
	padding: 3px;
	margin-bottom: 16px;
}

.lcw-tab {
	flex: 1;
	background: none;
	border: none;
	padding: 8px 4px;
	font-size: 12px;
	font-weight: 600;
	color: #9c9c9c;
	border-radius: 8px;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

.lcw-tab.active {
	background: linear-gradient(135deg, #e9cd6f, #d4af37);
	color: #111;
}

.lcw-auth-panel {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.lcw-form-row-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.lcw-form-group {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.lcw-form-group label {
	font-size: 11px;
	font-weight: 600;
	color: #c9c9c9;
	letter-spacing: .2px;
}

.lcw-optional {
	font-weight: 400;
	color: #6f6f6f;
}

.lcw-form-group input,
.lcw-form-group textarea {
	width: 100%;
	background: #1c1c1c;
	border: 1px solid #2b2b2b;
	border-radius: 8px;
	padding: 10px 12px;
	color: #f2f2f2;
	font-size: 13px;
	font-family: inherit;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.lcw-form-group textarea { resize: none; }

.lcw-form-group input:focus,
.lcw-form-group textarea:focus {
	outline: none;
	border-color: #d4af37;
	box-shadow: 0 0 0 3px rgba(212,175,55,.18);
}

.lcw-primary-btn {
	background: linear-gradient(135deg, #e9cd6f, #d4af37);
	color: #111;
	border: none;
	border-radius: 8px;
	padding: 11px;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
	transition: opacity .15s ease, transform .05s ease;
}

.lcw-primary-btn:hover { opacity: .92; }
.lcw-primary-btn:active { transform: translateY(1px); }

.lcw-primary-btn.lcw-loading,
.lcw-primary-btn:disabled {
	opacity: .65;
	cursor: default;
}

.lcw-link-btn {
	background: none;
	border: none;
	color: #9c9c9c;
	font-size: 11px;
	cursor: pointer;
	padding: 2px 0 0;
	text-decoration: underline;
}

.lcw-switch {
	margin: 2px 0 0;
	text-align: center;
	font-size: 11px;
	color: #9c9c9c;
}

.lcw-switch a {
	color: #d4af37;
	font-weight: 600;
	text-decoration: none;
}

.lcw-switch a:hover { text-decoration: underline; }

.lcw-alert {
	font-size: 11.5px;
	padding: 8px 10px;
	border-radius: 8px;
	line-height: 1.4;
}

.lcw-alert-error {
	background: rgba(224,119,106,.12);
	border: 1px solid rgba(224,119,106,.4);
	color: #e0776a;
}

.lcw-alert-success {
	background: rgba(212,175,55,.12);
	border: 1px solid rgba(212,175,55,.4);
	color: #d4af37;
}
