/**
 * Royal Yataq — Ölçü kalkulyatoru.
 *
 * Nooni temasının məhsul səhifəsi ilə eyni dildə: şrift miras alınır,
 * başlıqlar 900/uppercase, düymələr 14px/700 uppercase qara, künclər düz.
 */

.royal-sc {
	margin: 30px 0 0;
	padding: 0;
	border-top: 1px solid #ebebeb;
	border-bottom: 1px solid #ebebeb;
	font-family: inherit;
}

/* ---------- Açılan başlıq ---------- */

.royal-sc__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	margin: 0;
	padding: 22px 0;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	text-align: left;
	cursor: pointer;
	color: #000;
	line-height: 1.4;
	-webkit-appearance: none;
	appearance: none;
}

.royal-sc__toggle:hover,
.royal-sc__toggle:focus {
	background: none;
	color: #000;
}

.royal-sc__toggle:focus-visible {
	outline: 1px dotted #000;
	outline-offset: 4px;
}

.royal-sc__heading {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.royal-sc__title {
	font-size: 15px;
	font-weight: 900;
	letter-spacing: 0.75px;
	text-transform: uppercase;
	line-height: 1.25;
}

.royal-sc__subtitle {
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.2px;
	color: #767676;
	text-transform: none;
	line-height: 1.45;
}

.royal-sc__chevron {
	position: relative;
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
}

.royal-sc__chevron::before,
.royal-sc__chevron::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	background: #000;
	transform: translate(-50%, -50%);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.royal-sc__chevron::before {
	width: 16px;
	height: 1px;
}

.royal-sc__chevron::after {
	width: 1px;
	height: 16px;
}

.royal-sc__toggle[aria-expanded="true"] .royal-sc__chevron::after {
	opacity: 0;
	transform: translate(-50%, -50%) rotate(90deg);
}

/* ---------- Gövdə ---------- */

.royal-sc__body {
	padding: 4px 0 28px;
}

.royal-sc__body[hidden] {
	display: none;
}

.royal-sc__fields {
	display: flex;
	align-items: flex-end;
	gap: 12px;
}

.royal-sc__field {
	flex: 1 1 0;
	min-width: 0;
}

.royal-sc__label {
	display: flex;
	align-items: baseline;
	gap: 6px;
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 900;
	letter-spacing: 0.75px;
	text-transform: uppercase;
	color: #000;
	line-height: 1.2;
}

.royal-sc__unit {
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0.4px;
	color: #767676;
	text-transform: lowercase;
}

.royal-sc__input {
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 8px 16px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	letter-spacing: 0.75px;
	color: #000;
	background: #fff;
	border: 1px solid #a4a4a4;
	border-radius: 0;
	box-shadow: none;
	-moz-appearance: textfield;
	appearance: textfield;
}

.royal-sc__input:focus {
	border-color: #000;
	outline: 0;
}

.royal-sc__input::-webkit-outer-spin-button,
.royal-sc__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.royal-sc__input.is-invalid {
	border-color: #c0392b;
}

.royal-sc__times {
	flex: 0 0 auto;
	padding-bottom: 13px;
	font-size: 15px;
	color: #a4a4a4;
	line-height: 1;
}

/* ---------- Nəticə ---------- */

.royal-sc__result {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	margin: 22px 0 0;
	padding: 18px 0 0;
	border-top: 1px solid #ebebeb;
}

.royal-sc__result-label {
	flex: 0 0 100%;
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0.75px;
	text-transform: uppercase;
	color: #767676;
}

.royal-sc__price {
	font-size: 28px;
	font-weight: 400;
	letter-spacing: 0.7px;
	color: #000;
	line-height: 1.2;
}

.royal-sc__price .amount,
.royal-sc__price bdi {
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
}

.royal-sc__note {
	font-size: 13px;
	color: #767676;
	line-height: 1.4;
}

.royal-sc__note.is-error {
	color: #c0392b;
}

.royal-sc__note.is-success {
	color: #1e7a45;
}

/* ---------- Əməliyyatlar ---------- */

.royal-sc__actions {
	display: flex;
	align-items: stretch;
	gap: 10px;
	margin: 20px 0 0;
}

.royal-sc__qty {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	border: 1px solid #a4a4a4;
	background: #fff;
}

.royal-sc__qty-btn {
	width: 36px;
	height: 48px;
	padding: 0;
	margin: 0;
	font-family: inherit;
	font-size: 16px;
	line-height: 1;
	color: #000;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.royal-sc__qty-btn:hover {
	background: none;
	color: #767676;
}

.royal-sc__qty-input {
	width: 40px;
	height: 48px;
	padding: 0;
	margin: 0;
	font-family: inherit;
	font-size: 15px;
	text-align: center;
	color: #000;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	-moz-appearance: textfield;
	appearance: textfield;
}

.royal-sc__qty-input::-webkit-outer-spin-button,
.royal-sc__qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.royal-sc__add {
	flex: 1 1 auto;
	min-height: 50px;
	padding: 12px 26px;
	margin: 0;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 1.05px;
	text-transform: uppercase;
	color: #fff;
	background: #000;
	border: 1px solid #000;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
	transition: opacity 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.royal-sc__add:hover {
	color: #fff;
	background: #000;
	opacity: 0.85;
}

.royal-sc__add[disabled] {
	background: #d6d6d6;
	border-color: #d6d6d6;
	color: #fff;
	cursor: not-allowed;
	opacity: 1;
}

.royal-sc__add.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

/* ---------- İpucu ---------- */

.royal-sc__hint {
	margin: 16px 0 0;
	font-size: 12px;
	line-height: 1.6;
	color: #767676;
}

.royal-sc__hint strong {
	color: #000;
	font-weight: 700;
}

.royal-sc__cart-link {
	display: inline-block;
	margin-left: 8px;
	color: #000;
	text-decoration: underline;
}

/* ---------- Mobil ---------- */

@media (max-width: 480px) {

	.royal-sc__toggle {
		padding: 18px 0;
	}

	.royal-sc__fields {
		gap: 8px;
	}

	.royal-sc__input {
		padding: 8px 10px;
	}

	.royal-sc__price {
		font-size: 24px;
	}

	.royal-sc__actions {
		flex-wrap: wrap;
	}

	.royal-sc__qty {
		flex: 1 1 100%;
		justify-content: space-between;
	}

	.royal-sc__add {
		flex: 1 1 100%;
	}
}
