/* UI Convoi — composants vendor (sans Tailwind) */

.fl-convoy {
	--fl-convoy-font-secondary: 'Inter Variable', 'Inter', sans-serif;
	margin-top: 0;
}

.fl-convoy__divider {
	margin: 48px 0;
	border: 0;
	border-top: 1px solid #e2e8f0;
}

.fl-convoy-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	align-items: start;
}

@media (min-width: 768px) {
	.fl-convoy-layout {
		grid-template-columns: 30% minmax(0, 1fr);
		gap: 20px 8px;
	}
}

.fl-convoy-layout__title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #0f172a;
}

.fl-convoy-layout__subtitle {
	margin: 6px 0 0;
	font-family: var(--fl-convoy-font-secondary);
	font-size: 14px;
	line-height: 1.5;
	color: #747688;
}

.fl-convoy-layout__controls {
	display: flex;
	flex-direction: column;
	gap: 32px;
	min-width: 0;
}

.fl-convoy-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.fl-convoy-field__label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #0f172a;
}

.fl-convoy-field__control {
	display: flex;
	align-items: flex-start;
	min-width: 0;
}

.fl-convoy-field__control .fl-convoy-participants-trigger {
	width: 100%;
}

.fl-convoy-field--toggle {
	gap: 0;
}

.fl-convoy-toggle-row {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	min-width: 0;
}

.fl-convoy-toggle-row__switch {
	flex-shrink: 0;
	padding-top: 2px;
}

.fl-convoy-toggle-row__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.fl-convoy-toggle-row__label {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	color: #0f172a;
}

.fl-convoy-toggle-row__subtitle {
	font-family: var(--fl-convoy-font-secondary);
	font-size: 12px;
	line-height: 1.45;
	color: #747688;
}

.fl-trace-section__hint {
	margin: 8px 0 0;
	font-family: var(--fl-convoy-font-secondary);
	font-size: 12px;
	line-height: 1.45;
	color: #747688;
}

.fl-trace-section__hint a {
	color: #020326;
}

/* Toggle */
.fl-convoy-switch {
	position: relative;
	display: inline-flex;
	width: 44px;
	height: 24px;
	flex-shrink: 0;
	align-items: center;
	cursor: pointer;
}

.fl-convoy-switch__input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
	opacity: 0;
}

.fl-convoy-switch__track {
	pointer-events: none;
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: #e2e8f0;
	transition: background-color 0.15s ease;
}

.fl-convoy-switch__thumb {
	pointer-events: none;
	position: absolute;
	left: 2px;
	top: 2px;
	z-index: 1;
	width: 20px;
	height: 20px;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
	transition: transform 0.15s ease;
}

.fl-convoy-switch__input:checked ~ .fl-convoy-switch__track {
	background: #020326;
}

.fl-convoy-switch__input:checked ~ .fl-convoy-switch__thumb {
	transform: translateX(20px);
}

.fl-convoy-switch__input:disabled ~ .fl-convoy-switch__track,
.fl-convoy-switch__input:disabled ~ .fl-convoy-switch__thumb {
	opacity: 0.5;
}

.fl-convoy-switch__input:disabled ~ .fl-convoy-switch__track {
	cursor: not-allowed;
}

/* Participants trigger */
.fl-convoy-participants-trigger {
	display: block;
	width: 100%;
	padding: 0;
	border: 1px solid #eeeeee;
	border-radius: 8px;
	background: #f7f7f7;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fl-convoy-participants-trigger:hover {
	border-color: #e0e0e0;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.fl-convoy-participants-trigger:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(2, 3, 38, 0.2);
}

.fl-convoy-participants-empty {
	display: flex;
	min-height: 200px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 24px 16px;
	color: #64748b;
}

.fl-convoy-participants-empty__icon {
	display: inline-flex;
	width: 28px;
	height: 28px;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: #f1f5f9;
	font-size: 16px;
	font-weight: 500;
	color: #475569;
}

.fl-convoy-participants-trigger:hover .fl-convoy-participants-empty__icon {
	background: #e2e8f0;
}

.fl-convoy-participants-empty__title {
	font-size: 14px;
	font-weight: 600;
	color: #334155;
}

.fl-convoy-participants-empty__hint {
	font-family: var(--fl-convoy-font-secondary);
	font-size: 12px;
	color: #747688;
}

.fl-convoy-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.fl-convoy-table thead tr {
	background: #f8fafc;
	text-align: left;
}

.fl-convoy-table th {
	padding: 8px 12px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.025em;
	color: #64748b;
}

.fl-convoy-table td {
	padding: 8px 12px;
	color: #334155;
	max-width: 120px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.fl-convoy-table tbody tr + tr {
	border-top: 1px solid #f1f5f9;
}

/* Drawer */
.fl-convoy-drawer {
	position: fixed;
	inset: 0;
	z-index: 100001;
	pointer-events: none;
}

.fl-convoy-drawer__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.4);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.fl-convoy-drawer__panel {
	position: absolute;
	right: 0;
	top: 0;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 36rem;
	height: 100%;
	background: #fff;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	transform: translateX(100%);
	transition: transform 0.3s ease;
}

.fl-convoy-drawer[data-open='true'] {
	pointer-events: auto;
}

.fl-convoy-drawer[data-open='true'] .fl-convoy-drawer__overlay {
	opacity: 1;
}

.fl-convoy-drawer[data-open='true'] .fl-convoy-drawer__panel {
	transform: translateX(0);
}

.fl-convoy-drawer__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 20px;
	border-bottom: 1px solid #e2e8f0;
}

.fl-convoy-drawer__title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #0f172a;
}

.fl-convoy-drawer__subtitle {
	margin: 4px 0 0;
	font-family: var(--fl-convoy-font-secondary);
	font-size: 14px;
	color: #747688;
}

.fl-convoy-drawer__close {
	display: inline-flex;
	width: 32px;
	height: 32px;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 6px;
	background: transparent;
	font-size: 24px;
	line-height: 1;
	color: #94a3b8;
	cursor: pointer;
}

.fl-convoy-drawer__close:hover {
	background: #f1f5f9;
	color: #334155;
}

.fl-convoy-drawer__body {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
}

.fl-convoy-btn-remove {
	flex-shrink: 0;
	padding: 6px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #fff;
	font-size: 12px;
	color: #334155;
	cursor: pointer;
}

.fl-convoy-btn-remove:hover {
	background: #f1f5f9;
}

/* Sections modal participants */
.fl-convoy-modal-section + .fl-convoy-modal-section {
	margin-top: 28px;
	padding-top: 28px;
	border-top: 1px solid #e2e8f0;
}

.fl-convoy-modal-section__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 12px;
}

.fl-convoy-modal-section__title {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: #0f172a;
}

.fl-convoy-modal-section__subtitle {
	margin: 4px 0 0;
	font-family: var(--fl-convoy-font-secondary);
	font-size: 14px;
	color: #747688;
}

.fl-convoy-add-btn {
	flex-shrink: 0;
	padding: 0;
	border: 0;
	background: transparent;
	font-family: var(--fl-convoy-font-secondary);
	font-size: 14px;
	font-weight: 500;
	color: #020326;
	cursor: pointer;
	white-space: nowrap;
}

.fl-convoy-add-btn:hover {
	opacity: 0.75;
}


/* Alert */
.fl-convoy-alert {
	display: flex;
	gap: 12px;
	margin-top: 28px;
	padding: 14px 16px;
	border: 1px solid #bfdbfe;
	border-radius: 10px;
	background: #eff6ff;
}

.fl-convoy-alert__icon {
	flex-shrink: 0;
	margin-top: 1px;
	color: #2563eb;
}

.fl-convoy-alert__content {
	min-width: 0;
}

.fl-convoy-alert__title {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 600;
	color: #1e40af;
}

.fl-convoy-alert__text {
	font-family: var(--fl-convoy-font-secondary);
	font-size: 13px;
	line-height: 1.55;
	color: #1e3a8a;
}

.fl-convoy-alert__text p {
	margin: 0;
}

.fl-convoy-alert__text p + p {
	margin-top: 8px;
}

.fl-convoy-editor-table-wrap {
	min-height: 200px;
	border: 1px solid #eeeeee;
	border-radius: 8px;
	background: #f7f7f7;
	overflow: visible;
}

.fl-convoy-editor-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	table-layout: fixed;
}

.fl-convoy-editor-table thead tr {
	background: #f7f7f7;
	text-align: left;
}

.fl-convoy-editor-table th {
	padding: 8px 12px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.025em;
	color: #64748b;
}

.fl-convoy-editor-table td {
	padding: 10px 12px;
	vertical-align: top;
	color: #334155;
}

.fl-convoy-editor-table tbody tr + tr {
	border-top: 1px solid #f1f5f9;
}

.fl-convoy-editor-table th:first-child,
.fl-convoy-editor-table td:first-child {
	width: 46%;
}

.fl-convoy-editor-table th:nth-child(2),
.fl-convoy-editor-table td:nth-child(2) {
	width: 38%;
}

.fl-convoy-editor-table__actions-col {
	width: 16%;
	text-align: right;
}

.fl-convoy-editor-table--no-role th:first-child,
.fl-convoy-editor-table--no-role td:first-child {
	width: 84%;
}

.fl-convoy-editor-table--no-role .fl-convoy-editor-table__actions-col {
	width: 16%;
}

.fl-convoy-role-cell {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.fl-convoy-user-combobox {
	position: relative;
}

.fl-convoy-user-combobox__input {
	width: 100%;
	min-width: 0;
}

.fl-convoy-user-combobox__dropdown {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 4px);
	z-index: 30;
	max-height: 220px;
	overflow-y: auto;
	border: 1px solid #eeeeee;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(2, 3, 38, 0.12);
}

.fl-convoy-user-combobox__option,
.fl-convoy-user-combobox__empty {
	display: block;
	width: 100%;
	padding: 10px 12px;
	border: 0;
	background: #fff;
	text-align: left;
	font-size: 13px;
	color: #334155;
	cursor: pointer;
}

.fl-convoy-user-combobox__option {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.fl-convoy-user-combobox__option-email {
	font-size: 13px;
	font-weight: 500;
	color: #0f172a;
}

.fl-convoy-user-combobox__option-name {
	font-family: var(--fl-convoy-font-secondary);
	font-size: 12px;
	color: #747688;
}

.fl-convoy-user-combobox__option:hover,
.fl-convoy-user-combobox__option--invite:hover {
	background: #f8fafc;
}

.fl-convoy-user-combobox__option--invite .fl-convoy-user-combobox__option-email {
	color: #020326;
}

.fl-convoy-user-combobox__empty {
	color: #747688;
	cursor: default;
}

.fl-convoy-form__row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	margin-bottom: 12px;
}

@media (min-width: 640px) {
	.fl-convoy-form__row {
		grid-template-columns: 1fr 1fr;
	}
}

.fl-convoy-form__field {
	min-width: 0;
}

.fl-convoy-form__label {
	display: block;
	margin-bottom: 4px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.025em;
	color: #64748b;
}

.fl-convoy-form__input,
.fl-convoy-form__select {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	padding: 8px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #fff;
	font-size: 14px;
	color: #0f172a;
}

.fl-convoy-form__input:focus,
.fl-convoy-form__select:focus {
	outline: none;
	border-color: #020326;
	box-shadow: 0 0 0 2px rgba(2, 3, 38, 0.2);
}

.fl-convoy-form__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.fl-convoy-btn {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	border: 0;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
}

.fl-convoy-btn--primary {
	background: #020326;
	color: #fff;
}

.fl-convoy-btn--primary:hover {
	opacity: 0.9;
}

.fl-convoy-form__error {
	font-size: 14px;
	color: #dc2626;
}

/* Utilitaires */
.fl-is-hidden {
	display: none !important;
}

.fl-is-muted {
	opacity: 0.5;
}

/* Isolation vendor */
.mb_trace_convoi .fl-convoy .fl-convoy-switch {
	display: inline-flex;
	margin-bottom: 0;
	font-weight: 400;
}

.mb_trace_convoi .fl-convoy .fl-convoy-field__label,
.mb_trace_convoi .fl-convoy .fl-convoy-toggle-row__label {
	display: block;
	margin-bottom: 0;
	font-weight: 600;
	min-width: 0;
}

.mb_trace_convoi .fl-convoy .fl-convoy-form__label {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
	min-width: 0;
}
