/**
 * Mimus Configurator — storefront.
 *
 * Light-mode only by house rule: one explicit palette, and every block that sets
 * a background also sets a colour, so a client forcing a dark ground cannot
 * produce unreadable text.
 *
 * No class here is named ux-*. Flatsome installs a delegated click handler on
 * .ux-swatch across the whole variations form and re-arms it on every
 * ajaxComplete; these fields render inside that form on variable products.
 */

.mimus-configurator {
	margin: 0 0 1.5em;
	color: #23282d;
}

.mimus-field {
	margin: 0 0 1.25em;
}

.mimus-field--hidden {
	display: none;
}

.mimus-field__label {
	display: block;
	margin: 0 0 0.4em;
	font-weight: 600;
	color: #23282d;
}

.mimus-field__label .required {
	border: 0;
	color: #b32d2e;
	text-decoration: none;
}

.mimus-field__description {
	margin: 0.4em 0 0;
	font-size: 0.875em;
	color: #646970;
}

.mimus-field__error {
	margin: 0.4em 0 0;
	font-size: 0.875em;
	color: #b32d2e;
}

.mimus-field--invalid .mimus-input,
.mimus-field--invalid .mimus-textarea,
.mimus-field--invalid .mimus-select {
	border-color: #b32d2e;
}

/* Colour is not the only signal: the message below the control carries it too. */
.mimus-field--invalid .mimus-radios,
.mimus-field--invalid .mimus-swatches {
	border-left: 3px solid #b32d2e;
	padding-left: 8px;
}

.mimus-input,
.mimus-textarea,
.mimus-select {
	width: 100%;
	max-width: 26em;
	padding: 0.6em 0.75em;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #ffffff;
	color: #23282d;
	font-size: 1em;
	line-height: 1.4;
}

.mimus-input:focus,
.mimus-textarea:focus,
.mimus-select:focus {
	border-color: #2271b1;
	outline: 2px solid transparent;
	box-shadow: 0 0 0 2px rgba( 34, 113, 177, 0.35 );
}

.mimus-textarea {
	resize: vertical;
}

/* Swatches ---------------------------------------------------------------- */

/*
 * A grid rather than a wrapping flex row. Forty-four circles in a flex wrap end
 * in a ragged last line whose width says nothing, and the collapsed seven line
 * up differently on every viewport; even columns read as one list. The legend is
 * .screen-reader-text, which is position:absolute, so it takes no grid cell.
 */
.mimus-swatches {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 5em, 1fr ) );
	gap: 0.9em 0.5em;
	margin: 0;
	/* A fieldset's UA min-inline-size is min-content, which stops the grid
	   narrowing inside the showroom's panel column. */
	min-width: 0;
	padding: 0;
	border: 0;
}

.mimus-radios {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6em;
	margin: 0;
	padding: 0;
	border: 0;
}

.mimus-swatch {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4em;
	cursor: pointer;
	text-align: center;
}

/*
 * 2.75em is 44px at a 16px root — the smallest target a thumb hits reliably. The
 * whole label is clickable, so the real target is taller again.
 */
.mimus-swatch__color {
	position: relative;
	display: block;
	width: 2.75em;
	height: 2.75em;
	border: 1px solid #c3c4c7;
	border-radius: 50%;
	background-color: #ffffff;
	background-size: cover;
	background-position: center;
	transition: box-shadow 0.12s ease, transform 0.12s ease;
}

.mimus-swatch__note-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75em;
	height: 2.75em;
	border: 1px dashed #8c8f94;
	border-radius: 50%;
	background: #f6f7f7;
	color: #50575e;
	font-weight: 700;
}

.mimus-swatch__name {
	font-size: 0.8125em;
	line-height: 1.25;
	color: #50575e;
	overflow-wrap: anywhere;
}

/* Selected state is driven by the real radio, so it works without JS. */
.mimus-swatch__input:checked + .mimus-swatch__color,
.mimus-swatch__input:checked + .mimus-swatch__note-icon {
	box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #23282d;
	transform: scale( 1.04 );
}

/*
 * The tick inside the selected swatch, and it has to be a pseudo-element: the
 * rings above are driven by `input:checked + .mimus-swatch__color`, so a real
 * element between the radio and this span would kill the selected state
 * silently. --mimus-tick is written per swatch by field-palette.php through
 * Palette_Type::tick_color(), because one fixed colour cannot be seen on both
 * Bebek Pembe (#FBD2E0) and Kahve (#3D2A1E).
 */
.mimus-swatch__input:checked + .mimus-swatch__color::after {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0.8em;
	height: 0.45em;
	border: solid var( --mimus-tick, #ffffff );
	border-width: 0 0 2px 2px;
	transform: translate( -50%, -75% ) rotate( -45deg );
	content: "";
}

/*
 * Gold and Gumus are gradients of ~1,100 and ~600 distinct pixels, so there is
 * no single value to measure a tick against. White plus a shadow is legible on
 * every part of both.
 */
.mimus-swatch__input:checked + .mimus-swatch__color--image::after {
	border-color: #ffffff;
	filter: drop-shadow( 0 0 1px rgba( 0, 0, 0, 0.7 ) );
}

.mimus-swatch__input:focus-visible + .mimus-swatch__color,
.mimus-swatch__input:focus-visible + .mimus-swatch__note-icon {
	box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #2271b1;
}

.mimus-swatch__input:checked ~ .mimus-swatch__name {
	color: #23282d;
	font-weight: 600;
}

/* Selected colour echo ---------------------------------------------------- */

/*
 * The one part of this control the server renders, because it can: the stored
 * value is known at render time, so this line is true with JS off rather than
 * inert. It exists because the selected state used to be a 4px ring on a 40px
 * circle, and on a pale colour against a white page that ring was the only
 * thing saying anything had been chosen at all.
 */

.mimus-palette-echo {
	display: flex;
	align-items: center;
	gap: 0.5em;
	margin: 0 0 0.7em;
	padding: 0.5em 0.7em;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	background: #ffffff;
	color: #23282d;
	font-size: 0.9375em;
	line-height: 1.3;
}

.mimus-palette-echo__dot {
	flex: 0 0 auto;
	width: 1.5em;
	height: 1.5em;
	border: 1px solid #c3c4c7;
	border-radius: 50%;
	background-color: #ffffff;
	background-size: cover;
	background-position: center;
}

.mimus-palette-echo__label {
	color: #50575e;
}

.mimus-palette-echo__name {
	font-weight: 600;
}

.mimus-palette-echo--empty {
	border-style: dashed;
	background: #f6f7f7;
	color: #50575e;
}

/* "Secilen renk: Henuz renk secmediniz" is not a sentence anyone should read. */
.mimus-palette-echo--empty .mimus-palette-echo__label {
	display: none;
}

.mimus-palette-echo--empty .mimus-palette-echo__name {
	font-weight: 400;
}

.mimus-palette-echo--empty .mimus-palette-echo__dot {
	border-style: dashed;
	background: #ffffff;
}

/* Palette filter --------------------------------------------------------- */

/*
 * Built by configurator.js, never rendered. Every rule here is inert on a page
 * with no JavaScript, which is the point: the swatches stay exactly as they are
 * today, all of them, in most-used order.
 *
 * The panel stays hidden until the customer opens the palette. A search box and
 * seven hue chips shown to someone who has not asked for them is the complexity
 * this field was reported for; its own background says the panel is a set of
 * tools rather than more colours to choose between.
 */

.mimus-palette-tools {
	margin-bottom: 0.7em;
	padding: 0.75em;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	background: #f6f7f7;
	color: #23282d;
}

/*
 * The panel is opened and closed through the `hidden` property, so no rule here
 * may hand it a `display` — and this one says so out loud rather than trusting
 * that to be noticed. The version of .mimus-palette-tools this replaced was
 * `display: flex`, which would have won against `hidden` and left the search box
 * and the chips on screen permanently, which is the whole thing being fixed.
 */
.mimus-palette-tools[hidden] {
	display: none;
}

.mimus-palette-search {
	display: block;
	width: 100%;
	padding: 0.55em 0.8em;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	background: #ffffff;
	color: #23282d;
	font-size: 0.9375em;
	line-height: 1.4;
}

.mimus-palette-search:focus {
	border-color: #2271b1;
	outline: 2px solid transparent;
	box-shadow: 0 0 0 2px rgba( 34, 113, 177, 0.35 );
}

/*
 * Visible, not just announced. The chips filter where a customer reasonably
 * reads them as selecting a colour, and one word of heading separates the two.
 */
.mimus-palette-groups__caption {
	margin: 0.7em 0 0.4em;
	color: #50575e;
	font-size: 0.8125em;
	font-weight: 600;
	line-height: 1.3;
}

/*
 * One scrolling line rather than a wrap. Seven chips wrap into three ragged
 * rows on a phone, which is most of what made this row look like clutter.
 */
.mimus-palette-groups {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.4em;
	padding: 2px 2px 0.3em;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scrollbar-width: thin;
}

/*
 * font/letter-spacing/text-transform/box-shadow are all here to hold off
 * Flatsome's global `button` rule, which is where the SHOUTING CAPS in the
 * original came from — never from this file.
 */
.mimus-palette-group {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 0.4em;
	min-height: 2.25em;
	padding: 0.35em 0.75em;
	border: 1px solid #dcdcde;
	border-radius: 999px;
	background: #ffffff;
	color: #50575e;
	font: inherit;
	font-size: 0.875em;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	white-space: nowrap;
	box-shadow: none;
	cursor: pointer;
}

.mimus-palette-group:hover {
	border-color: #c3c4c7;
	background: #f0f0f1;
	color: #23282d;
}

.mimus-palette-group:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 1px;
}

.mimus-palette-group.is-active {
	border-color: #23282d;
	background: #23282d;
	color: #ffffff;
}

.mimus-palette-group__dot {
	display: block;
	width: 0.85em;
	height: 0.85em;
	border: 1px solid rgba( 0, 0, 0, 0.15 );
	border-radius: 50%;
	background: #dcdcde;
}

/* "Tumu" has no hue of its own. */
.mimus-palette-group[data-mimus-palette-group=""] .mimus-palette-group__dot {
	display: none;
}

/*
 * Two real catalogue colours per group, so the dot is a sample rather than a
 * decoration. The six slugs are Catalog::FAMILIES, which catalogcheck.js
 * already guards against drift.
 */
.mimus-palette-group[data-mimus-palette-group="kirmizi-pembe"] .mimus-palette-group__dot {
	background: linear-gradient( 135deg, #ba1111 50%, #fbd2e0 50% );
}

.mimus-palette-group[data-mimus-palette-group="mavi-yesil"] .mimus-palette-group__dot {
	background: linear-gradient( 135deg, #165ba8 50%, #9dd1c6 50% );
}

.mimus-palette-group[data-mimus-palette-group="sari-turuncu"] .mimus-palette-group__dot {
	background: linear-gradient( 135deg, #f1813c 50%, #f8dd70 50% );
}

.mimus-palette-group[data-mimus-palette-group="kahve-bej"] .mimus-palette-group__dot {
	background: linear-gradient( 135deg, #3d2a1e 50%, #d9cbb0 50% );
}

.mimus-palette-group[data-mimus-palette-group="notr"] .mimus-palette-group__dot {
	background: linear-gradient( 135deg, #1d1d1b 50%, #ffffff 50% );
}

.mimus-palette-group[data-mimus-palette-group="metalik"] .mimus-palette-group__dot {
	background: linear-gradient( 135deg, #c79e2e 50%, #8e8e8e 50% );
}

.mimus-palette-group__count {
	color: #787c82;
	font-size: 0.875em;
	font-variant-numeric: tabular-nums;
}

.mimus-palette-group.is-active .mimus-palette-group__count {
	color: #c3c4c7;
}

/*
 * The only control this field has when it is closed, so it is sized like one.
 * Same defences against Flatsome's button rule as the chips.
 */
.mimus-palette-more {
	display: block;
	width: 100%;
	margin-top: 0.7em;
	padding: 0.7em 1em;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	background: #ffffff;
	color: #23282d;
	font: inherit;
	font-size: 0.9375em;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: normal;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
}

.mimus-palette-more:hover {
	border-color: #23282d;
	background: #f6f7f7;
	color: #23282d;
}

.mimus-palette-more:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 1px;
}

.mimus-palette-empty {
	margin: 0.6em 0 0;
	color: #50575e;
	font-size: 0.9375em;
}

/*
 * The swatches the collapse or the filter is holding back. display:none rather
 * than a visibility trick, so the grid closes up and — the load-bearing half —
 * so a hidden radio is not focusable and Tab walks only the colours on screen.
 * That is also why applyPalette() moves `required` to a visible radio: a
 * display:none control that still carries it makes Chrome refuse to submit and
 * say nothing.
 */
.mimus-swatch--filtered {
	display: none;
}

/*
 * Open, the grid scrolls inside itself. Forty-four swatches at three rows a
 * screen would otherwise push add-to-cart out of reach on a phone, which is the
 * cost the collapse was paying for in the first place. The padding is not
 * decoration: the selected ring is a 4px box-shadow and an overflow container
 * with no room clips it.
 */
.mimus-swatches.is-expanded {
	max-height: 17em;
	padding: 0.45em 0.45em 0.6em;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	background: #ffffff;
	overflow-y: auto;
	overscroll-behavior-y: contain;
}

/*
 * The rule above and `.mimus-field--invalid .mimus-swatches` near the top of
 * this file have the same specificity, and this one comes later — so without
 * this the red rule marking an unanswered required palette is overwritten at
 * exactly the moment it matters. focusFirstError() calls expandPalette() before
 * focusing, so a palette that failed validation is always an open one.
 */
.mimus-field--invalid .mimus-swatches.is-expanded {
	border-color: #b32d2e;
	border-left-width: 3px;
}

/*
 * The first media queries in this file. Light palette only, per the house rule
 * at the top — there is no dark variant of any of this.
 */
@media ( max-width: 480px ) {
	.mimus-swatches {
		grid-template-columns: repeat( auto-fill, minmax( 4.5em, 1fr ) );
	}

	.mimus-swatches.is-expanded {
		max-height: 14em;
	}

	.mimus-palette-echo {
		font-size: 0.875em;
	}
}

@media ( min-width: 700px ) {
	.mimus-swatches.is-expanded {
		max-height: 22em;
	}
}


/* Radios ------------------------------------------------------------------ */

.mimus-radio {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.45em 0.8em;
	border: 1px solid #c3c4c7;
	border-radius: 999px;
	background: #ffffff;
	color: #23282d;
	cursor: pointer;
}

.mimus-radio__price {
	font-size: 0.875em;
	color: #646970;
}

.mimus-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	color: #23282d;
	cursor: pointer;
}

/* Profile chip ------------------------------------------------------------ */

.mimus-configurator__profile {
	display: flex;
	align-items: center;
	gap: 0.6em;
	margin: 0 0 1em;
	padding: 0.5em 0.85em;
	border: 1px solid #dcdcde;
	border-radius: 999px;
	background: #f6f7f7;
	color: #23282d;
	font-size: 0.9375em;
}

.mimus-configurator__profile-change {
	padding: 0;
	border: 0;
	background: none;
	color: #2271b1;
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect( 1px, 1px, 1px, 1px );
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------- cart edit */

.mimus-cart-edit {
	display: inline-block;
	margin-top: 0.25rem;
	font-size: 0.85em;
	color: #6b5b4e;
	text-decoration: underline;
}

.mimus-cart-edit:hover,
.mimus-cart-edit:focus {
	color: #3d332b;
}

.mimus-edit-banner {
	margin: 0 0 0.75rem;
	padding: 0.5rem 0.75rem;
	border-left: 3px solid #b08968;
	background: #f7f1ea;
	color: #3d332b;
	font-size: 0.9em;
}

/* ----------------------------------------------------------------- addon */

.mimus-addon {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #2f2a26;
}

.mimus-addon__option {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 0;
	cursor: pointer;
}

.mimus-addon__price {
	margin-left: auto;
	color: #6b5b4e;
}

.mimus-addon__note {
	margin: 0.35rem 0 0;
	font-size: 0.85em;
	color: #6b5b4e;
}

.mimus-addon-qty {
	display: inline-block;
	color: #2f2a26;
}
