/* COBS OS Premium Chat Styling - Black, White, Gold */

:root {
	--cobs-gold: #D4AF37;
	--cobs-dark: #111111;
	--cobs-dark-grey: #1C1C1C;
	--cobs-light-grey: #F5F5F5;
	--cobs-white: #FFFFFF;
}

.cobs-chat-wrapper {
	position: fixed;
	bottom: 25px;
	right: 25px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", sans-serif;
}

/* Offset top if WP Admin Bar exists */
body.admin-bar .cobs-chat-wrapper {
	bottom: 25px;
}

/* Chat Trigger Button */
.cobs-chat-trigger {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--cobs-dark);
	border: 2px solid var(--cobs-gold);
	color: var(--cobs-gold);
	cursor: pointer;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	position: relative;
	outline: none;
}

.cobs-chat-trigger:hover {
	transform: scale(1.08);
	background: var(--cobs-dark-grey);
}

.cobs-chat-trigger svg {
	width: 28px;
	height: 28px;
}

/* Pulse Animation */
.cobs-trigger-pulse {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	border: 2px solid var(--cobs-gold);
	animation: cobs-pulse-glow 2s infinite;
	opacity: 0;
	pointer-events: none;
}

@keyframes cobs-pulse-glow {
	0% {
		transform: scale(1);
		opacity: 0.6;
	}
	100% {
		transform: scale(1.4);
		opacity: 0;
	}
}

/* Chat Window Container */
.cobs-chat-window {
	position: absolute;
	bottom: 75px;
	right: 0;
	width: 380px;
	height: 520px;
	background: var(--cobs-white);
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
	transform-origin: bottom right;
	border: 1px solid rgba(212, 175, 55, 0.15);
}

.cobs-hidden {
	transform: scale(0);
	opacity: 0;
	pointer-events: none;
}

/* Chat Header */
.cobs-chat-header {
	background: var(--cobs-dark);
	border-bottom: 2px solid var(--cobs-gold);
	padding: 15px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: var(--cobs-white);
}

.cobs-header-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.cobs-avatar-container {
	position: relative;
}

.cobs-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--cobs-gold);
	color: var(--cobs-dark);
	font-weight: bold;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	border: 1px solid var(--cobs-white);
}

.cobs-status-indicator {
	position: absolute;
	bottom: 2px;
	right: 2px;
	width: 10px;
	height: 10px;
	background-color: #2ecc71;
	border-radius: 50%;
	border: 2px solid var(--cobs-dark);
}

.cobs-header-text h4 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--cobs-gold);
}

.cobs-header-text span {
	font-size: 11px;
	color: #cccccc;
}

.cobs-chat-close {
	background: none;
	border: none;
	color: var(--cobs-gold);
	font-size: 24px;
	cursor: pointer;
	padding: 0;
	line-height: 1;
}

/* Chat Messages Area */
.cobs-chat-body {
	flex: 1;
	padding: 20px;
	overflow-y: auto;
	background: var(--cobs-light-grey);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.cobs-message {
	max-width: 80%;
	padding: 12px 16px;
	border-radius: 12px;
	font-size: 14px;
	line-height: 1.4;
	position: relative;
	word-wrap: break-word;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cobs-message-time {
	font-size: 9px;
	color: #999999;
	display: block;
	text-align: right;
	margin-top: 4px;
}

.system-message {
	align-self: flex-start;
	background: var(--cobs-white);
	color: var(--cobs-dark);
	border-left: 3px solid var(--cobs-gold);
}

.user-message {
	align-self: flex-end;
	background: var(--cobs-dark);
	color: var(--cobs-white);
}

.user-message .cobs-message-time {
	color: #aaaaaa;
}

/* Input Area */
.cobs-chat-input-container {
	padding: 15px;
	background: var(--cobs-white);
	border-top: 1px solid #eeeeee;
	display: flex;
	gap: 10px;
	align-items: center;
}

.cobs-chat-input-container input {
	flex: 1;
	border: 1px solid #e0e0e0;
	border-radius: 24px;
	padding: 10px 18px;
	font-size: 14px;
	outline: none;
	transition: border-color 0.3s;
}

.cobs-chat-input-container input:focus {
	border-color: var(--cobs-gold);
}

.cobs-send-btn {
	background: var(--cobs-dark);
	color: var(--cobs-gold);
	border: 1px solid var(--cobs-gold);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s;
	outline: none;
}

.cobs-send-btn:hover {
	background: var(--cobs-gold);
	color: var(--cobs-dark);
}

.cobs-send-btn svg {
	width: 18px;
	height: 18px;
	transform: translate(1px, 0);
}

/* Typing Indicator */
.cobs-typing-indicator {
	display: flex;
	gap: 4px;
	padding: 8px 12px;
	background: var(--cobs-white);
	border-radius: 12px;
	align-self: flex-start;
}

.cobs-typing-indicator span {
	width: 6px;
	height: 6px;
	background: var(--cobs-gold);
	border-radius: 50%;
	animation: cobs-typing 1.4s infinite ease-in-out both;
}

.cobs-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.cobs-typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes cobs-typing {
	0%, 80%, 100% { transform: scale(0); }
	40% { transform: scale(1); }
}

/* Lead Overlay Form */
.cobs-lead-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(17, 17, 17, 0.95);
	backdrop-filter: blur(4px);
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	transition: opacity 0.3s ease;
}

.cobs-lead-form-container {
	background: var(--cobs-white);
	border-radius: 12px;
	padding: 24px;
	width: 100%;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	border: 1px solid var(--cobs-gold);
}

.cobs-lead-form-container h3 {
	margin: 0 0 8px 0;
	color: var(--cobs-dark);
	font-size: 18px;
	font-weight: 700;
}

.cobs-lead-form-container p {
	margin: 0 0 20px 0;
	font-size: 13px;
	color: #666666;
	line-height: 1.4;
}

.cobs-form-group {
	margin-bottom: 14px;
	text-align: left;
}

.cobs-form-group label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: var(--cobs-dark);
	margin-bottom: 5px;
}

.cobs-form-group input {
	width: 100%;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 13px;
	box-sizing: border-box;
}

.cobs-form-group input:focus {
	border-color: var(--cobs-gold);
	outline: none;
}

.cobs-btn-submit {
	width: 100%;
	background: var(--cobs-dark);
	color: var(--cobs-gold);
	border: 1px solid var(--cobs-gold);
	padding: 12px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.3s;
	margin-top: 10px;
}

.cobs-btn-submit:hover {
	background: var(--cobs-gold);
	color: var(--cobs-dark);
}

/* Mobile Responsiveness */
@media screen and (max-width: 480px) {
	.cobs-chat-wrapper {
		bottom: 15px;
		right: 15px;
	}
	.cobs-chat-window {
		width: calc(100vw - 30px);
		height: calc(100vh - 120px);
		bottom: 70px;
	}
}
