/* Signature Ride Chat Widget
   Self-contained styles — variables redeclared here (not relying on
   the theme's) so this widget looks right even if the theme changes. */

#sr-chat-widget {
	--sr-chat-black: #0b0b0c;
	--sr-chat-charcoal: #16171a;
	--sr-chat-gold: #c9a768;
	--sr-chat-gold-light: #e8d5a3;
	--sr-chat-white: #f2f0ec;
	--sr-chat-gray: #9b9b94;

	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999999;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.sr-chat-bubble {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--sr-chat-gold);
	border: none;
	box-shadow: 0 6px 20px rgba(0,0,0,0.35);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	transition: transform 0.15s ease, background 0.2s ease;
}
.sr-chat-bubble:hover { transform: scale(1.05); background: var(--sr-chat-gold-light); }

.sr-chat-bubble-icon { font-size: 26px; line-height: 1; }
.sr-chat-icon-close { display: none; color: var(--sr-chat-black); }
.sr-chat-bubble[aria-expanded="true"] .sr-chat-icon-open { display: none; }
.sr-chat-bubble[aria-expanded="true"] .sr-chat-icon-close { display: block; }

.sr-chat-unread-dot {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #d64545;
	border: 2px solid var(--sr-chat-black);
}

.sr-chat-panel {
	position: absolute;
	right: 0;
	bottom: 76px;
	width: 340px;
	max-width: calc(100vw - 40px);
	max-height: 70vh;
	background: var(--sr-chat-charcoal);
	border: 1px solid rgba(242,240,236,0.12);
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(0,0,0,0.45);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.sr-chat-panel-header {
	background: var(--sr-chat-black);
	color: var(--sr-chat-white);
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid rgba(242,240,236,0.1);
}
.sr-chat-panel-header strong {
	display: block;
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 1.05rem;
}
.sr-chat-status {
	display: block;
	font-size: 0.78rem;
	color: var(--sr-chat-gray);
	margin-top: 2px;
}

.sr-chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 160px;
	max-height: 320px;
}

.sr-chat-message {
	max-width: 85%;
	padding: 9px 13px;
	border-radius: 8px;
	font-size: 0.92rem;
	line-height: 1.4;
	word-wrap: break-word;
}
.sr-chat-message-visitor {
	align-self: flex-end;
	background: var(--sr-chat-gold);
	color: var(--sr-chat-black);
	border-bottom-right-radius: 2px;
}
.sr-chat-message-agent {
	align-self: flex-start;
	background: rgba(242,240,236,0.08);
	color: var(--sr-chat-white);
	border-bottom-left-radius: 2px;
}
.sr-chat-welcome { font-style: italic; color: var(--sr-chat-gray); background: transparent; padding-left: 0; }

.sr-chat-precontact-form,
.sr-chat-message-form {
	border-top: 1px solid rgba(242,240,236,0.1);
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sr-chat-precontact-form input,
.sr-chat-precontact-form textarea,
.sr-chat-message-form textarea {
	background: var(--sr-chat-black);
	border: 1px solid rgba(242,240,236,0.15);
	color: var(--sr-chat-white);
	border-radius: 6px;
	padding: 8px 10px;
	font-family: inherit;
	font-size: 0.88rem;
	resize: none;
}
.sr-chat-precontact-form input:focus,
.sr-chat-precontact-form textarea:focus,
.sr-chat-message-form textarea:focus {
	outline: none;
	border-color: var(--sr-chat-gold);
}

.sr-chat-message-form {
	flex-direction: row;
	align-items: flex-end;
}
.sr-chat-message-form textarea { flex: 1; max-height: 80px; }

.sr-chat-send-btn {
	background: var(--sr-chat-gold);
	color: var(--sr-chat-black);
	border: none;
	border-radius: 6px;
	padding: 9px 14px;
	font-weight: 600;
	font-size: 0.85rem;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.2s ease;
}
.sr-chat-send-btn:hover { background: var(--sr-chat-gold-light); }

.sr-chat-closed-banner {
	text-align: center;
	font-size: 0.8rem;
	color: var(--sr-chat-gray);
	padding: 10px;
	border-top: 1px solid rgba(242,240,236,0.1);
}

@media (max-width: 480px) {
	#sr-chat-widget { right: 12px; bottom: 12px; }
	.sr-chat-panel { width: calc(100vw - 24px); bottom: 72px; }
}
