/* Modal styles matching Figma design (Modal / Log out) */

.custom-modal {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s, visibility 0.3s;
	z-index: 1000;
}

.custom-modal.open {
	display: flex;
	opacity: 1;
	visibility: visible;
}

.custom-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
}

/* Matches prototype ?v=44 #logoutConfirmBackdrop card metrics:
   compact centered 320px card, radius 12, padding 24, gap 16
   between title and actions row. */
.custom-modal__dialog {
	position: relative;
	background: #ffffff;
	border: none;
	border-radius: 12px;
	max-width: 320px;
	width: calc(100% - 48px);
	padding: 24px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 16px;
	font-family: 'Outfit', system-ui, -apple-system, sans-serif;
}

/* Legacy header / close-X slots kept for other .custom-modal instances (image
   modal); not rendered by the logout template anymore. */
.custom-modal__header {
	padding: 72px 24px 8px 24px;
	text-align: center;
	position: relative;
}

.custom-modal__close {
	position: absolute;
	right: 12px;
	top: 12px;
	width: 32px;
	height: 32px;
	border: 0;
	background: transparent;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.custom-modal__close img {
	width: 18px;
	height: 18px;
	display: block;
}

.custom-modal__title {
	font-size: 16px;
	line-height: 1.4;
	font-weight: 600;
	color: var(--text-default, #0d0e13);
	margin: 0;
	text-align: left;
}

.custom-modal__actions {
	display: flex;
	gap: 12px;
}

/* Each button (form-wrapper OR direct button) fills half the row */
.custom-modal__actions > form,
.custom-modal__actions > .btn_logout {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}
.custom-modal__actions > form > .btn_logout { width: 100%; }

.btn_logout,
.btn_logout:hover,
.btn_logout:focus {
	height: 44px;
	padding: 0 12px;
	border-radius: 8px;
	font-family: 'Outfit', sans-serif;
	font-size: 16px;
	line-height: 1;
	font-weight: 500;
	cursor: pointer;
	color: #ffffff;
	background-color: var(--accent-primary, #005F6E);
	border: none;
	transition: background 140ms ease, box-shadow 140ms ease;
}
.btn_logout:hover { background-color: var(--accent-pressed, #024B57); }

.btn_cancel,
.btn_cancel:hover,
.btn_cancel:focus {
	background: #ffffff;
	border: 1px solid var(--border-default, #eaeaea);
	color: var(--text-default, #0d0e13);
	font-weight: 400;
}
.btn_cancel:hover { background: #f5f5f5; }

/* Legacy footer — kept for other modals if any. */
.custom-modal__footer {
	display: flex;
	gap: 8px;
	justify-content: center;
	padding: 16px 20px 64px 20px;
	background: #ffffff;
	border-top-left-radius: 8px;
	border-top-right-radius: 8px;
}



@media (max-width: 480px) {
	.custom-modal__dialog {
		width: 92%;
	}
}

/* Image-modal variant — used by the tire image preview on the b2b search page */
.custom-modal--image .custom-modal__backdrop {
	background: rgba(0, 0, 0, 0.6);
	cursor: pointer;
}

.custom-modal--image .custom-modal__dialog {
	width: auto;
	max-width: min(90vw, 900px);
	border-radius: 8px;
	background: #ffffff;
	padding: 0;
}

.custom-modal--image .custom-modal__close {
	right: 8px;
	top: 8px;
	z-index: 3;
	background: rgba(255, 255, 255, 0.9);
	border-radius: 50%;
}

.custom-modal__image-body {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.custom-modal__image-body img {
	display: block;
	max-width: 100%;
	max-height: 80vh;
	object-fit: contain;
}

