/* MusicTools Toolkit – front-end styles.
 * Colours follow the current Shoptimizer setup (accent #ff5600, green #3bb54a).
 * Override the custom properties from the theme if needed. */
:root {
	--mttk-accent: #ff5600;
	--mttk-success: #3bb54a;
	--mttk-text: #222;
	--mttk-muted: #666;
	--mttk-border: #e2e2e2;
	--mttk-bg: #fff;
	--mttk-soft: #f6f6f3;
	--mttk-radius: 6px;
}

.mttk-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.mttk-button {
	background: var(--mttk-accent) !important;
	border-color: var(--mttk-accent) !important;
	color: #fff !important;
}

/* Notices */
.mttk-notice {
	padding: 12px 16px;
	border-radius: var(--mttk-radius);
	margin: 0 0 1.5em;
	border-left: 4px solid;
}
.mttk-notice--success { background: #eef8ef; border-color: var(--mttk-success); }
.mttk-notice--error { background: #fdf0ee; border-color: #d63638; }

/* Request form */
.mttk-form fieldset {
	border: 1px solid var(--mttk-border);
	border-radius: var(--mttk-radius);
	padding: 16px 18px 4px;
	margin: 0 0 1.25em;
	background: var(--mttk-bg);
}
.mttk-form legend { font-weight: 600; padding: 0 6px; }
.mttk-field { margin: 0 0 14px; }
.mttk-field label,
.mttk-field .mttk-label { display: block; font-weight: 500; margin-bottom: 4px; }
.mttk-field input[type="text"],
.mttk-field input[type="email"],
.mttk-field input[type="tel"],
.mttk-field input[type="number"],
.mttk-field select,
.mttk-field textarea { width: 100%; max-width: 100%; box-sizing: border-box; }
.mttk-field--dims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mttk-field--dims .mttk-label { grid-column: 1 / -1; }
.mttk-field--inline input { max-width: 120px; }
.mttk-field--consent label { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; }
.mttk-form__hint,
.mttk-form__ref { color: var(--mttk-muted); font-size: .95em; }

.mttk-request-link { margin: .5em 0 1em; }
.mttk-request-link a { color: var(--mttk-accent); font-weight: 600; text-decoration: underline; }

/* Finder */
.mttk-finder {
	background: var(--mttk-soft);
	border-radius: var(--mttk-radius);
	padding: 20px;
	margin: 0 0 2em;
}
.mttk-finder__title { margin-top: 0; }
.mttk-finder__form { display: flex; gap: 8px; }
.mttk-finder__input { flex: 1; min-width: 0; font-size: 16px; }
.mttk-finder__results:empty { display: none; }
.mttk-finder__results { margin-top: 12px; }
.mttk-finder__list { list-style: none; margin: 0; padding: 0; background: var(--mttk-bg); border: 1px solid var(--mttk-border); border-radius: var(--mttk-radius); }
.mttk-finder__item + .mttk-finder__item { border-top: 1px solid var(--mttk-border); }
.mttk-finder__item a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; color: var(--mttk-text); text-decoration: none; }
.mttk-finder__item a:hover,
.mttk-finder__item a:focus { background: var(--mttk-soft); }
.mttk-finder__item img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; flex: none; }
.mttk-finder__body { display: flex; flex-direction: column; min-width: 0; }
.mttk-finder__name { font-weight: 600; }
.mttk-finder__match { color: var(--mttk-success); font-size: .9em; }
.mttk-finder__meta { color: var(--mttk-muted); font-size: .9em; }
.mttk-compat-list { columns: 2; }

/* Personalization */
.mttk-personalize {
	clear: both;
	box-sizing: border-box;
	border: 1px dashed var(--mttk-border);
	border-radius: var(--mttk-radius);
	padding: 12px 14px;
	margin: 0 0 1em;
	width: 100%;
}
.mttk-personalize__title { font-weight: 600; margin: 0 0 6px; }
.mttk-personalize__option { display: flex; gap: 8px; align-items: center; margin: 4px 0; }
.mttk-personalize__extra { margin: 4px 0 8px 24px; }
.mttk-personalize__extra input { width: 100%; }
.mttk-personalize__hint { display: block; color: var(--mttk-muted); margin-top: 6px; }

/* Delivery estimate */
.mttk-estimate {
	background: var(--mttk-soft);
	border-left: 4px solid var(--mttk-accent);
	padding: 10px 14px;
	margin: 0 0 1em;
	border-radius: 0 var(--mttk-radius) var(--mttk-radius) 0;
}
.mttk-estimate small { display: block; color: var(--mttk-muted); margin-top: 2px; }

/* Back in stock */
.mttk-bis { border: 1px solid var(--mttk-border); border-radius: var(--mttk-radius); padding: 14px; margin: 0 0 1em; position: relative; }
.mttk-bis__title { font-weight: 600; margin: 0 0 8px; }
.mttk-bis__row { display: flex; gap: 8px; }
.mttk-bis__row input { flex: 1; min-width: 0; }
.mttk-bis__consent { display: flex; gap: 8px; align-items: flex-start; font-size: .9em; margin-top: 8px; color: var(--mttk-muted); }
.mttk-bis__msg:empty { display: none; }
.mttk-bis__msg { margin: 8px 0 0; font-weight: 500; }
.mttk-bis.is-done .mttk-bis__row,
.mttk-bis.is-done .mttk-bis__consent { display: none; }

/* Free shipping bar */
.mttk-freeship { margin: 0 0 1em; }
.mttk-freeship__text { margin: 0 0 6px; font-size: .95em; }
.mttk-freeship__track { height: 8px; background: var(--mttk-border); border-radius: 99px; overflow: hidden; }
.mttk-freeship__track span { display: block; height: 100%; background: var(--mttk-accent); transition: width .3s ease; }
.mttk-freeship.is-complete .mttk-freeship__track span { background: var(--mttk-success); }

/* Trust bar */
.mttk-trust { list-style: none; margin: 1em 0; padding: 0; display: grid; gap: 6px; }
.mttk-trust li { display: flex; gap: 8px; align-items: center; font-size: .95em; }
.mttk-trust svg { color: var(--mttk-success); flex: none; }

/* WhatsApp */
.mttk-wa {
	position: fixed;
	right: 18px;
	bottom: 18px;
	/* Below Shoptimizer's mini-cart drawer (102), mobile overlay (101) and menu (999). */
	z-index: 98;
	display: flex;
	align-items: center;
	gap: 8px;
	background: #25d366;
	color: #fff !important;
	border-radius: 99px;
	padding: 10px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
	text-decoration: none !important;
}
.mttk-wa__label { display: none; font-weight: 600; padding-right: 6px; }
@media (min-width: 768px) {
	.mttk-wa { padding: 10px 14px; }
	.mttk-wa__label { display: inline; }
}
/* Hide while Shoptimizer drawers/filters or the FiboSearch mobile overlay are open. */
body.drawer-open .mttk-wa,
body.mobile-toggled .mttk-wa,
body.filter-open .mttk-wa,
body.m-search-toggled .mttk-wa,
html.dgwt-wcas-overlay-mobile-on .mttk-wa,
body.dgwt-wcas-overlay-mobile-on .mttk-wa {
	display: none;
}
/* Keep clear of the CommerceKit sticky add-to-cart bar on mobile product pages. */
@media (max-width: 767px) {
	.single-product .mttk-wa { bottom: 80px; }
}

@media (max-width: 600px) {
	.mttk-finder__form,
	.mttk-bis__row { flex-direction: column; }
	.mttk-compat-list { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.mttk-freeship__track span { transition: none; }
}
