/* Ritz Valley Chatbot | styled to match ritzvalley.net (forest green, bronze, cream; Marcellus + Jost).
   Everything is scoped under #rvc-widget so theme styles do not leak in or out. */
#rvc-widget {
	--rvc-primary: #de9658;       /* bronze, top of gradient (same as BOOK NOW) */
	--rvc-primary-dark: #b46f35;  /* bronze, bottom of gradient */
	--rvc-header: #043830;        /* forest green */
	--rvc-gold: #c39353;
	--rvc-gold-soft: #eadfc6;
	--rvc-ink: #2b2620;
	--rvc-ink-dim: rgba(43, 38, 32, .6);
	--rvc-line: rgba(43, 38, 32, .14);
	--rvc-cream: #f3ede0;
	--rvc-paper: #fffefe;
	--rvc-serif: 'Marcellus', 'Cormorant Garamond', Georgia, serif;
	--rvc-sans: 'Jost', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	position: fixed;
	bottom: 90px;
	right: 30px;
	z-index: 99999;
	font-family: var(--rvc-sans);
	font-size: 14px;
	line-height: 1.45;
	color: var(--rvc-ink);
	-webkit-font-smoothing: antialiased;
}
#rvc-widget *, #rvc-widget *::before, #rvc-widget *::after { box-sizing: border-box; }
#rvc-widget [hidden] { display: none !important; }
#rvc-widget button { font-family: inherit; text-transform: none; letter-spacing: normal; margin: 0; line-height: 1; min-height: 0; }
#rvc-widget p { margin: 0; }
#rvc-widget .rvc-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Launcher: white round button with the resort emblem ---------- */
#rvc-widget .rvc-launcher {
	position: relative;
	width: 64px; height: 64px; min-width: 64px; padding: 0;
	display: flex; align-items: center; justify-content: center;
	border: 1px solid rgba(195, 147, 83, .45); border-radius: 50%; cursor: pointer;
	background: #fff; color: var(--rvc-primary-dark);
	box-shadow: 0 10px 26px -8px rgba(43, 38, 32, .45), 0 2px 6px rgba(43, 38, 32, .12);
	transition: transform .25s ease, box-shadow .25s ease;
}
#rvc-widget .rvc-launcher:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 30px -8px rgba(43, 38, 32, .5), 0 2px 6px rgba(43, 38, 32, .12); }
#rvc-widget .rvc-launcher:focus-visible { outline: 2px solid var(--rvc-header); outline-offset: 3px; }
#rvc-widget .rvc-launcher-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; }
#rvc-widget .rvc-launcher-icon img { width: 44px; height: 44px; object-fit: contain; display: block; border: 0; max-width: none; }
#rvc-widget .rvc-launcher::after {
	content: ''; position: absolute; inset: -1px; border-radius: 50%; pointer-events: none;
	animation: rvc-ring 2.6s ease-out infinite;
}
@keyframes rvc-ring {
	0%   { box-shadow: 0 0 0 0 rgba(195, 147, 83, .45); }
	70%  { box-shadow: 0 0 0 14px rgba(195, 147, 83, 0); }
	100% { box-shadow: 0 0 0 0 rgba(195, 147, 83, 0); }
}

/* ---------- Panel ---------- */
#rvc-widget .rvc-panel {
	position: absolute; bottom: 0; right: 0;
	width: 370px; height: 560px; max-height: calc(100vh - 110px);
	background: var(--rvc-paper);
	border-radius: 22px;
	border: 1px solid var(--rvc-line);
	box-shadow: 0 30px 60px -20px rgba(4, 56, 48, .45), 0 8px 24px -12px rgba(43, 38, 32, .25);
	display: flex; flex-direction: column; overflow: hidden;
	animation: rvc-rise .35s cubic-bezier(.2, .8, .2, 1);
}
#rvc-widget.rvc-left .rvc-panel { right: auto; left: 0; }
@keyframes rvc-rise { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

#rvc-widget .rvc-header {
	background: var(--rvc-header);
	background-image: radial-gradient(120% 140% at 100% 0%, rgba(195, 147, 83, .22) 0%, rgba(195, 147, 83, 0) 55%);
	color: #fff; padding: 16px 16px 16px 18px;
	display: flex; justify-content: space-between; align-items: center;
	border-bottom: 1px solid rgba(195, 147, 83, .35);
}
#rvc-widget .rvc-header-info { display: flex; align-items: center; gap: 12px; }
#rvc-widget .rvc-avatar {
	width: 42px; height: 42px; border-radius: 50%; flex: 0 0 42px;
	display: flex; align-items: center; justify-content: center;
	font-family: var(--rvc-serif); font-size: 15px; letter-spacing: 1px;
	color: var(--rvc-gold-soft);
	border: 1px solid rgba(234, 223, 198, .55);
	background: rgba(255, 255, 255, .06);
}
#rvc-widget .rvc-avatar img { width: 28px; height: 28px; object-fit: contain; display: block; border: 0; max-width: none; }
#rvc-widget .rvc-avatar:has(img) { background: var(--rvc-paper); border-color: rgba(195, 147, 83, .6); }
#rvc-widget .rvc-title { font-family: var(--rvc-serif); font-size: 18px; font-weight: 400; color: #efdda8; letter-spacing: .3px; line-height: 1.2; }
#rvc-widget .rvc-status { font-size: 11.5px; color: rgba(255, 255, 255, .72); display: flex; align-items: center; gap: 6px; margin-top: 3px; }
#rvc-widget .rvc-dot { width: 7px; height: 7px; border-radius: 50%; background: #7fd49b; box-shadow: 0 0 0 3px rgba(127, 212, 155, .18); }
#rvc-widget .rvc-icon-btn {
	background: none; border: none; color: rgba(255, 255, 255, .8); cursor: pointer;
	padding: 7px; border-radius: 50%; line-height: 0;
}
#rvc-widget .rvc-icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .1); }

/* ---------- Messages ---------- */
#rvc-widget .rvc-messages {
	flex: 1; overflow-y: auto; padding: 16px 16px 10px;
	background: linear-gradient(180deg, #faf6ee 0%, var(--rvc-paper) 100%);
	display: flex; flex-direction: column; gap: 10px;
	overscroll-behavior: contain;
}
#rvc-widget .rvc-eyebrow {
	display: flex; align-items: center; gap: 10px; justify-content: center;
	font-size: 10.5px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--rvc-gold);
	margin: 2px 0 4px;
}
#rvc-widget .rvc-eyebrow::before, #rvc-widget .rvc-eyebrow::after { content: ''; height: 1px; width: 26px; background: currentColor; opacity: .7; }
#rvc-widget .rvc-msg { display: flex; flex-direction: column; }
#rvc-widget .rvc-bot { align-items: flex-start; }
#rvc-widget .rvc-user { align-items: flex-end; }
#rvc-widget .rvc-bubble {
	max-width: 86%; padding: 10px 14px; border-radius: 16px;
	font-size: 13.5px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere;
}
#rvc-widget .rvc-bot .rvc-bubble {
	background: #fff; color: var(--rvc-ink);
	border: 1px solid var(--rvc-line); border-bottom-left-radius: 5px;
	box-shadow: 0 2px 8px -6px rgba(43, 38, 32, .35);
}
#rvc-widget .rvc-user .rvc-bubble { background: var(--rvc-header); color: #f5f0e4; border-bottom-right-radius: 5px; }
#rvc-widget .rvc-time { font-size: 10px; color: var(--rvc-ink-dim); margin-top: 4px; padding: 0 4px; }

#rvc-widget .rvc-chips { display: flex; flex-wrap: wrap; gap: 6px; max-width: 94%; }
#rvc-widget .rvc-chip {
	background: #fff; border: 1px solid rgba(195, 147, 83, .7); color: #8a5a2b;
	border-radius: 16px; padding: 7px 12px; font-size: 12.5px; line-height: 1.3;
	cursor: pointer; text-align: left; transition: background .2s, color .2s, border-color .2s;
}
#rvc-widget .rvc-chip:hover, #rvc-widget .rvc-chip:focus-visible { background: var(--rvc-header); border-color: var(--rvc-header); color: #fff; outline: none; }

/* ---------- Lead form ---------- */
#rvc-widget .rvc-form { padding: 14px 16px 16px; background: var(--rvc-paper); border-top: 1px solid var(--rvc-line); display: flex; flex-direction: column; gap: 9px; }
#rvc-widget .rvc-form-intro { font-size: 12px; color: var(--rvc-ink-dim); }
#rvc-widget .rvc-field, #rvc-widget .rvc-input {
	width: 100%; margin: 0; padding: 11px 14px; height: auto;
	border: 1px solid var(--rvc-line); border-radius: 12px;
	background: #fff; color: var(--rvc-ink);
	font: inherit; font-size: 13.5px; box-shadow: none; outline: none;
	transition: border-color .2s, box-shadow .2s;
}
#rvc-widget .rvc-field::placeholder, #rvc-widget .rvc-input::placeholder { color: rgba(43, 38, 32, .45); }
#rvc-widget .rvc-field:focus, #rvc-widget .rvc-input:focus { border-color: var(--rvc-gold); box-shadow: 0 0 0 3px rgba(195, 147, 83, .18); }
#rvc-widget .rvc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
#rvc-widget .rvc-error { color: #a3281c; font-size: 12px; }
#rvc-widget .rvc-error:empty { display: none; }
#rvc-widget .rvc-submit {
	width: 100%; padding: 14px; margin-top: 2px; border: none; border-radius: 20px; cursor: pointer;
	background: linear-gradient(180deg, var(--rvc-primary) 0%, var(--rvc-primary-dark) 100%);
	box-shadow: 0 8px 20px -8px rgba(180, 111, 53, .85), inset 0 1px 0 rgba(255, 255, 255, .4);
	color: #fff; font-size: 13px; font-weight: 600; letter-spacing: 2.1px; text-transform: uppercase;
	transition: transform .2s, filter .2s;
}
#rvc-widget .rvc-submit:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* ---------- Composer ---------- */
#rvc-widget .rvc-input-area { padding: 10px 14px 10px; background: var(--rvc-paper); border-top: 1px solid var(--rvc-line); }
#rvc-widget .rvc-input-row { display: flex; gap: 8px; align-items: center; margin: 0; }
#rvc-widget .rvc-input { flex: 1; border-radius: 24px; padding: 12px 16px; }
#rvc-widget .rvc-send {
	width: 44px; height: 44px; flex: 0 0 44px; padding: 0; border: none; border-radius: 50%; cursor: pointer;
	display: flex; align-items: center; justify-content: center; color: #fff;
	background: linear-gradient(180deg, var(--rvc-primary) 0%, var(--rvc-primary-dark) 100%);
	box-shadow: 0 4px 12px -4px rgba(180, 111, 53, .8);
	transition: transform .2s, filter .2s;
}
#rvc-widget .rvc-send:hover:not(:disabled) { transform: scale(1.06); filter: brightness(1.05); }
#rvc-widget .rvc-send:disabled { background: #d6cfc3; box-shadow: none; cursor: not-allowed; }
#rvc-widget .rvc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 0 6px; font-size: 11.5px; }
#rvc-widget .rvc-foot a { color: var(--rvc-header); text-decoration: none; font-weight: 500; letter-spacing: .3px; }
#rvc-widget .rvc-foot a:hover { text-decoration: underline; }
#rvc-widget .rvc-link { background: none; border: none; padding: 0; color: var(--rvc-ink-dim); font-size: 11.5px; cursor: pointer; text-decoration: underline; }

#rvc-widget .rvc-typing { display: flex; gap: 5px; padding: 2px 4px 10px; }
#rvc-widget .rvc-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--rvc-gold); animation: rvc-typing 1s infinite ease-in-out; }
#rvc-widget .rvc-typing span:nth-child(2) { animation-delay: .15s; }
#rvc-widget .rvc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes rvc-typing { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

#rvc-widget .rvc-messages::-webkit-scrollbar { width: 5px; }
#rvc-widget .rvc-messages::-webkit-scrollbar-track { background: transparent; }
#rvc-widget .rvc-messages::-webkit-scrollbar-thumb { background: rgba(195, 147, 83, .55); border-radius: 5px; }

/* ---------- Phones ---------- */
@media (max-width: 768px) {
	#rvc-widget .rvc-launcher { width: 56px; height: 56px; min-width: 56px; }
	#rvc-widget .rvc-launcher-icon, #rvc-widget .rvc-launcher-icon img { width: 38px; height: 38px; }
}
@media (max-width: 480px) {
	#rvc-widget .rvc-panel {
		position: fixed; left: 10px; right: 10px; bottom: 10px;
		width: auto; height: calc(100vh - 20px); height: min(600px, calc(100dvh - 20px)); max-height: none; border-radius: 20px;
	}
	#rvc-widget .rvc-field, #rvc-widget .rvc-input { font-size: 16px; } /* stops iOS zoom on focus */
}
@media (prefers-reduced-motion: reduce) {
	#rvc-widget .rvc-launcher::after, #rvc-widget .rvc-panel, #rvc-widget .rvc-typing span { animation: none; }
}
