/* Shared "size-select" <details>/<summary> dropdown, used both in the
   /komponer step-2 sidebar (#step-b-left-sidebar) and the /bestill order
   form (.stone-size-select). Plain <details> + radio inputs; no business
   logic wired in beyond reflecting the selection in the trigger.
   Loaded directly on both pages (not through a mix build). */

.size-select {
	position: relative;
}

#step-b-left-sidebar .size-select {
	margin-bottom: 10px;
}

.size-select-summary {
	list-style: none;
	cursor: pointer;
}

.size-select-summary::-webkit-details-marker,
.size-select-summary::marker {
	display: none;
	content: '';
}

#step-b-left-sidebar .size-select-label {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-bottom: 8px;
	font-size: 16px;
	line-height: normal;
}

#step-b-left-sidebar .size-select-label-strong {
	font-family: 'Inter', sans-serif;
	font-weight: 700;
	color: #222222;
}

#step-b-left-sidebar .size-select-label-muted {
	font-family: 'Inter', sans-serif;
	font-weight: 400;
	color: #666666;
}

#step-b-left-sidebar .size-select-trigger {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	height: 40px;
	padding: 0 12px 0 14px;
	background-color: #ffffff;
	background-image: none;
	border: 2px solid #ced3d9;
	border-radius: 4px;
	box-sizing: border-box;
}

#step-b-left-sidebar .size-select-trigger-dims {
	flex: 1 0 0;
	min-width: 0;
	font-family: 'Inter', sans-serif;
	font-weight: 400;
	font-size: 14px;
	color: #0a0a0a;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#step-b-left-sidebar .size-select-trigger-price {
	font-family: 'Inter', sans-serif;
	font-weight: 600;
	font-size: 14px;
	color: #1c2b68;
	white-space: nowrap;
}

#step-b-left-sidebar .size-select-trigger-caret {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	transition: transform 0.15s ease;
}

.size-select[open] .size-select-trigger-caret {
	transform: rotate(180deg);
}

.size-select-dropdown {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	z-index: 20;
	display: flex;
	flex-direction: column;
	background-color: #ffffff;
	background-image: none;
	border: 1px solid #dee0e5;
	border-radius: 4px;
	box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.14);
	padding: 6px 0;
}

.size-select-rows {
	max-height: 380px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(158, 163, 178, 0.55) transparent;
}

.size-select-rows::-webkit-scrollbar {
	width: 10px;
}

.size-select-rows::-webkit-scrollbar-track {
	background: transparent;
}

.size-select-rows::-webkit-scrollbar-thumb {
	background-color: rgba(158, 163, 178, 0.55);
	border-radius: 2px;
	border: 3px solid transparent;
	background-clip: content-box;
}

/* Row/radio visual language shared by the desktop dropdown (#step-b-left-sidebar)
   and the mobile full-screen sheet (#mobileSizeModal). Each context adds its
   own sizing (height/padding) below; these rules carry the shared look. */

.size-select-row {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	margin: 0;
	background-color: #ffffff;
	background-image: none;
	cursor: pointer;
	box-sizing: border-box;
}

.size-select-row:hover {
	background-color: #e3e6ec;
}

.size-select-row:has(.size-select-native-radio:checked) {
	background-color: #dce4f5;
}

.size-select-native-radio {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.size-select-row-dims {
	flex: 1 0 0;
	min-width: 0;
	font-family: 'Inter', sans-serif;
	font-weight: 500;
	font-size: 14px;
	color: #222530;
}

.size-select-row:has(.size-select-native-radio:checked) .size-select-row-dims {
	font-weight: 600;
	color: #162253;
}

.size-select-row-price {
	font-family: 'Inter', sans-serif;
	font-weight: 500;
	font-size: 14px;
	color: #2b2c68;
	white-space: nowrap;
}

.size-select-row:has(.size-select-native-radio:checked) .size-select-row-price {
	font-weight: 600;
}

.size-select-radio {
	position: relative;
	flex-shrink: 0;
	box-sizing: border-box;
	width: 18px;
	height: 18px;
	border: 1.5px solid #b3b3b8;
	border-radius: 50%;
	background-color: #ffffff;
}

.size-select-native-radio:checked ~ .size-select-radio {
	border: 2px solid #202a62;
}

.size-select-native-radio:checked ~ .size-select-radio::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 9px;
	height: 9px;
	background-color: #202a62;
	border-radius: 50%;
	transform: translate(-50%, -50%);
}

#step-b-left-sidebar .size-select-row {
	height: 38px;
	padding: 0 14px 0 12px;
}

#step-b-left-sidebar .size-select-custom {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	height: 54px;
	padding: 7px 12px;
	background-color: #ffffff;
}

#step-b-left-sidebar .size-select-custom-btn {
	display: flex;
	flex: 1 0 0;
	align-items: center;
	justify-content: center;
	height: 40px;
	font-family: 'Inter', sans-serif;
	font-weight: 700;
	font-size: 14px;
	color: #16245c;
	background-color: #ffffff;
	border: 1px solid #16245c;
	border-radius: 6px;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

#step-b-left-sidebar .size-select-custom-btn:hover,
#step-b-left-sidebar .size-select-custom-btn:focus {
	background-color: #e3e6ec;
	color: #16245c;
	text-decoration: none;
}

/* Mobile trigger, shown below the headstone image below the 1290px
   breakpoint where the desktop sidebar (and its .size-select) is hidden
   by the existing composertoolraw.css rules. Opens #mobileSizeModal. */

.mobile-size-select {
	display: none;
}

@media (max-width: 1290px) {
	.mobile-size-select {
		display: flex;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: center;
		gap: 12px;
		max-width: 460px;
		margin: 20px auto;
		padding: 0 15px;
	}
}

.mobile-size-select-label {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 4px;
	font-size: 14px;
	white-space: nowrap;
}

.mobile-size-select-label-strong {
	font-family: 'Inter', sans-serif;
	font-weight: 700;
	color: #222222;
}

.mobile-size-select-label-muted {
	font-family: 'Inter', sans-serif;
	font-weight: 400;
	color: #666666;
}

.mobile-size-select-trigger {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1 1 auto;
	min-width: 0;
	max-width: 244px;
	height: 44px;
	padding: 0 12px 0 14px;
	background-color: #ffffff;
	background-image: none;
	border: 1px solid #c3c3c3;
	border-radius: 6px;
	box-sizing: border-box;
	cursor: pointer;
}

.mobile-size-select-trigger-dims {
	flex: 1 0 0;
	min-width: 0;
	font-family: 'Inter', sans-serif;
	font-weight: 400;
	font-size: 14px;
	color: #0a0a0a;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mobile-size-select-trigger-price {
	font-family: 'Inter', sans-serif;
	font-weight: 600;
	font-size: 14px;
	color: #1c2b68;
	white-space: nowrap;
}

.mobile-size-select-trigger-caret {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

/* Full-screen size picker sheet (mobile), Bootstrap modal */

#mobileSizeModal .mobile-size-modal-dialog {
	width: 100%;
	max-width: 100%;
	height: 100%;
	margin: 0;
}

#mobileSizeModal .mobile-size-modal-content {
	height: 100%;
	border: 0;
	border-radius: 0;
	display: flex;
	flex-direction: column;
}

#mobileSizeModal .mobile-size-modal-header {
	position: relative;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 56px;
	padding: 0 16px;
	border-bottom: 1px solid #e0e0e0;
}

#mobileSizeModal .mobile-size-modal-close {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	margin: 0;
	padding: 0;
	font-size: 22px;
	font-weight: 400;
	line-height: 1;
	color: #333333;
	opacity: 1;
}

#mobileSizeModal .mobile-size-modal-title {
	margin: 0;
	font-family: 'Inter', sans-serif;
	font-weight: 700;
	font-size: 16px;
	color: #222222;
}

#mobileSizeModal .mobile-size-modal-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 16px 0 0;
}

#mobileSizeModal .mobile-size-modal-subtext {
	margin: 0 0 8px;
	padding: 0 16px;
	font-family: 'Inter', sans-serif;
	font-weight: 400;
	font-size: 13px;
	color: #666666;
}

#mobileSizeModal .size-select-row {
	height: 56px;
	padding: 0 20px;
	border-bottom: 1px solid #f0f0f0;
}

#mobileSizeModal .size-select-row-dims,
#mobileSizeModal .size-select-row-price {
	font-size: 15px;
}

#mobileSizeModal .mobile-size-modal-footer {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px 16px 16px;
	border-top: 1px solid #e0e0e0;
}

#mobileSizeModal .mobile-size-modal-use-btn,
#mobileSizeModal .mobile-size-modal-custom-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 44px;
	margin: 0;
	font-family: 'Inter', sans-serif;
	font-weight: 700;
	font-size: 14px;
	border-radius: 6px;
	text-decoration: none;
	box-sizing: border-box;
}

#mobileSizeModal .mobile-size-modal-use-btn {
	color: #ffffff;
	background-color: #16245c;
	border: 1px solid #16245c;
}

#mobileSizeModal .mobile-size-modal-custom-btn {
	color: #16245c;
	background-color: #ffffff;
	border: 1px solid #16245c;
}

#mobileSizeModal .mobile-size-modal-custom-btn:hover,
#mobileSizeModal .mobile-size-modal-custom-btn:focus {
	background-color: #e3e6ec;
	color: #16245c;
	text-decoration: none;
}

/* "Stone size (cm)" field on /bestill, below "Steintype". Same size-select
   dropdown as above, but the trigger is styled to match this form's plain
   Bootstrap .form-control fields (border, height) instead of the
   /komponer sidebar's own trigger look. */

.stone-size-select-wrap {
	position: relative;
	padding: 0;
}

.stone-size-select.disabled .stone-size-select-summary {
	cursor: not-allowed;
	opacity: 0.6;
	background-color: #e9ecef;
}

.stone-size-select-summary {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	height: calc(1.5em + 0.75rem + 2px);
	padding: 0.375rem 1.75rem 0.375rem 0.75rem;
	background-color: #ffffff;
	background-image: url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0Ljk1IDEwIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2ZmZjt9LmNscy0ye2ZpbGw6IzQ0NDt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPmFycm93czwvdGl0bGU+PHJlY3QgY2xhc3M9ImNscy0xIiB3aWR0aD0iNC45NSIgaGVpZ2h0PSIxMCIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtMiIgcG9pbnRzPSIxLjQxIDQuNjcgMi40OCAzLjE4IDMuNTQgNC42NyAxLjQxIDQuNjciLz48cG9seWdvbiBjbGFzcz0iY2xzLTIiIHBvaW50cz0iMy41NCA1LjMzIDIuNDggNi44MiAxLjQxIDUuMzMgMy41NCA1LjMzIi8+PC9zdmc+);
	background-repeat: no-repeat;
	background-position: calc(100% - 0.75rem) 50%;
	border: 1px solid #ced4da;
	border-radius: 0.25rem;
	box-sizing: border-box;
}

.stone-size-select-trigger-text {
	flex: 1 0 0;
	min-width: 0;
	font-size: 1rem;
	color: #495057;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.stone-size-select-trigger-price {
	font-family: 'Inter', sans-serif;
	font-weight: 400;
	font-size: 1rem;
	color: #2b2c68;
	white-space: nowrap;
}


/* The Figma "Stone size option" dropdown is a plain clickable list (no
   radio indicators) with a rounder, softer container than the /komponer
   sidebar dropdown, and only a background tint to mark the selected row. */

.stone-size-select-dropdown {
	min-width: 280px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	box-shadow: 0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -2px rgba(0, 0, 0, 0.1);
	padding: 6px;
}

.stone-size-rows {
	max-height: 330px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(158, 163, 178, 0.55) transparent;
}

.stone-size-rows::-webkit-scrollbar {
	width: 10px;
}

.stone-size-rows::-webkit-scrollbar-track {
	background: transparent;
}

.stone-size-rows::-webkit-scrollbar-thumb {
	background-color: rgba(158, 163, 178, 0.55);
	border-radius: 2px;
	border: 3px solid transparent;
	background-clip: content-box;
}

/* "Custom size" stays outside .stone-size-rows so it never scrolls out of
   view with the rest of the list, matching the Figma component's own
   annotation ("persistent below the scroll area, not inside scroll"). */

.stone-size-custom-row {
	margin-top: 4px;
	border-top: 1px solid #f0f0f0;
	padding-top: 4px;
}

.stone-size-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 8px 12px;
	border-radius: 6px;
	background-color: #ffffff;
	background-image: none;
	cursor: pointer;
	box-sizing: border-box;
}

.stone-size-row:hover {
	background-color: #e3e6ec;
}

.stone-size-row:has(.stone-size-native-radio:checked) {
	background-color: #dce4f5;
}

.stone-size-native-radio {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.stone-size-row-dims {
	font-family: 'Inter', sans-serif;
	font-weight: 400;
	font-size: 14px;
	color: #222530;
}

.stone-size-row-price {
	font-family: 'Inter', sans-serif;
	font-weight: 400;
	font-size: 14px;
	color: #2b2c68;
	white-space: nowrap;
}
