/**
 * iBreathe Random Selector — front-end styles
 *
 * File:   ibr-random-selector.css
 * Folder: blocksy-child/modules/ibr-random-selector/
 * Loaded: only on the page containing [ibr_random_selector]
 *
 * Deliberately light: fonts, colours and buttons are inherited from the theme
 * so the page looks like the rest of the site. All classes are ibr-rs-*.
 */

.ibr-rs {
	max-width: 640px;
	margin: 0 auto;
}

.ibr-rs-msg {
	margin: 0 0 16px;
}

.ibr-rs-notice {
	padding: 10px 14px;
	border-left: 3px solid #b32d2e;
	background: rgba(179, 45, 46, 0.06);
}

.ibr-rs-error {
	color: #b32d2e;
}

/* Admin-authored intro / description (rich HTML: headings, lists, small print). */
.ibr-rs-intro {
	margin: 0 0 20px;
}

.ibr-rs-intro ul,
.ibr-rs-intro ol {
	margin: 0 0 1em 1.25em;
	padding-left: 1em;
}

.ibr-rs-intro ul {
	list-style: disc;
}

.ibr-rs-intro ol {
	list-style: decimal;
}

.ibr-rs-intro li {
	margin: 0.25em 0;
}

.ibr-rs-intro small {
	color: #666;
}

/* The "rolling" moment: a gentle pulse on the text while we wait. */
.ibr-rs-rolling {
	margin: 24px 0;
	font-size: 1.25em;
	font-weight: 600;
	text-align: center;
	animation: ibr-rs-pulse 0.8s ease-in-out infinite alternate;
}

@keyframes ibr-rs-pulse {
	from { opacity: 0.35; }
	to   { opacity: 1; }
}

.ibr-rs-title {
	margin: 0 0 12px;
}

.ibr-rs-list {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
}

.ibr-rs-item {
	padding: 12px 0;
	border-bottom: 1px solid rgba(128, 128, 128, 0.25);
}

.ibr-rs-item-head {
	display: flex;
	align-items: center;
	gap: 14px;
}

.ibr-rs-item img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	flex: 0 0 64px;
}

.ibr-rs-name {
	flex: 1 1 auto;
	font-weight: 600;
}

/* Per-product option dropdowns (strength, flavour, etc.). */
.ibr-rs-options {
	margin: 10px 0 0;
	padding-left: 78px; /* line up under the product name, past the image */
}

.ibr-rs-option {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 8px;
}

.ibr-rs-option label {
	flex: 0 0 auto;
	font-weight: 600;
	min-width: 120px;
}

.ibr-rs-option select {
	flex: 1 1 auto;
	max-width: 260px;
}

.ibr-rs-total {
	margin: 0 0 16px;
	font-weight: 600;
}

/* Add button while options are still incomplete. */
.ibr-rs-add[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

@media (max-width: 480px) {
	.ibr-rs-options {
		padding-left: 0;
	}
	.ibr-rs-option {
		flex-wrap: wrap;
		gap: 4px;
	}
	.ibr-rs-option label {
		flex-basis: 100%;
		min-width: 0;
	}
	.ibr-rs-option select {
		max-width: 100%;
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ibr-rs-rolling {
		animation: none;
	}
}
