/* Rainbow Bridge Memorials — inherits theme fonts; override the vars to match your brand */
.rbm-memorial,
.rbm-wall,
.rbm-submit {
	--rbm-accent: #7a6fd0;
	--rbm-accent-ink: #fff;
	--rbm-soft: #f7f5fd;
	--rbm-border: #e6e2f5;
	--rbm-muted: #6b6880;
	--rbm-radius: 14px;
}

/* ---------- Hero: photo inside the rainbow ---------- */
.rbm-hero {
	position: relative;
	max-width: 420px;
	margin: 0 auto 0.5rem;
	aspect-ratio: 300 / 220;
}
.rbm-rainbow {
	display: block;
	width: 100%;
	height: auto;
}
.rbm-hero .rbm-rainbow {
	position: absolute;
	inset: 0;
	height: 100%;
}
.rbm-photo {
	position: absolute;
	left: 50%;
	top: 68.18%;
	width: 36%;
	aspect-ratio: 1;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	overflow: hidden;
	border: 4px solid #fff;
	box-shadow: 0 6px 24px rgba(60, 50, 120, 0.18);
	background: var(--rbm-soft);
}
.rbm-photo img,
.rbm-card-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
}
.rbm-photo-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: var(--rbm-border);
	background: var(--rbm-soft);
}
.rbm-photo-placeholder svg {
	width: 45%;
	height: 45%;
}

/* ---------- Intro ---------- */
.rbm-intro {
	text-align: center;
	margin-bottom: 2rem;
}
.rbm-intro p {
	margin: 0.25rem 0;
}
.rbm-dates {
	font-size: 1.05em;
	letter-spacing: 0.02em;
}
.rbm-sep {
	margin: 0 0.5em;
	color: var(--rbm-accent);
}
.rbm-crossed {
	font-style: italic;
	color: var(--rbm-muted);
}
.rbm-meta,
.rbm-family {
	color: var(--rbm-muted);
	font-size: 0.95em;
}

/* ---------- Sections ---------- */
.rbm-section {
	margin: 2rem 0;
}
.rbm-h {
	font-size: 1.3em;
	margin: 0 0 0.75rem;
}
.rbm-favorites ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
}
.rbm-favorites li {
	background: var(--rbm-soft);
	border: 1px solid var(--rbm-border);
	border-radius: 999px;
	padding: 0.3em 0.9em;
	margin: 0;
}
.rbm-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 0.5rem;
}
.rbm-gallery-grid a {
	display: block;
	aspect-ratio: 1;
	border-radius: 10px;
	overflow: hidden;
}
.rbm-gallery-grid img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}
.rbm-gallery-grid a:hover img {
	transform: scale(1.04);
}

/* ---------- Buttons ---------- */
.rbm-btn {
	display: inline-block;
	background: var(--rbm-accent);
	color: var(--rbm-accent-ink);
	border: 0;
	border-radius: 999px;
	padding: 0.7em 1.4em;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s;
}
.rbm-btn:hover {
	opacity: 0.9;
}
.rbm-btn:disabled {
	opacity: 0.65;
	cursor: default;
}
.rbm-link {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: var(--rbm-accent);
	text-decoration: underline;
	cursor: pointer;
}

/* ---------- Candle ---------- */
.rbm-candle {
	text-align: center;
	background: var(--rbm-soft);
	border: 1px solid var(--rbm-border);
	border-radius: var(--rbm-radius);
	padding: 1.75rem 1rem 1.25rem;
}
.rbm-candle-art {
	position: relative;
	width: 40px;
	height: 92px;
	margin: 0 auto 1rem;
}
.rbm-wax {
	position: absolute;
	bottom: 0;
	left: 4px;
	width: 32px;
	height: 56px;
	border-radius: 6px 6px 4px 4px;
	background: linear-gradient(90deg, #fbf6ea, #fff 45%, #efe6d2);
	box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.04);
}
.rbm-wick {
	position: absolute;
	bottom: 56px;
	left: 19px;
	width: 2px;
	height: 8px;
	background: #3b3326;
	border-radius: 1px;
}
.rbm-flame {
	position: absolute;
	bottom: 60px;
	left: 12px;
	width: 16px;
	height: 28px;
	border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%;
	background: radial-gradient(ellipse at 50% 80%, #fff7c2 0%, #ffd36b 40%, #ff9d3c 75%, rgba(255, 120, 40, 0) 100%);
	transform-origin: 50% 90%;
	opacity: 0;
	transform: scale(0.3);
	transition: opacity 0.5s, transform 0.5s;
}
.rbm-glow {
	position: absolute;
	bottom: 48px;
	left: -30px;
	width: 100px;
	height: 60px;
	border-radius: 50%;
	background: radial-gradient(ellipse, rgba(255, 210, 110, 0.45), rgba(255, 210, 110, 0) 70%);
	opacity: 0;
	transition: opacity 0.6s;
}
.rbm-candle.is-lit .rbm-flame {
	opacity: 1;
	transform: scale(1);
	animation: rbm-flicker 2.4s ease-in-out infinite;
}
.rbm-candle.is-lit .rbm-glow {
	opacity: 1;
}
@keyframes rbm-flicker {
	0%, 100% { transform: scale(1) rotate(-1deg); }
	25% { transform: scale(1.05, 0.96) rotate(1.5deg); }
	50% { transform: scale(0.97, 1.04) rotate(-1.5deg); }
	75% { transform: scale(1.03, 0.98) rotate(1deg); }
}
.rbm-candle-count {
	margin: 0.75rem 0 0;
	color: var(--rbm-muted);
	font-size: 0.95em;
}
.rbm-candle-count-num {
	font-weight: 700;
	color: inherit;
}

.rbm-share {
	display: flex;
	justify-content: center;
	gap: 1.5rem;
	margin: 1rem 0 2rem;
	font-size: 0.95em;
}
.rbm-note {
	color: var(--rbm-muted);
	font-size: 0.9em;
}

/* ---------- Wall ---------- */
.rbm-wall-head {
	max-width: 260px;
	margin: 0 auto;
}
.rbm-wall-head .rbm-rainbow {
	margin-bottom: -20%;
}
.rbm-wall-intro {
	text-align: center;
	max-width: 640px;
	margin: 0 auto 1.5rem;
	color: var(--rbm-muted);
}
.rbm-search {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	margin-bottom: 1.75rem;
}
.rbm-search input[type="search"],
.rbm-search select {
	padding: 0.6em 0.9em;
	border: 1px solid var(--rbm-border);
	border-radius: 999px;
	font: inherit;
	min-width: 200px;
}
.rbm-grid-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 1.25rem;
}
.rbm-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.2rem;
	padding: 1.25rem 0.75rem 1rem;
	border: 1px solid var(--rbm-border);
	border-radius: var(--rbm-radius);
	background: #fff;
	color: inherit;
	text-decoration: none !important;
	transition: transform 0.2s, box-shadow 0.2s;
}
.rbm-card:hover,
.rbm-card:focus-visible {
	transform: translateY(-3px);
	box-shadow: 0 10px 28px rgba(60, 50, 120, 0.12);
}
.rbm-card-photo {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	overflow: hidden;
	margin-bottom: 0.6rem;
	border: 3px solid transparent;
	background:
		linear-gradient(#fff, #fff) padding-box,
		conic-gradient(#f4a6a6, #f8c99a, #f7e59b, #b6e2a8, #a8d4f0, #b5b8ee, #d6b3e8, #f4a6a6) border-box;
}
.rbm-card-name {
	font-weight: 700;
	font-size: 1.05em;
}
.rbm-card-years,
.rbm-card-candles {
	color: var(--rbm-muted);
	font-size: 0.9em;
}
.rbm-pagination {
	display: flex;
	justify-content: center;
	gap: 0.4rem;
	margin-top: 2rem;
}
.rbm-pagination .page-numbers {
	padding: 0.35em 0.75em;
	border-radius: 8px;
	text-decoration: none;
}
.rbm-pagination .current {
	background: var(--rbm-accent);
	color: var(--rbm-accent-ink);
}
.rbm-empty {
	text-align: center;
	color: var(--rbm-muted);
}

/* ---------- Submission form ---------- */
.rbm-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.3rem;
}
.rbm-form input[type="text"],
.rbm-form input[type="email"],
.rbm-form input[type="date"],
.rbm-form select,
.rbm-form textarea {
	width: 100%;
	padding: 0.6em 0.8em;
	border: 1px solid var(--rbm-border);
	border-radius: 8px;
	font: inherit;
	box-sizing: border-box;
}
.rbm-form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0 1.25rem;
}
.rbm-check label {
	font-weight: 400;
}
.rbm-hp {
	position: absolute !important;
	left: -9999px !important;
	height: 1px;
	overflow: hidden;
}
.rbm-alert {
	padding: 1rem 1.25rem;
	border-radius: 10px;
	margin-bottom: 1.25rem;
}
.rbm-alert-success {
	background: #eef8ec;
	border: 1px solid #b6e2a8;
}
.rbm-alert-error {
	background: #fdf0f0;
	border: 1px solid #f4a6a6;
}

@media (prefers-reduced-motion: reduce) {
	.rbm-candle.is-lit .rbm-flame { animation: none; }
	.rbm-card, .rbm-gallery-grid img { transition: none; }
}

/* ---------- Family manage page ---------- */
.rbm-manage-head {
	text-align: center;
	margin-bottom: 1.5rem;
}
.rbm-status {
	display: inline-block;
	padding: 0.3em 0.9em;
	border-radius: 999px;
	font-size: 0.85em;
	font-weight: 600;
	background: var(--rbm-soft);
	border: 1px solid var(--rbm-border);
}
.rbm-status-pending {
	background: #fff8e6;
	border-color: #f7e59b;
}
.rbm-status-publish {
	background: #eef8ec;
	border-color: #b6e2a8;
}
.rbm-fieldset {
	border: 1px solid var(--rbm-border);
	border-radius: var(--rbm-radius);
	padding: 1rem 1.25rem 1.25rem;
	margin: 0 0 1.25rem;
}
.rbm-fieldset legend {
	font-weight: 600;
	padding: 0 0.4em;
}
.rbm-thumb-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}
.rbm-thumb-row img {
	width: 96px;
	height: 96px;
	object-fit: cover;
	border-radius: 10px;
	display: block;
}
.rbm-form .rbm-thumb {
	font-weight: 400;
	font-size: 0.85em;
	text-align: center;
}
.rbm-thumb span {
	display: block;
	margin-top: 0.3rem;
}
.rbm-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}
.rbm-btn-secondary {
	background: transparent;
	color: var(--rbm-accent);
	box-shadow: inset 0 0 0 2px var(--rbm-accent);
}
.rbm-preview {
	margin-top: 3rem;
	padding: 1.5rem;
	border: 2px dashed var(--rbm-border);
	border-radius: var(--rbm-radius);
}
.rbm-preview > .rbm-h {
	text-align: center;
	color: var(--rbm-muted);
	font-size: 1em;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.rbm-preview-name {
	margin: 0 0 0.5rem;
}

/* ---------- Memoriam: honor / donate ---------- */
.rbm-tribute-block + .rbm-tribute-block {
	margin-top: 1.75rem;
}
.rbm-tribute-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 0.75rem;
}
.rbm-tribute-card {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	padding: 1rem 1.1rem;
	border: 1px solid var(--rbm-border);
	border-radius: var(--rbm-radius);
	background: #fff;
	color: inherit;
	text-decoration: none !important;
	transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.rbm-tribute-card:hover,
.rbm-tribute-card:focus-visible {
	transform: translateY(-2px);
	border-color: var(--rbm-accent);
	box-shadow: 0 8px 22px rgba(60, 50, 120, 0.1);
}
.rbm-tribute-donate .rbm-tribute-card {
	border-left: 4px solid #b6e2a8;
}
.rbm-tribute-honor .rbm-tribute-card {
	border-left: 4px solid #b5b8ee;
}
.rbm-tribute-name {
	font-weight: 700;
	color: var(--rbm-accent);
}
.rbm-tribute-desc {
	color: var(--rbm-muted);
	font-size: 0.92em;
}

/* Picker (family page) */
.rbm-tribute-group-label {
	margin: 0.75rem 0 0.25rem;
}
.rbm-form .rbm-tribute-option {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	font-weight: 400;
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--rbm-border);
	cursor: pointer;
}
.rbm-tribute-option input {
	margin-top: 0.3em;
}
.rbm-tribute-option-name {
	font-weight: 600;
}
.rbm-tribute-option small {
	display: block;
	color: var(--rbm-muted);
}
.rbm-tribute-option.is-disabled {
	opacity: 0.5;
	cursor: default;
}

/* ---------- Sharing switch (family page) ---------- */
.rbm-share-box {
	background: var(--rbm-soft);
}
.rbm-form .rbm-switch {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	cursor: pointer;
	margin-bottom: 0.6rem;
}
.rbm-switch input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.rbm-switch-track {
	flex: none;
	position: relative;
	width: 52px;
	height: 30px;
	border-radius: 999px;
	background: #c9c6d6;
	transition: background 0.2s;
}
.rbm-switch-track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s;
}
.rbm-switch input:checked + .rbm-switch-track {
	background: #4a9d5b;
}
.rbm-switch input:checked + .rbm-switch-track::after {
	transform: translateX(22px);
}
.rbm-switch input:focus-visible + .rbm-switch-track {
	outline: 2px solid var(--rbm-accent);
	outline-offset: 2px;
}
