/*
 * Bookshelf Configurator styles.
 * Palette matches the site's existing warm wood-tone identity
 * (brown/tan, seen in the homepage wood-type circles); verify final
 * hex values against bemida.css variables once reviewed live and
 * adjust if the theme defines its own custom properties.
 */

.bmd-bookshelf-page {
	direction: rtl;
	padding: 40px 20px 80px;
	max-width: 1200px;
	margin: 0 auto;
	font-family: inherit;
}

.bmd-bookshelf-title {
	font-size: 32px;
	color: #4a3323;
	margin-bottom: 8px;
}

.bmd-bookshelf-subtitle {
	color: #7a6a5a;
	margin-bottom: 32px;
}

.bmd-bookshelf-layout {
	display: flex;
	gap: 40px;
	align-items: flex-start;
	flex-wrap: wrap;
}

.bmd-bookshelf-visual-col {
	flex: 1 1 420px;
	position: sticky;
	top: 20px;
}

.bmd-bookshelf-visual-frame {
	background: #fbf8f3;
	border: 1px solid #e4d9c9;
	border-radius: 12px;
	padding: 12px;
	text-align: center;
}

#bmd-bookshelf-canvas {
	max-width: 100%;
	height: auto;
	cursor: pointer;
}

.bmd-bookshelf-visual-hint {
	color: #a08f7a;
	font-size: 13px;
	margin-top: 8px;
}

.bmd-bookshelf-form-col {
	flex: 1 1 420px;
	min-width: 0;
}

.bmd-step {
	background: #fff;
	border: 1px solid #ece3d6;
	border-radius: 10px;
	padding: 20px;
	margin-bottom: 16px;
}

.bmd-step-title {
	font-size: 17px;
	color: #4a3323;
	margin: 0 0 14px;
}

.bmd-field-row {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.bmd-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 13px;
	color: #6b5a48;
	flex: 1 1 100px;
}

.bmd-field input,
.bmd-field select,
#bmd-shipping-code {
	padding: 8px 10px;
	border: 1px solid #d8cbb8;
	border-radius: 6px;
	font-size: 14px;
	background: #fff;
}

.bmd-range-hint {
	color: #a08f7a;
	font-size: 12px;
	font-weight: normal;
}

.bmd-field.bmd-field-invalid input,
.bmd-field.bmd-field-invalid select {
	border-color: #c33;
	background: #fff7f7;
}

.bmd-field-invalid {
	outline: 1px solid #c33;
	border-radius: 6px;
}

.bmd-field-error-msg {
	color: #a33;
	font-size: 12px;
	margin: 4px 0 0;
}

.bmd-stepper {
	display: flex;
	align-items: center;
	gap: 16px;
}

.bmd-stepper-btn {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid #6b4a34;
	background: #fff;
	color: #6b4a34;
	font-size: 18px;
	font-weight: bold;
	cursor: pointer;
	line-height: 1;
}

.bmd-stepper-btn:hover {
	background: #f3e9db;
}

#bmd-columns-value {
	font-size: 20px;
	font-weight: bold;
	min-width: 24px;
	text-align: center;
}

.bmd-hint-text {
	color: #a08f7a;
	font-size: 13px;
	margin-top: 10px;
}

.bmd-shelves-per-column {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.bmd-shelf-col-stepper {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #faf6ef;
	border: 1px solid #ece3d6;
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 13px;
}

.bmd-shelf-col-stepper .bmd-stepper-btn {
	width: 26px;
	height: 26px;
	font-size: 14px;
}

.bmd-shelf-count {
	min-width: 18px;
	text-align: center;
	font-weight: bold;
}

.bmd-radio-row {
	display: flex;
	gap: 20px;
}

.bmd-radio-row label,
.bmd-checkbox-row {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-size: 14px;
	color: #4a3323;
}

.bmd-checkbox-row {
	margin-top: 14px;
}

.bmd-door-options,
.bmd-material-sub-block,
.bmd-floor-block {
	margin-top: 14px;
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.bmd-material-options {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.bmd-material-card {
	border: 1px solid #d8cbb8;
	border-radius: 8px;
	padding: 12px 16px;
	cursor: pointer;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.bmd-material-card:has( input:checked ) {
	border-color: #6b4a34;
	background: #f3e9db;
}

.bmd-color-options,
.bmd-finish-options {
	display: inline-block;
	margin-inline-end: 12px;
}

.bmd-price-section {
	text-align: center;
	background: #f3e9db;
}

.bmd-price-errors {
	background: #fbeaea;
	color: #a33;
	border: 1px solid #e5b8b8;
	border-radius: 6px;
	padding: 10px 14px;
	margin-bottom: 14px;
	font-size: 13px;
}

.bmd-selection-swatch {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-bottom: 14px;
}

.bmd-swatch-box {
	width: 40px;
	height: 40px;
	border-radius: 6px;
	border: 1px solid #d8cbb8;
	background: #f7f1e8;
	flex-shrink: 0;
}

.bmd-swatch-label {
	font-size: 14px;
	color: #4a3323;
}

.bmd-price-display {
	font-size: 15px;
	color: #4a3323;
	margin-bottom: 16px;
}

#bmd-price-total {
	font-size: 26px;
	margin-inline-start: 8px;
	color: #6b4a34;
}

.bmd-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

.bmd-btn {
	padding: 12px 28px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: bold;
	cursor: pointer;
	border: none;
	text-decoration: none;
	display: inline-block;
}

.bmd-btn-primary {
	background: #6b4a34;
	color: #fff;
}

.bmd-btn-primary:hover {
	background: #573a28;
}

.bmd-btn-secondary {
	background: transparent;
	color: #6b4a34;
	border: 1px solid #6b4a34;
}

.bmd-btn-secondary:hover {
	background: #f3e9db;
}

@media ( max-width: 768px ) {
	.bmd-bookshelf-layout {
		flex-direction: column;
	}
	.bmd-bookshelf-visual-col {
		position: static;
		width: 100%;
	}
}
