:root {
	--wdtp-z-overlay: 810;
	--wdtp-z-panel: 820;
	--wdtp-z-toolbar: 999;
}

.wdtp-root {
	--wdtp-panel-radius: 20px;
	--wdtp-toolbar-offset: 55px;
	--wdtp-panel-max-h: min(calc(85vh - var(--wdtp-toolbar-offset)), 720px);
	--wdtp-panel-duration: 0.65s;
}

@media (max-width: 1024px) {
	body.wdtp-toolbar-on {
		padding-bottom: var(--wdtp-toolbar-offset);
	}

	.wdtp-toolbar.wd-toolbar {
		position: fixed;
		inset-inline: 0;
		bottom: 0;
		z-index: var(--wdtp-z-toolbar, 999);
		display: flex !important;
		align-items: center;
		justify-content: space-between;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		padding: 5px;
		height: 55px;
		background-color: var(--bgcolor-white, #fff);
		box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.07);
	}

	.wdtp-toolbar.wd-toolbar > div {
		flex: 1 0 20%;
	}

	.wdtp-toolbar.wd-toolbar > div a,
	.wdtp-toolbar.wd-toolbar > div .wdtp-toolbar-trigger {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 45px;
		padding: 0 0 15px;
		border: 0;
		background: transparent;
		color: inherit;
		text-decoration: none;
		font: inherit;
		cursor: pointer;
		touch-action: manipulation;
		-webkit-appearance: none;
		appearance: none;
	}

	.wdtp-toolbar.wd-toolbar .wd-toolbar-label {
		position: absolute;
		inset-inline: 10px;
		bottom: 3px;
		display: block;
		overflow: hidden;
		text-align: center;
		text-overflow: ellipsis;
		white-space: nowrap;
		font-weight: 600;
		font-size: 11px;
		line-height: 1;
		padding: 1px 0;
		pointer-events: none;
	}

	.wdtp-toolbar.wd-toolbar .wd-toolbar-icon {
		display: flex;
		align-items: center;
		justify-content: center;
		pointer-events: none;
	}

	.wdtp-toolbar.wd-toolbar .wd-custom-icon img,
	.wdtp-toolbar.wd-toolbar .wdtp-toolbar-icon-img {
		width: auto;
		height: 20px;
		pointer-events: none;
	}

	.wdtp-toolbar.wd-toolbar .wd-tools-icon::before {
		pointer-events: none;
	}
}

@media (min-width: 1025px) {
	.wdtp-toolbar.wd-toolbar {
		display: none !important;
	}
}

.wdtp-toolbar-fallback-icon {
	display: block;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.35;
}

.wdtp-toolbar-item.wdtp-toolbar-item--active > a,
.wdtp-toolbar-item.wdtp-toolbar-item--active .wdtp-toolbar-trigger {
	color: var(--wd-primary-color, #83b735);
}

.wdtp-overlay {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	bottom: var(--wdtp-toolbar-offset);
	z-index: var(--wdtp-z-overlay);
	background: rgba(0, 0, 0, 0.45);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.35s cubic-bezier(0.19, 1, 0.22, 1), visibility 0.35s cubic-bezier(0.19, 1, 0.22, 1);
}

.wdtp-overlay.wdtp-overlay--visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.wdtp-panels {
	position: fixed;
	inset: 0;
	z-index: var(--wdtp-z-panel);
	pointer-events: none;
}

.wdtp-panel {
	position: fixed;
	left: 0;
	right: 0;
	bottom: var(--wdtp-toolbar-offset);
	z-index: var(--wdtp-z-panel);
	display: flex;
	flex-direction: column;
	width: 100%;
	max-height: var(--wdtp-panel-max-h);
	border-radius: var(--wdtp-panel-radius) var(--wdtp-panel-radius) 0 0;
	background: var(--bgcolor-white, #fff);
	box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.14);
	transform: translateY(100%);
	transition: transform var(--wdtp-panel-duration) cubic-bezier(0.19, 1, 0.22, 1), visibility 0s linear 0s;
	pointer-events: none;
	overflow: hidden;
	visibility: hidden;
}

.wdtp-panel.wdtp-panel--active {
	visibility: visible;
	transition: transform var(--wdtp-panel-duration) cubic-bezier(0.19, 1, 0.22, 1), visibility 0s linear 0s;
	z-index: var(--wdtp-z-panel);
}

.wdtp-panel.wdtp-panel--open {
	transform: translateY(0);
	pointer-events: auto;
	z-index: calc(var(--wdtp-z-panel) + 1);
	max-height: calc(var(--wdtp-panel-max-h));
}

.wdtp-panel__handle {
	flex: 0 0 auto;
	width: 40px;
	height: 4px;
	margin: 10px auto 0;
	border-radius: 999px;
	background: var(--brdcolor-gray-300, rgba(0, 0, 0, 0.12));
}

.wdtp-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 20px 12px;
	border-bottom: 1px solid var(--brdcolor-gray-300, rgba(0, 0, 0, 0.08));
}

.wdtp-panel__title {
	margin: 0;
	font-size: 18px;
	line-height: 1.3;
	font-weight: 600;
	color: var(--wd-title-color, #242424);
}

.wdtp-root .wdtp-panel .wdtp-panel__header button.wdtp-panel__close,
.wdtp-panel .wdtp-panel__header .wdtp-panel__close {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex: 0 0 auto !important;
	box-sizing: content-box !important;
	width: 15px !important;
	height: 15px !important;
	min-height: 15px !important;
	padding: 5px !important;
	margin-top: -5px !important;
	border: 1.5px solid var(--brdcolor-gray-300, rgba(0, 0, 0, 0.14)) !important;
	border-radius: 100px !important;
	line-height: 15px !important;
	background: var(--bgcolor-white, #fff) !important;
	color: var(--color-gray-700, #666) !important;
	cursor: pointer !important;
	transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, transform 0.2s ease !important;
}

.wdtp-root .wdtp-panel .wdtp-panel__header button.wdtp-panel__close:hover,
.wdtp-root .wdtp-panel .wdtp-panel__header button.wdtp-panel__close:focus-visible,
.wdtp-panel .wdtp-panel__header .wdtp-panel__close:hover,
.wdtp-panel .wdtp-panel__header .wdtp-panel__close:focus-visible {
	border-color: var(--wd-primary-color, #83b735) !important;
	color: var(--wd-primary-color, #83b735) !important;
	background: var(--bgcolor-white, #fff) !important;
	transform: scale(1.04) !important;
}

.wdtp-root .wdtp-panel .wdtp-panel__header button.wdtp-panel__close .wdtp-panel__close-icon,
.wdtp-panel .wdtp-panel__header .wdtp-panel__close .wdtp-panel__close-icon {
	position: relative !important;
	display: block !important;
	width: 14px !important;
	height: 14px !important;
	flex: 0 0 auto !important;
}

.wdtp-panel__close-icon::before,
.wdtp-panel__close-icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 1.5px;
	border-radius: 999px;
	background: currentColor;
	transform-origin: center;
}

.wdtp-panel__close-icon::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.wdtp-panel__close-icon::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.wdtp-panel__body {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
}

.wdtp-panel__content > :first-child {
	margin-top: 0;
}

.wdtp-panel__content > :last-child {
	margin-bottom: 0;
}

.wdtp-panel__content img {
	max-width: 100%;
	height: auto;
}

body.wdtp-panel-open {
	overflow: hidden;
}

@media (min-width: 1025px) {
	.wdtp-overlay,
	.wdtp-panels,
	.wdtp-panel {
		display: none !important;
	}
}
