/* Fivva shared feedback system — one vocabulary for the public site, the customer space, the pro dashboard and onboarding.
   States: success (soft green) · pending (soft amber) · error (soft red) · info (neutral) · loading (visible spinner + action text).
   Two classes of feedback:
   - inline action feedback (.mf-fb-line, .is-loading buttons, .mf-count): save, upload, geolocation, sign-in…
   - alert / status card (.mf-fb): a real state change (approval, refusal, something that needs attention). Never for an ordinary form save. */

:root {
	--mf-fb-success-bg: #f1f8dc; --mf-fb-success-bd: #d5e3a8; --mf-fb-success-fg: #35490a;
	--mf-fb-pending-bg: #fff6e3; --mf-fb-pending-bd: #f0dba5; --mf-fb-pending-fg: #6e4d00;
	--mf-fb-error-bg:   #fdecea; --mf-fb-error-bd:   #f3bcb6; --mf-fb-error-fg:   #8f1d1d;
	--mf-fb-info-bg:    #f3f5f2; --mf-fb-info-bd:    #dde3dc; --mf-fb-info-fg:    #46524b;
}

/* Alert / status card */
.mf-fb { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--bd); border-radius: 14px; background: var(--bg); color: var(--fg); font-size: 14px; line-height: 1.4; }
.mf-fb strong { font-weight: 700; }
.mf-fb > span:first-child, .mf-fb-ico { flex: none; font-weight: 800; }
.mf-fb .mf-fb-text { flex: 1 1 auto; min-inline-size: 0; }
.mf-fb .mf-fb-x { flex: none; margin-inline-start: auto; min-inline-size: 32px; min-block-size: 32px; border: 0; border-radius: 999px; background: transparent; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.mf-fb .mf-fb-link { flex: none; color: inherit; font-weight: 700; text-decoration: underline; white-space: nowrap; }
.mf-fb.is-success { --bg: var(--mf-fb-success-bg); --bd: var(--mf-fb-success-bd); --fg: var(--mf-fb-success-fg); }
.mf-fb.is-pending { --bg: var(--mf-fb-pending-bg); --bd: var(--mf-fb-pending-bd); --fg: var(--mf-fb-pending-fg); }
.mf-fb.is-error   { --bg: var(--mf-fb-error-bg);   --bd: var(--mf-fb-error-bd);   --fg: var(--mf-fb-error-fg); }
.mf-fb.is-info    { --bg: var(--mf-fb-info-bg);    --bd: var(--mf-fb-info-bd);    --fg: var(--mf-fb-info-fg); }
.mf-fb[hidden] { display: none; }

/* Inline feedback next to an action */
.mf-fb-line { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; line-height: 1.35; color: var(--mf-fb-info-fg); }
.mf-fb-line.is-success { color: var(--mf-fb-success-fg); font-weight: 700; }
.mf-fb-line.is-pending { color: var(--mf-fb-pending-fg); }
.mf-fb-line.is-error   { color: var(--mf-fb-error-fg); font-weight: 650; }
.mf-fb-line[hidden] { display: none; }

/* Loading: the spinner always draws with the text colour of the control it sits in, so it contrasts on every background
   (dark Pro buttons, lime consumer buttons, white secondary buttons, upload and geolocation actions). */
@keyframes mf-spin { to { transform: rotate(360deg); } }
.mf-spin { display: inline-block; flex: none; inline-size: 1em; block-size: 1em; border: 2px solid rgba(128, 128, 128, .35); border-block-start-color: currentColor; border-radius: 50%; animation: mf-spin .7s linear infinite; vertical-align: -.14em; }
@supports (color: color-mix(in srgb, red 50%, blue)) { .mf-spin { border-color: color-mix(in srgb, currentColor 28%, transparent); border-block-start-color: currentColor; } }
.is-loading { position: relative; pointer-events: none; }
.is-loading > .mf-spin, .mf-load-label .mf-spin { margin-inline-end: 8px; }
.mf-load-label { display: inline-flex; align-items: center; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .mf-spin { animation-duration: 1.6s; } }

/* Character counters: neutral far from the limit, amber when close, red at / over it */
.mf-count { display: block; margin-top: 4px; font-size: 12px; color: #6b766f; font-variant-numeric: tabular-nums; }
.mf-count.is-warn { color: #8a5a00; font-weight: 650; }
.mf-count.is-over { color: #a12a2a; font-weight: 800; }

/* One Fivva checkbox everywhere in the pro / client spaces: dark rounded square + white check (same as onboarding). No native blue control. */
.mf-pd input[type="checkbox"]:not([role="switch"]), .mf-cd input[type="checkbox"]:not([role="switch"]) {
	-webkit-appearance: none; appearance: none; flex: none; inline-size: 22px; block-size: 22px; margin: 0; border: 2px solid #9aa59d; border-radius: 7px; background: #fff center / 14px 14px no-repeat; cursor: pointer; vertical-align: middle; transition: background-color .12s, border-color .12s;
}
.mf-pd input[type="checkbox"]:not([role="switch"]):checked, .mf-cd input[type="checkbox"]:not([role="switch"]):checked {
	border-color: #1a2120; background-color: #1a2120; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7'/%3E%3C/svg%3E");
}
.mf-pd input[type="checkbox"]:not([role="switch"]):focus-visible, .mf-cd input[type="checkbox"]:not([role="switch"]):focus-visible { outline: 2px solid #1a2120; outline-offset: 2px; }
.mf-pd input[type="checkbox"]:not([role="switch"]):disabled, .mf-cd input[type="checkbox"]:not([role="switch"]):disabled { opacity: .45; cursor: not-allowed; }
/* the whole option row is the tap target */
.mf-ed-check, .mf-ed-spec, .mf-ed-wa-optin, .mf-offer-check, .mf-pd label:has(> input[type="checkbox"]) { display: flex; align-items: center; gap: 10px; min-block-size: 44px; cursor: pointer; }
/* Counters: readable but secondary; neutral, amber near the limit, strong at the limit */
.mf-count { margin-top: 6px; font-size: 13px; font-weight: 700; color: #4d5a52; text-align: end; }
.mf-count.is-warn { color: #8a5a00; }
.mf-count.is-over { color: #a12a2a; font-weight: 800; }
