:root {
	--riva93-accent: #c9a44c;
	--riva93-bg: #0d141d;
	--riva93-surface: #151d28;
	--riva93-text: #e8e4dc;
	--riva93-muted: rgba(232, 228, 220, .55);
	--riva93-line: rgba(201, 164, 76, .28);
	--riva93-wa: #25d366;
}

/* ---------- Launcher ---------- */

.riva93-launcher {
	position: fixed;
	bottom: 24px;
	z-index: 99998;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font-family: inherit;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.riva93-launcher--right { right: 24px; flex-direction: row; }
.riva93-launcher--left  { left: 24px;  flex-direction: row-reverse; }

.riva93-launcher__icon {
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: var(--riva93-wa);
	color: #fff;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .28);
	transition: transform .18s ease;
}

.riva93-launcher--small .riva93-launcher__icon { width: 48px; height: 48px; }
.riva93-launcher--large .riva93-launcher__icon { width: 68px; height: 68px; }

.riva93-launcher:hover .riva93-launcher__icon { transform: scale(1.06); }
.riva93-launcher:focus-visible { outline: none; }
.riva93-launcher:focus-visible .riva93-launcher__icon {
	outline: 2px solid var(--riva93-accent);
	outline-offset: 3px;
}

.riva93-launcher__label {
	padding: 9px 15px;
	border: 1px solid var(--riva93-line);
	border-radius: 3px;
	background: var(--riva93-bg);
	color: var(--riva93-text);
	font-size: 13px;
	letter-spacing: .14em;
	text-transform: uppercase;
	white-space: nowrap;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .22);
}

.riva93-launcher.is-open .riva93-launcher__icon { transform: rotate(90deg) scale(.92); }

/* ---------- Panel ---------- */

.riva93-overlay {
	position: fixed;
	inset: 0;
	z-index: 99998;
	background: rgba(4, 8, 13, .62);
	backdrop-filter: blur(2px);
	animation: riva93-fade .22s ease;
}

.riva93-panel {
	position: fixed;
	bottom: 96px;
	z-index: 99999;
	width: min(430px, calc(100vw - 32px));
	max-height: min(78vh, 720px);
	overflow-y: auto;
	border: 1px solid var(--riva93-line);
	border-radius: 4px;
	background: var(--riva93-bg);
	color: var(--riva93-text);
	box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
	animation: riva93-rise .26s cubic-bezier(.16, 1, .3, 1);
}

.riva93-panel--right { right: 24px; }
.riva93-panel--left  { left: 24px; }

.riva93-panel__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 24px 16px;
	border-bottom: 1px solid rgba(201, 164, 76, .16);
}

.riva93-panel__title {
	margin: 0;
	color: var(--riva93-accent);
	font-size: 15px;
	font-weight: 400;
	letter-spacing: .2em;
	text-transform: uppercase;
}

.riva93-panel__sub {
	margin: 8px 0 0;
	color: var(--riva93-muted);
	font-size: 13px;
	line-height: 1.5;
}

.riva93-close {
	flex: none;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 3px;
	background: none;
	color: var(--riva93-muted);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	transition: color .15s ease, border-color .15s ease;
}

.riva93-close:hover { color: var(--riva93-accent); border-color: var(--riva93-line); }

.riva93-panel__body { padding: 20px 24px 26px; }

/* ---------- Form ---------- */

.riva93-form__section { margin-bottom: 26px; }
.riva93-form__section:last-of-type { margin-bottom: 18px; }

.riva93-form__legend {
	margin: 0 0 14px;
	color: var(--riva93-accent);
	font-size: 12px;
	font-weight: 400;
	letter-spacing: .22em;
	text-transform: uppercase;
}

.riva93-grid {
	display: grid;
	gap: 14px;
	margin-bottom: 14px;
}

.riva93-grid:last-child { margin-bottom: 0; }
.riva93-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.riva93-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.riva93-field { display: flex; flex-direction: column; min-width: 0; }

.riva93-field label {
	margin-bottom: 7px;
	color: var(--riva93-accent);
	font-size: 10px;
	letter-spacing: .2em;
	text-transform: uppercase;
}

.riva93-field input,
.riva93-field select,
.riva93-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 12px;
	border: 1px solid rgba(201, 164, 76, .22);
	border-radius: 2px;
	background: var(--riva93-surface);
	color: var(--riva93-text);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
	transition: border-color .15s ease;
	appearance: none;
	-webkit-appearance: none;
}

.riva93-field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23c9a44c' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 11px;
	padding-right: 32px;
}

.riva93-field textarea { resize: vertical; min-height: 76px; }

.riva93-field input:focus,
.riva93-field select:focus,
.riva93-field textarea:focus {
	outline: none;
	border-color: var(--riva93-accent);
}

.riva93-field input::placeholder,
.riva93-field textarea::placeholder { color: rgba(232, 228, 220, .35); }

.riva93-field.has-error input,
.riva93-field.has-error select,
.riva93-field.has-error textarea { border-color: #d4574a; }

.riva93-error {
	display: none;
	margin-top: 5px;
	color: #e08379;
	font-size: 11px;
	line-height: 1.4;
}

.riva93-field.has-error .riva93-error { display: block; }

.riva93-toggle-message {
	margin: 2px 0 12px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--riva93-text);
	font-family: inherit;
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 4px;
	cursor: pointer;
}

.riva93-toggle-message:hover { color: var(--riva93-accent); }

.riva93-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.riva93-submit {
	width: 100%;
	padding: 15px 20px;
	border: 0;
	border-radius: 2px;
	background: var(--riva93-accent);
	color: #10161f;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: .2em;
	text-transform: uppercase;
	cursor: pointer;
	transition: filter .15s ease;
}

.riva93-submit:hover { filter: brightness(1.08); }
.riva93-submit:disabled { opacity: .6; cursor: default; }

.riva93-status {
	margin: 12px 0 0;
	min-height: 18px;
	color: var(--riva93-muted);
	font-size: 12.5px;
	line-height: 1.5;
	text-align: center;
}

.riva93-status.is-success { color: var(--riva93-wa); }
.riva93-status.is-error { color: #e08379; }

/* ---------- Inline (shortcode) ---------- */

.riva93-inline {
	padding: 32px;
	border: 1px solid rgba(201, 164, 76, .18);
	border-radius: 4px;
	background: var(--riva93-bg);
	color: var(--riva93-text);
}

.riva93-inline .riva93-form__legend { font-size: 13px; margin-bottom: 18px; }
.riva93-inline .riva93-submit { width: auto; min-width: 260px; }

/* ---------- Shortcode buttons ---------- */

.riva93-btn-wrap { display: block; }

.riva93-btn {
	display: inline-block;
	border: 1px solid var(--riva93-accent);
	border-radius: 2px;
	font-family: inherit;
	font-weight: 500;
	letter-spacing: .2em;
	text-transform: uppercase;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: filter .15s ease, background-color .15s ease, color .15s ease;
}

.riva93-btn--solid {
	background: var(--riva93-accent);
	color: #10161f;
}

.riva93-btn--solid:hover { filter: brightness(1.08); }

.riva93-btn--outline {
	background: transparent;
	color: var(--riva93-accent);
}

.riva93-btn--outline:hover {
	background: var(--riva93-accent);
	color: #10161f;
}

.riva93-btn--link {
	padding: 0 !important;
	border: 0;
	background: none;
	color: var(--riva93-accent);
	letter-spacing: .1em;
	text-decoration: underline;
	text-underline-offset: 5px;
}

.riva93-btn--link:hover { filter: brightness(1.15); }

.riva93-btn--small  { padding: 11px 22px; font-size: 11px; }
.riva93-btn--medium { padding: 15px 34px; font-size: 12.5px; }
.riva93-btn--large  { padding: 18px 46px; font-size: 14px; }

.riva93-btn--full { display: block; width: 100%; }

.riva93-btn:focus-visible {
	outline: 2px solid var(--riva93-accent);
	outline-offset: 3px;
}

/* ---------- Visibility ---------- */

@media (max-width: 782px) {
	.riva93-hide-mobile { display: none !important; }

	.riva93-launcher { bottom: 18px; }
	.riva93-launcher--right { right: 18px; }
	.riva93-launcher--left { left: 18px; }
	.riva93-launcher__label { display: none; }

	.riva93-panel {
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		max-height: 88vh;
		border-radius: 10px 10px 0 0;
		border-left: 0;
		border-right: 0;
		border-bottom: 0;
	}

	.riva93-panel__body { padding: 18px 18px 26px; }
	.riva93-panel__head { padding: 20px 18px 14px; }
	.riva93-grid--3 { grid-template-columns: 1fr 1fr; }
	.riva93-grid--3 .riva93-field:first-child { grid-column: 1 / -1; }
	.riva93-grid--2 { grid-template-columns: 1fr; }
	.riva93-inline { padding: 20px; }
	.riva93-inline .riva93-submit { width: 100%; min-width: 0; }
}

@media (min-width: 783px) {
	.riva93-hide-desktop { display: none !important; }
}

@keyframes riva93-rise {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: translateY(0); }
}

@keyframes riva93-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.riva93-panel,
	.riva93-overlay { animation: none; }
	.riva93-launcher__icon { transition: none; }
}
