/* -----------------------------------------------------------------------
   Badge met ongelezen-aantal — wordt door chat-widget.js dynamisch
   geplaatst op de "Berichten"-link in het hoofdmenu (indien aanwezig),
   met de account-icoon-link als terugvaloptie voor sites die dat
   (nog) niet hebben.
----------------------------------------------------------------------- */
.autoofy-chat-header-badge {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-width: 17px;
	height: 17px;
	padding: 0 5px;
	margin-left: 6px;
	border-radius: 999px !important;
	background: #B22234 !important;
	color: #fff !important;
	font-size: 10px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	text-align: center;
	vertical-align: middle;
	pointer-events: none;
}

.autoofy-chat-header-badge[hidden] {
	display: none !important;
}

/* -----------------------------------------------------------------------
   Autoofy Chat — modal-venster (gecentreerd, met achtergrond)

   LET OP: veel regels hier gebruiken !important. Dat is bewust: de
   paneel-elementen (inbox-items, verstuurknoppen) zijn <button>-tags, en
   het thema van de site blijkt generieke button-styling te hebben die
   anders voorrang krijgt (net zoals in de bestaande vehicle-template-CSS
   elders op de site, die om dezelfde reden ook overal !important gebruikt).

   Er is weer een klein, zwevend "bolletje" rechtsonder — maar bewust
   ALLEEN zichtbaar voor niet-ingelogde bezoekers met een lopend gesprek
   (zie chat-widget.js). Ingelogde gebruikers hebben de "Berichten"-link
   in de header al als vaste weg terug; voor een gast zonder account is
   dat bolletje de enige manier om een gesprek later nog terug te vinden.
----------------------------------------------------------------------- */
#autoofy-chat-bubble-root {
	font-family: inherit;
}

.autoofy-chat-launcher {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
	width: 56px;
	height: 56px;
	border-radius: 50% !important;
	border: none !important;
	background: #B22234 !important;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.15s ease, background-color 0.2s ease;
	padding: 0 !important;
}

.autoofy-chat-launcher[hidden] {
	display: none !important;
}

.autoofy-chat-launcher:hover {
	background: #941c2b !important;
	transform: scale(1.05);
}

.autoofy-chat-launcher.is-open {
	background: #1D3557 !important;
}

.autoofy-chat-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 10px !important;
	background: #1D3557 !important;
	color: #fff !important;
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #fff !important;
}

.autoofy-chat-badge[hidden] {
	display: none !important;
}

.autoofy-chat-backdrop {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(15, 23, 42, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
}

.autoofy-chat-backdrop[hidden] {
	display: none !important;
}

/* -----------------------------------------------------------------------
   Venster zelf — groter dan de oude, kleine rechtsonder-bubbel
----------------------------------------------------------------------- */
.autoofy-chat-panel {
	position: relative;
	width: 520px;
	max-width: 100%;
	height: auto;
	min-height: 360px;
	max-height: calc(100vh - 48px);
	background: #fff !important;
	border-radius: 14px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid #eef0f3;
	box-sizing: border-box;
}

.autoofy-chat-panel-header {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 14px 16px;
	background: #1D3557 !important;
	color: #fff !important;
	flex-shrink: 0;
}

.autoofy-chat-panel-title {
	flex: 1;
	font-weight: 700;
	font-size: 15px;
	color: #fff !important;
}

.autoofy-chat-panel-back,
.autoofy-chat-panel-close {
	border: none !important;
	background: none !important;
	color: #fff !important;
	cursor: pointer;
	padding: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Het display:flex hierboven overschrijft anders per ongeluk het
   standaardgedrag van het hidden-attribuut (JS zet hidden=true om de
   terug-knop te verbergen op het hoofdscherm, maar zonder deze regel
   blijft hij toch zichtbaar). */
.autoofy-chat-panel-back[hidden] {
	display: none !important;
}

.autoofy-chat-panel-close {
	font-size: 24px;
	line-height: 1;
}

.autoofy-chat-panel-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	background: #fff !important;
}

/* -----------------------------------------------------------------------
   Inbox-lijst (bubbel + "Mijn berichten"-pagina)

   Dit zijn de rijen die eerder per ongeluk rood/onleesbaar oogden door
   thema-CSS die op alle <button>-elementen inbrak — hier expliciet
   witte achtergrond + donkere tekst afgedwongen.
----------------------------------------------------------------------- */
.autoofy-chat-list {
	display: flex;
	flex-direction: column;
}

.autoofy-chat-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 12px 16px;
	border: none !important;
	border-bottom: 1px solid #eef0f3 !important;
	border-radius: 0 !important;
	background: #fff !important;
	text-align: left;
	cursor: pointer;
	text-decoration: none !important;
	font-family: inherit;
	font-weight: 400 !important;
}

/* Zonder deze regel overschrijft display:flex hierboven het hidden-
   attribuut waarmee het filterveld rijen probeert te verbergen — exact
   dezelfde valkuil als eerder bij het paneel/de badge/de terug-knop. */
.autoofy-chat-item[hidden] {
	display: none !important;
}

.autoofy-chat-item-thumb {
	width: 44px;
	height: 44px;
	border-radius: 8px !important;
	object-fit: cover;
	flex-shrink: 0;
	background: #f1f3f5 !important;
	border: 1px solid #eef0f3 !important;
}

.autoofy-chat-item-thumb-placeholder {
	display: flex !important;
	align-items: center;
	justify-content: center;
}

.autoofy-chat-thread-thumb {
	width: 26px;
	height: 26px;
	border-radius: 6px !important;
	object-fit: cover;
	flex-shrink: 0;
	background: #f1f3f5 !important;
	border: 1px solid #eef0f3 !important;
}

.autoofy-chat-item:hover {
	background: #f8fafc !important;
}

.autoofy-chat-item-main {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.autoofy-chat-item-title {
	font-weight: 700 !important;
	font-size: 14px;
	color: #0f172a !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 220px;
}

.autoofy-chat-item-role-tag {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 7px;
	border-radius: 999px !important;
	background: #eef3f9 !important;
	color: #1D3557 !important;
	font-size: 9.5px;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	vertical-align: middle;
}

.autoofy-chat-item-preview {
	font-size: 12.5px;
	color: #6b7280 !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 220px;
}

.autoofy-chat-item-side {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.autoofy-chat-item-delete {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border: none !important;
	background: transparent !important;
	color: #9ca3af !important;
	border-radius: 6px !important;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

/* Alleen tonen bij hover/focus van de rij zelf — houdt de lijst rustig
   ogend, de knop is er wel altijd (ook voor toetsenbordgebruikers/touch). */
.autoofy-chat-item:hover .autoofy-chat-item-delete,
.autoofy-chat-item:focus-within .autoofy-chat-item-delete {
	opacity: 1;
}

@media (hover: none) {
	/* Op touchscreens is er geen hover-status — knop gewoon altijd tonen. */
	.autoofy-chat-item-delete {
		opacity: 0.6;
	}
}

.autoofy-chat-item-delete:hover {
	background: #fef2f2 !important;
	color: #B22234 !important;
}

.autoofy-chat-item-delete[aria-disabled="true"] {
	opacity: 0.35 !important;
	pointer-events: none;
}

.autoofy-chat-item-time {
	font-size: 11px;
	color: #9ca3af !important;
	white-space: nowrap;
}

.autoofy-chat-item-dot {
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px !important;
	background: #B22234 !important;
	color: #fff !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 10.5px;
	font-weight: 700 !important;
	line-height: 1;
}

/* -----------------------------------------------------------------------
   Losstaande pagina's ("Mijn berichten" / "Mijn verkoopberichten"):
   Marktplaats-achtige twee-koloms-opzet — links de lijst (met filter),
   rechts het geopende gesprek. Op mobiel (smal scherm) wordt dit één
   kolom: lijst óf gesprek, met een "Terug"-knop ertussen.
----------------------------------------------------------------------- */
.autoofy-chat-inbox-app {
	display: flex;
	max-width: 1000px;
	height: 640px;
	max-height: 80vh;
	margin: 0 auto 48px;
	border: 1px solid #eef0f3 !important;
	border-radius: 12px;
	overflow: hidden;
	background: #fff !important;
	box-shadow: 0 2px 10px rgba(16, 24, 40, 0.05);
}

.autoofy-chat-inbox-list-pane {
	width: 340px;
	flex-shrink: 0;
	min-height: 0;
	display: flex;
	flex-direction: column;
	border-right: 1px solid #eef0f3 !important;
	background: #fafbfc !important;
}

.autoofy-chat-inbox-filter-wrap {
	padding: 14px;
	border-bottom: 1px solid #eef0f3 !important;
	flex-shrink: 0;
}

.autoofy-chat-inbox-filter {
	width: 100%;
	box-sizing: border-box;
	padding: 9px 12px;
	border: 1px solid #d1d5db !important;
	border-radius: 8px !important;
	font-size: 16px; /* >=16px: voorkomt dat mobiele browsers automatisch inzoomen bij het tikken in dit veld */
	font-family: inherit;
	background: #fff !important;
	color: #111827 !important;
}

.autoofy-chat-inbox-filter:focus {
	outline: none;
	border-color: #1D3557 !important;
}

.autoofy-chat-inbox-rows {
	flex: 1;
	overflow-y: auto;
}

.autoofy-chat-inbox-rows .autoofy-chat-item {
	border-bottom: 1px solid #eef0f3 !important;
	cursor: pointer;
}

.autoofy-chat-inbox-rows .autoofy-chat-item:hover {
	background: #f1f3f5 !important;
}

.autoofy-chat-inbox-rows .autoofy-chat-item.is-active {
	background: #eef3f9 !important;
}

.autoofy-chat-inbox-rows .autoofy-chat-item:focus-visible {
	outline: 2px solid #1D3557;
	outline-offset: -2px;
}

.autoofy-chat-inbox-detail-pane {
	flex: 1;
	min-width: 0;
	min-height: 0;
	display: flex;
	flex-direction: column;
	position: relative;
}

.autoofy-chat-inbox-empty-state {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	color: #9ca3af !important;
	text-align: center;
	padding: 24px;
}

.autoofy-chat-inbox-empty-state p {
	margin: 0;
	font-size: 13.5px;
	max-width: 260px;
}

.autoofy-chat-inbox-thread {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.autoofy-chat-inbox-back {
	display: none; /* alleen zichtbaar op mobiel, zie media query */
	border: none !important;
	background: #fafbfc !important;
	color: #1D3557 !important;
	font-weight: 600 !important;
	font-size: 13px;
	padding: 12px 16px;
	text-align: left;
	cursor: pointer;
	border-bottom: 1px solid #eef0f3 !important;
	flex-shrink: 0;
}

.autoofy-chat-archived-section {
	border-top: 1px solid #eef0f3;
}

.autoofy-chat-archived-section summary {
	list-style: none;
	cursor: pointer;
	padding: 10px 14px;
	font-size: 12.5px;
	font-weight: 600 !important;
	color: #6b7280 !important;
	display: flex;
	align-items: center;
	gap: 6px;
	user-select: none;
}

.autoofy-chat-archived-section summary::-webkit-details-marker {
	display: none;
}

.autoofy-chat-archived-section summary::before {
	content: '▸';
	font-size: 11px;
	transition: transform 0.15s ease;
}

.autoofy-chat-archived-section[open] summary::before {
	transform: rotate(90deg);
}

.autoofy-chat-archived-section .autoofy-chat-item {
	opacity: 0.75;
}

/* -----------------------------------------------------------------------
   Tabbladen op de gecombineerde "Berichten"-pagina (koper + evt. dealer)
----------------------------------------------------------------------- */
.autoofy-chat-inbox-page,
.autoofy-chat-dealer-inbox-page,
.autoofy-chat-combined-inbox-page {
	padding: 24px 16px 56px;
}

.autoofy-chat-inbox-tabs {
	display: flex;
	gap: 4px;
	max-width: 1000px;
	margin: 0 auto 14px;
	border-bottom: 1px solid #eef0f3 !important;
}

.autoofy-chat-inbox-tab {
	border: none !important;
	background: transparent !important;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600 !important;
	color: #6b7280 !important;
	cursor: pointer;
	border-bottom: 2px solid transparent !important;
	margin-bottom: -1px;
	font-family: inherit;
}

.autoofy-chat-inbox-tab:hover {
	color: #1D3557 !important;
}

.autoofy-chat-inbox-tab.is-active {
	color: #B22234 !important;
	border-bottom-color: #B22234 !important;
}

/* Mobiel: één kolom i.p.v. twee naast elkaar. Standaard toont de lijst;
   zodra een gesprek geopend wordt (.is-showing-detail), toont de detail-
   kolom vol-breed met een "Terug"-knop erboven. */
@media (max-width: 760px) {
	.autoofy-chat-inbox-app {
		height: 78vh;
		max-height: none;
		border-radius: 0;
		border-left: none !important;
		border-right: none !important;
	}

	.autoofy-chat-inbox-list-pane {
		width: 100%;
		border-right: none !important;
	}

	.autoofy-chat-inbox-detail-pane {
		display: none;
	}

	.autoofy-chat-inbox-app.is-showing-detail .autoofy-chat-inbox-list-pane {
		display: none;
	}

	.autoofy-chat-inbox-app.is-showing-detail .autoofy-chat-inbox-detail-pane {
		display: flex;
	}

	.autoofy-chat-inbox-back {
		display: block;
	}
}

/* -----------------------------------------------------------------------
   Lege staat / foutmelding / laden
----------------------------------------------------------------------- */
.autoofy-chat-empty {
	padding: 28px 20px;
	text-align: center;
	color: #6b7280 !important;
	font-size: 14px;
	margin: auto 0;
}

.autoofy-chat-empty-hint {
	margin-top: 8px;
	font-size: 13px;
}

.autoofy-chat-empty a,
.autoofy-chat-thread-link {
	color: #B22234 !important;
	font-weight: 700 !important;
	text-decoration: none !important;
}

.autoofy-chat-empty a:hover,
.autoofy-chat-thread-link:hover {
	text-decoration: underline !important;
}

.autoofy-chat-loading {
	padding: 24px 16px;
	color: #6b7280 !important;
	font-size: 14px;
	text-align: center;
}

.autoofy-chat-error-msg {
	padding: 16px;
	color: #b91c1c !important;
	font-size: 13.5px;
	text-align: center;
}

/* -----------------------------------------------------------------------
   Start-formulier (nieuwe vraag)
----------------------------------------------------------------------- */
.autoofy-chat-form {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px;
	background: #fff !important;
}

.autoofy-chat-intro {
	margin: 0 0 6px;
	color: #374151 !important;
	font-size: 13.5px;
	line-height: 1.4;
}

.autoofy-chat-form label {
	font-size: 0.8rem;
	font-weight: 600 !important;
	color: #374151 !important;
	margin-top: 6px;
}

.autoofy-chat-form input,
.autoofy-chat-form textarea {
	width: 100%;
	padding: 9px 10px;
	border: 1px solid #d1d5db !important;
	border-radius: 6px !important;
	background: #fff !important;
	color: #111827 !important;
	font-size: 16px; /* >=16px: voorkomt dat mobiele browsers automatisch inzoomen bij het tikken in dit veld */
	font-family: inherit;
	box-sizing: border-box;
}

.autoofy-chat-form input:focus,
.autoofy-chat-form textarea:focus {
	outline: none;
	border-color: #1D3557 !important;
}

.autoofy-chat-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
}

.autoofy-chat-submit {
	margin-top: 12px;
	padding: 11px 18px;
	border: none !important;
	border-radius: 6px !important;
	background: #B22234 !important;
	color: #fff !important;
	font-weight: 700 !important;
	font-size: 14.5px;
	cursor: pointer;
	transition: background-color 0.2s ease;
	width: 100%;
}

.autoofy-chat-submit:hover:not(:disabled) {
	background: #941c2b !important;
}

.autoofy-chat-submit:disabled {
	opacity: 0.6;
	cursor: default;
}

/* -----------------------------------------------------------------------
   Gespreksthread (binnen bubbel én op losse /gesprek/-pagina)
----------------------------------------------------------------------- */
.autoofy-chat-thread-vehicle {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border-bottom: 1px solid #eef0f3 !important;
	flex-shrink: 0;
	background: #fff !important;
	font-weight: 700 !important;
	font-size: 13.5px;
	color: #0f172a !important;
	text-decoration: none !important;
	cursor: pointer;
}

.autoofy-chat-thread-vehicle:hover {
	background: #f8fafc !important;
}

.autoofy-chat-messages {
	flex: 1;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 14px 16px;
	background: #f6f7f8 !important;
}

.autoofy-chat-waiting-note {
	display: flex;
	align-items: flex-start;
	gap: 7px;
	align-self: center;
	max-width: 90%;
	margin-top: 4px;
	padding: 8px 12px;
	border-radius: 10px;
	background: #eef3f9 !important;
	color: #1D3557 !important;
	font-size: 12px;
	line-height: 1.4;
	text-align: left;
}

.autoofy-chat-waiting-note svg {
	flex-shrink: 0;
	margin-top: 1px;
}

.autoofy-chat-seen {
	display: block;
	margin-top: 3px;
	font-size: 10px;
	color: rgba(255, 255, 255, 0.7) !important;
	text-align: right;
}

/* Op een witte (dealer-eigen) bubbel is het lichte label onleesbaar —
   daar een donkerder grijstint gebruiken. */
.autoofy-chat-message.is-dealer .autoofy-chat-seen {
	color: #9ca3af !important;
}

.autoofy-chat-email-invite {
	align-self: stretch;
	margin-top: 6px;
	padding: 12px;
	border-radius: 10px;
	background: #fff !important;
	border: 1px solid #eef0f3 !important;
}

.autoofy-chat-email-invite p {
	margin: 0 0 8px;
	font-size: 12.5px;
	color: #374151 !important;
	line-height: 1.4;
}

.autoofy-chat-email-invite-form {
	display: flex;
	gap: 6px;
}

.autoofy-chat-email-invite-form input {
	flex: 1;
	min-width: 0;
	padding: 7px 9px;
	border: 1px solid #d1d5db !important;
	border-radius: 6px !important;
	background: #fff !important;
	color: #111827 !important;
	font-size: 16px; /* >=16px: voorkomt automatisch inzoomen op mobiel */
	font-family: inherit;
}

.autoofy-chat-email-invite-form input:focus {
	outline: none;
	border-color: #1D3557 !important;
}

.autoofy-chat-email-invite-form button {
	flex-shrink: 0;
	padding: 7px 12px;
	border: none !important;
	border-radius: 6px !important;
	background: #B22234 !important;
	color: #fff !important;
	font-weight: 700 !important;
	font-size: 12.5px;
	cursor: pointer;
}

.autoofy-chat-email-invite-form button:hover:not(:disabled) {
	background: #941c2b !important;
}

.autoofy-chat-email-invite-done {
	margin: 0 !important;
	color: #1E8E3E !important;
	font-weight: 600 !important;
	font-size: 12.5px;
}

.autoofy-chat-form-hint {
	margin: 6px 0 0;
	font-size: 11.5px;
	color: #9ca3af !important;
	line-height: 1.4;
}

.autoofy-chat-quick-replies {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 4px;
}

.autoofy-chat-quick-reply {
	padding: 6px 11px;
	border: 1px solid #d1d5db !important;
	border-radius: 999px !important;
	background: #fff !important;
	color: #1D3557 !important;
	font-size: 12px;
	font-weight: 600 !important;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.autoofy-chat-quick-reply:hover:not(:disabled) {
	background: #eef3f9 !important;
	border-color: #A9C0D6 !important;
}

.autoofy-chat-quick-reply:disabled {
	opacity: 0.45;
	cursor: default;
}

/* ===== Aanvinkopties, telefoonveld, fotovak (startformulier) ===== */
.autoofy-chat-checkbox-row {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 4px;
}

.autoofy-chat-checkbox {
	display: flex !important;
	align-items: center;
	gap: 7px;
	font-size: 12.5px;
	color: #374151 !important;
	font-weight: 500 !important;
	cursor: pointer;
}

.autoofy-chat-checkbox input {
	width: 15px;
	height: 15px;
	accent-color: #B22234;
	cursor: pointer;
}

.autoofy-chat-phone-field {
	margin-top: 4px;
}

.autoofy-chat-email-field {
	margin: 2px 0 4px;
	padding: 10px 12px;
	background: #f7f9fc !important;
	border-radius: 8px !important;
	border: 1px solid #eef0f3 !important;
}

.autoofy-chat-email-field label {
	display: block;
	font-size: 12.5px;
	font-weight: 600 !important;
	color: #1D3557 !important;
	margin-bottom: 5px;
}

.autoofy-chat-email-field input {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	border: 1px solid #d1d5db !important;
	border-radius: 6px !important;
	font-size: 16px; /* >=16px: voorkomt automatisch inzoomen op mobiel */
	font-family: inherit;
	background: #fff !important;
	color: #111827 !important;
}

.autoofy-chat-email-field input:focus {
	outline: none;
	border-color: #1D3557 !important;
}

.autoofy-chat-phone-field label {
	display: block;
	font-size: 12px;
	font-weight: 600 !important;
	color: #374151 !important;
	margin-bottom: 3px;
}

.autoofy-chat-phone-required {
	color: #B22234 !important;
}

.autoofy-chat-phone-field input {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	border: 1px solid #d1d5db !important;
	border-radius: 6px !important;
	font-size: 16px; /* >=16px: voorkomt automatisch inzoomen op mobiel */
	font-family: inherit;
}

.autoofy-chat-phone-field.is-required input {
	border-color: #B22234 !important;
}

.autoofy-chat-photo-field {
	margin-top: 6px;
	padding: 10px;
	border: 1px dashed #d1d5db !important;
	border-radius: 8px;
	background: #fafafa !important;
}

.autoofy-chat-photo-field label {
	display: block;
	font-size: 12px;
	font-weight: 600 !important;
	color: #374151 !important;
	margin-bottom: 6px;
}

.autoofy-chat-photo-input {
	font-size: 12px;
	max-width: 100%;
}

.autoofy-chat-photo-previews {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.autoofy-chat-photo-thumb {
	position: relative;
	width: 56px;
	height: 56px;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid #e5e7eb !important;
}

.autoofy-chat-photo-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.autoofy-chat-photo-remove {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 18px;
	height: 18px;
	border: none !important;
	border-radius: 50% !important;
	background: rgba(0, 0, 0, 0.6) !important;
	color: #fff !important;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.autoofy-chat-photo-status {
	margin: 6px 0 0;
	font-size: 11px;
	color: #9ca3af !important;
}

/* ===== Bijlagen (foto's) binnen een berichtbubbel ===== */
.autoofy-chat-attachments {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 6px;
}

.autoofy-chat-attachments img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
	border: 1px solid rgba(255, 255, 255, 0.4);
}

.autoofy-chat-message.is-dealer .autoofy-chat-attachments img {
	border-color: #eef0f3;
}

/* ===== Badges (terugbellen/inruilen) in de dealer-inbox ===== */
.autoofy-chat-item-badges {
	display: flex;
	gap: 6px;
	margin-top: 4px;
	flex-wrap: wrap;
}

.autoofy-chat-item-badge {
	display: inline-flex !important;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	border-radius: 999px !important;
	background: #eef3f9 !important;
	color: #1D3557 !important;
	font-size: 10.5px;
	font-weight: 600 !important;
	white-space: nowrap;
}

.autoofy-chat-message {
	max-width: 82%;
	padding: 9px 12px;
	border-radius: 12px !important;
	background: #fff !important;
	border: 1px solid #eef0f3 !important;
}

.autoofy-chat-message.is-visitor {
	align-self: flex-end;
	background: #B22234 !important;
	border-color: #B22234 !important;
	color: #fff !important;
	border-bottom-right-radius: 3px !important;
}

.autoofy-chat-message.is-dealer {
	align-self: flex-start;
	border-bottom-left-radius: 3px !important;
}

.autoofy-chat-message.is-visitor .autoofy-chat-sender {
	color: rgba(255, 255, 255, 0.75) !important;
}

.autoofy-chat-message.is-visitor p {
	color: #fff !important;
}

.autoofy-chat-message.is-dealer p {
	color: #111827 !important;
}

.autoofy-chat-sender {
	display: block;
	font-size: 10.5px;
	font-weight: 700 !important;
	color: #6b7280 !important;
	margin-bottom: 2px;
}

.autoofy-chat-message p {
	margin: 0;
	line-height: 1.4;
	font-size: 14px;
	white-space: pre-wrap;
	word-break: break-word;
}

.autoofy-chat-reply {
	display: flex;
	gap: 8px;
	align-items: flex-end;
	padding: 10px 12px;
	border-top: 1px solid #eef0f3 !important;
	flex-shrink: 0;
	background: #fff !important;
}

.autoofy-chat-reply textarea {
	flex: 1;
	padding: 9px 10px;
	border: 1px solid #d1d5db !important;
	border-radius: 8px !important;
	background: #fff !important;
	color: #111827 !important;
	font-size: 16px; /* >=16px: voorkomt automatisch inzoomen op mobiel */
	font-family: inherit;
	resize: none;
	max-height: 90px;
}

.autoofy-chat-reply textarea:focus {
	outline: none;
	border-color: #1D3557 !important;
}

.autoofy-chat-reply button {
	flex-shrink: 0;
	width: 38px;
	height: 38px;
	border-radius: 50% !important;
	border: none !important;
	background: #B22234 !important;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 !important;
}

.autoofy-chat-reply button:hover:not(:disabled) {
	background: #941c2b !important;
}

.autoofy-chat-reply button:disabled {
	opacity: 0.6;
	cursor: default;
}

/* Losse /gesprek/-pagina: geeft de threadweergave wat pagina-marges,
   want daar zit geen bubbel-paneel omheen. */
.autoofy-chat-standalone-thread {
	max-width: 560px;
	margin: 0 auto;
	border: 1px solid #eef0f3;
	border-radius: 12px;
	overflow: hidden;
	height: 70vh;
	display: flex;
	flex-direction: column;
	background: #fff !important;
}

/* -----------------------------------------------------------------------
   Mobiel: paneel vult het scherm, net als een app
----------------------------------------------------------------------- */
@media (max-width: 480px) {
	.autoofy-chat-backdrop {
		padding: 0;
	}

	.autoofy-chat-panel {
		width: 100% !important;
		height: 100% !important;
		min-height: 0 !important;
		max-width: none !important;
		max-height: none !important;
		border-radius: 0 !important;
		margin: 0 !important;
		box-sizing: border-box;
	}

	.autoofy-chat-standalone-thread {
		height: 80vh;
		border-radius: 0;
		border-left: none;
		border-right: none;
	}
}
