/*
 * WpDevArt: Estimated Delivery Date for WooCommerce Premium
 * Storefront styles: designs, countdown styles, the order-by bar, the picker,
 * the faster option, events, the timeline and the delivery times table.
 * Everything is scoped to the plugin's classes and uses the theme's font and
 * the estimate's color variables.
 */

/* Parts inside an estimate ------------------------------------------------ */

.wpdevart-edd .wpdevart-eddp-express,
.wpdevart-edd .wpdevart-eddp-event,
.wpdevart-edd .wpdevart-eddp-loc,
.wpdevart-edd .wpdevart-eddp-timeline-wrap {
	display: block;
}

.wpdevart-edd .wpdevart-eddp-express {
	font-size: 0.92em;
}

.wpdevart-edd .wpdevart-eddp-event {
	margin-top: 0.15em;
	padding: 0.25em 0.6em;
	border-inline-start: 3px solid var(--wpdevart-edd-accent);
	font-size: 0.92em;
}

.wpdevart-edd .wpdevart-eddp-loc {
	font-size: 0.88em;
	opacity: 0.9;
}

.wpdevart-eddp-loc__change {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.wpdevart-eddp-picker {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.5em;
	margin: 0.3em 0;
	font-size: 0.9em;
}

.wpdevart-eddp-picker__field {
	display: flex;
	flex-direction: column;
	gap: 0.15em;
	margin: 0;
}

/* Hidden parts stay hidden whatever their display (the state field). */
.wpdevart-eddp-picker [hidden] {
	display: none !important;
}

/* Labels follow the estimate's text color, not the theme's label color
   (dark designs). */
.wpdevart-edd .wpdevart-eddp-picker__field,
.wpdevart-edd .wpdevart-eddp-picker__field > span {
	color: inherit;
}

.wpdevart-eddp-picker__field select,
.wpdevart-eddp-picker__field input {
	min-width: 8em;
	max-width: 14em;
	font: inherit;
}

.wpdevart-eddp-picker__actions {
	display: flex;
	gap: 0.4em;
}

.wpdevart-eddp-picker__save,
.wpdevart-eddp-picker__cancel {
	padding: 0.35em 0.8em;
	border: 1px solid var(--wpdevart-edd-accent);
	border-radius: 4px;
	background: var(--wpdevart-edd-accent);
	color: #fff;
	font: inherit;
	cursor: pointer;
}

.wpdevart-eddp-picker__cancel {
	background: transparent;
	color: inherit;
}

.wpdevart-eddp-picker__error {
	flex-basis: 100%;
	color: #b32d2e;
}

/* Timeline ---------------------------------------------------------------- */

.wpdevart-eddp-timeline {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	margin: 0.5em 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.85em;
	counter-reset: none;
}

.wpdevart-eddp-timeline__step {
	position: relative;
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	min-width: 6em;
	margin: 0;
	padding-block: 1.1em 0;
	padding-inline: 0 0.5em;
}

.wpdevart-eddp-timeline__step::before {
	content: "";
	position: absolute;
	top: 0.3em;
	inset-inline-start: 0;
	width: 0.6em;
	height: 0.6em;
	border-radius: 50%;
	background: var(--wpdevart-edd-accent, #3f3f3f);
}

.wpdevart-eddp-timeline__step::after {
	content: "";
	position: absolute;
	top: 0.55em;
	inset-inline-start: 0.8em;
	inset-inline-end: 0.3em;
	height: 2px;
	background: var(--wpdevart-edd-accent, #3f3f3f);
	opacity: 0.25;
}

.wpdevart-eddp-timeline__step:last-child::after {
	display: none;
}

.wpdevart-eddp-timeline__label {
	opacity: 0.75;
}

.wpdevart-eddp-timeline__date {
	font-weight: 600;
}

/* "today" under "Ordered" reads as a heading word. */
.wpdevart-eddp-timeline__date::first-letter {
	text-transform: uppercase;
}

/* On the thank-you page the timeline stands alone. */
.woocommerce-order .wpdevart-eddp-timeline,
.woocommerce-MyAccount-content .wpdevart-eddp-timeline {
	--wpdevart-edd-accent: #3f3f3f;
	max-width: 36em;
	margin: 0 0 1.5em;
	font-size: 0.95em;
}

/* Countdown styles -------------------------------------------------------- */

.wpdevart-edd__countdown--eddp-circles,
.wpdevart-edd__countdown--eddp-flip {
	display: inline-flex;
	gap: 0.3em;
	vertical-align: middle;
}

.wpdevart-eddp-cd {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	line-height: 1.05;
}

.wpdevart-eddp-cd b {
	font-weight: 700;
}

.wpdevart-eddp-cd small {
	font-size: 0.6em;
	opacity: 0.85;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.wpdevart-eddp-cd--circle {
	width: 2.5em;
	height: 2.5em;
	border: 2px solid var(--wpdevart-edd-accent);
	border-radius: 50%;
	color: var(--wpdevart-edd-accent);
}

.wpdevart-eddp-cd--flip {
	min-width: 2.2em;
	padding: 0.25em 0.3em;
	border-radius: 4px;
	background: linear-gradient(180deg, #2b2b2b 50%, #1e1e1e 50%);
	color: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* The time reads on the line with the text; the bar runs under it. */
.wpdevart-edd__countdown--eddp-progress {
	display: inline-flex;
	flex-direction: column;
	gap: 0.15em;
	min-width: 5.5em;
	vertical-align: baseline;
	text-align: center;
}

.wpdevart-eddp-cd-bar {
	display: block;
	height: 0.3em;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.1);
	overflow: hidden;
}

.wpdevart-eddp-cd-bar span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--wpdevart-edd-accent);
	transition: width 0.6s ease;
}

/* Designs ----------------------------------------------------------------- */

.wpdevart-edd--style-eddp-card {
	padding: 0.85em 1em;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.07);
}

.wpdevart-edd--style-eddp-outline {
	padding: 0.75em 0.9em;
	border: 1px solid var(--wpdevart-edd-accent);
	border-radius: var(--wpdevart-edd-radius);
}

.wpdevart-edd--style-eddp-accent {
	padding: 0.6em 0.9em;
	border-inline-start: 4px solid var(--wpdevart-edd-accent);
	background: var(--wpdevart-edd-bg);
}

.wpdevart-edd--style-eddp-tint {
	padding: 0.7em 0.9em;
	border-radius: var(--wpdevart-edd-radius);
	background: rgba(63, 63, 63, 0.08);
	background: color-mix(in srgb, var(--wpdevart-edd-accent) 10%, transparent);
}

.wpdevart-edd--style-eddp-pill {
	display: inline-flex;
	padding: 0.45em 1em;
	border-radius: 999px;
	background: var(--wpdevart-edd-bg);
}

.wpdevart-edd--style-eddp-banner {
	padding: 0.75em 1em;
	border-radius: var(--wpdevart-edd-radius);
	background: var(--wpdevart-edd-accent);
	color: #fff;
}

.wpdevart-edd--style-eddp-banner .wpdevart-edd__icon,
.wpdevart-edd--style-eddp-banner .wpdevart-edd__countdown {
	color: #fff;
}

.wpdevart-edd--style-eddp-banner .wpdevart-edd__countdown--badge,
.wpdevart-edd--style-eddp-banner .wpdevart-edd__unit {
	background: rgba(255, 255, 255, 0.2);
}

.wpdevart-edd--style-eddp-minimal {
	gap: 0.4em;
	font-size: 0.88em;
	opacity: 0.9;
}

.wpdevart-edd--style-eddp-minimal .wpdevart-edd__icon {
	width: 1.2em;
	height: 1.2em;
}

.wpdevart-edd--style-eddp-trust {
	padding: 0.8em 1em;
	border: 1px dashed var(--wpdevart-edd-accent);
	border-radius: var(--wpdevart-edd-radius);
	background: var(--wpdevart-edd-bg);
}

.wpdevart-edd--style-eddp-trust .wpdevart-edd__text::after {
	content: "";
	display: block;
	width: 2.5em;
	height: 2px;
	margin-top: 0.35em;
	background: var(--wpdevart-edd-accent);
	opacity: 0.35;
}

.wpdevart-edd--style-eddp-ribbon {
	position: relative;
	padding: 1.2em 0.9em 0.7em;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: var(--wpdevart-edd-radius);
}

.wpdevart-edd--style-eddp-ribbon::before {
	content: "";
	position: absolute;
	top: 0;
	inset-inline-start: 0.9em;
	width: 3.5em;
	height: 0.35em;
	border-radius: 0 0 4px 4px;
	background: var(--wpdevart-edd-accent);
}

.wpdevart-edd--style-eddp-stripe {
	padding: 0.8em 0.9em;
	border-top: 3px solid var(--wpdevart-edd-accent);
	border-radius: 0 0 var(--wpdevart-edd-radius) var(--wpdevart-edd-radius);
	background: var(--wpdevart-edd-bg);
}

.wpdevart-edd--style-eddp-split {
	align-items: stretch;
	gap: 0;
	border-radius: var(--wpdevart-edd-radius);
	background: var(--wpdevart-edd-bg);
	overflow: hidden;
}

.wpdevart-edd--style-eddp-split .wpdevart-edd__icon {
	box-sizing: content-box;
	align-items: center;
	padding: 0 0.7em;
	margin: 0;
	background: var(--wpdevart-edd-accent);
	color: #fff;
	height: auto;
	min-height: 1.5em;
}

.wpdevart-edd--style-eddp-split .wpdevart-edd__body {
	padding: 0.7em 0.9em;
}

.wpdevart-edd--style-eddp-dashed {
	padding: 0.7em 0.9em;
	border: 2px dashed rgba(0, 0, 0, 0.18);
	border-radius: var(--wpdevart-edd-radius);
}

.wpdevart-edd--style-eddp-float {
	padding: 0.85em 1em;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.wpdevart-edd--style-eddp-underline .wpdevart-edd__text {
	padding-bottom: 0.2em;
	border-bottom: 2px solid var(--wpdevart-edd-accent);
}

.wpdevart-edd--style-eddp-compact {
	display: inline-flex;
	gap: 0.4em;
	padding: 0.35em 0.6em;
	border-radius: 4px;
	background: var(--wpdevart-edd-bg);
	font-size: 0.85em;
}

.wpdevart-edd--style-eddp-compact .wpdevart-edd__icon {
	width: 1.2em;
	height: 1.2em;
}

.wpdevart-edd--style-eddp-bold {
	font-size: 1.08em;
}

.wpdevart-edd--style-eddp-bold .wpdevart-edd__text {
	font-weight: 600;
}

.wpdevart-edd--style-eddp-bold .wpdevart-edd__icon {
	width: 1.8em;
	height: 1.8em;
}

.wpdevart-edd--style-eddp-circle {
	align-items: center;
}

.wpdevart-edd--style-eddp-circle .wpdevart-edd__icon {
	box-sizing: content-box;
	width: 1.3em;
	height: 1.3em;
	padding: 0.55em;
	margin: 0;
	border-radius: 50%;
	background: var(--wpdevart-edd-accent);
	color: #fff;
}

.wpdevart-edd--style-eddp-gradient {
	padding: 0.8em 1em;
	border-radius: var(--wpdevart-edd-radius);
	background: linear-gradient(135deg, var(--wpdevart-edd-bg) 0%, #fff 100%);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.wpdevart-edd--style-eddp-dark {
	padding: 0.8em 1em;
	border-radius: var(--wpdevart-edd-radius);
	background: #1f2125;
	color: #f4f4f5;
}

.wpdevart-edd--style-eddp-dark .wpdevart-edd__icon,
.wpdevart-edd--style-eddp-dark .wpdevart-edd__countdown {
	color: #fff;
}

.wpdevart-edd--style-eddp-winter {
	padding: 0.8em 1em;
	border: 1px solid #c7dcef;
	border-radius: 10px;
	background: linear-gradient(135deg, #f2f8ff 0%, #e3eefa 100%);
	color: #15324f;
}

.wpdevart-edd--style-eddp-winter .wpdevart-edd__icon,
.wpdevart-edd--style-eddp-winter .wpdevart-edd__countdown {
	color: #2d6aa3;
}

/* The "Highlighted" countdown in the design's color (readable on the badge). */
.wpdevart-edd--style-eddp-winter .wpdevart-edd__countdown--badge {
	background: #2d6aa3;
	color: #fff;
}

.wpdevart-edd--style-eddp-spring {
	padding: 0.8em 1em;
	border: 1px solid #cfe8c8;
	border-radius: 10px;
	background: linear-gradient(135deg, #f5fbf1 0%, #e6f4df 100%);
	color: #1f3d17;
}

.wpdevart-edd--style-eddp-spring .wpdevart-edd__icon,
.wpdevart-edd--style-eddp-spring .wpdevart-edd__countdown {
	color: #3e7d2c;
}

.wpdevart-edd--style-eddp-spring .wpdevart-edd__countdown--badge {
	background: #3e7d2c;
	color: #fff;
}

.wpdevart-edd--style-eddp-sale {
	padding: 0.8em 1em;
	border-radius: var(--wpdevart-edd-radius);
	background: #111;
	color: #fff;
}

.wpdevart-edd--style-eddp-sale .wpdevart-edd__icon,
.wpdevart-edd--style-eddp-sale .wpdevart-edd__countdown {
	color: #ff5a3c;
}

.wpdevart-edd--style-eddp-sale .wpdevart-edd__countdown--badge {
	background: #ff5a3c;
	color: #111;
}

/* Product lists: one short line whatever the design. */

.wpdevart-edd--loop[class*="wpdevart-edd--style-eddp-"] {
	display: block;
	margin: 0.35em 0 0.5em;
	padding: 0.35em 0.55em;
	box-shadow: none;
	font-size: 0.9em;
}

.wpdevart-edd--loop.wpdevart-edd--style-eddp-card,
.wpdevart-edd--loop.wpdevart-edd--style-eddp-float,
.wpdevart-edd--loop.wpdevart-edd--style-eddp-minimal,
.wpdevart-edd--loop.wpdevart-edd--style-eddp-underline,
.wpdevart-edd--loop.wpdevart-edd--style-eddp-bold,
.wpdevart-edd--loop.wpdevart-edd--style-eddp-circle {
	padding: 0;
	background: none;
	border: 0;
}

.wpdevart-edd--loop[class*="wpdevart-edd--style-eddp-"] .wpdevart-edd__icon {
	display: inline-block;
	vertical-align: -0.32em;
	box-sizing: border-box;
	width: 1.4em;
	height: 1.4em;
	margin: 0;
	margin-inline-end: 0.35em;
	padding: 0;
	border-radius: 0;
	background: none;
	color: var(--wpdevart-edd-accent);
}

.wpdevart-edd--loop.wpdevart-edd--style-eddp-banner .wpdevart-edd__icon,
.wpdevart-edd--loop.wpdevart-edd--style-eddp-dark .wpdevart-edd__icon,
.wpdevart-edd--loop.wpdevart-edd--style-eddp-sale .wpdevart-edd__icon {
	color: inherit;
}

.wpdevart-edd--loop[class*="wpdevart-edd--style-eddp-"] .wpdevart-edd__body {
	display: inline;
	padding: 0;
}

.wpdevart-edd--loop.wpdevart-edd--style-eddp-ribbon::before {
	display: none;
}

/* Custom icon. */

.wpdevart-edd__icon img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* Cart and checkout line designs (classic). */

.wpdevart-edd--cart-accent .wpdevart-edd__text {
	color: var(--wpdevart-edd-accent);
	font-weight: 600;
}

.wpdevart-edd--cart-badge .wpdevart-edd__text {
	display: inline-block;
	padding: 0.2em 0.65em;
	border: 1px solid var(--wpdevart-edd-accent);
	border-radius: 999px;
}

.wpdevart-edd--cart-box .wpdevart-edd__text {
	display: inline-block;
	padding: 0.35em 0.6em;
	border-radius: var(--wpdevart-edd-radius);
	background: var(--wpdevart-edd-bg);
}

/* Order-by bar -------------------------------------------------------------- */

.wpdevart-eddp-bar {
	--wpdevart-edd-text: var(--wpdevart-eddp-bar-color);
	--wpdevart-edd-accent: var(--wpdevart-eddp-bar-color);
	position: relative;
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 2.5em;
	padding: 0.45em 2.6em;
	background: var(--wpdevart-eddp-bar-bg);
	color: var(--wpdevart-eddp-bar-color);
	font-size: 0.9rem;
	line-height: 1.4;
	text-align: center;
}

/* Hidden until its live text is in place (the height stays reserved at the
   top); without the storefront script it does not show at all. */
.wpdevart-eddp-bar:not(.is-on) {
	visibility: hidden;
}

html:not(.wpdevart-edd-js) .wpdevart-eddp-bar {
	display: none;
}

.wpdevart-eddp-bar .wpdevart-edd {
	display: block;
	margin: 0;
	color: inherit;
	font-size: inherit;
}

.wpdevart-eddp-bar .wpdevart-edd__countdown {
	color: inherit;
}

.wpdevart-eddp-bar--top-float,
.wpdevart-eddp-bar--bottom {
	position: fixed;
	right: 0;
	left: 0;
}

.wpdevart-eddp-bar--top-float {
	top: 0;
}

.admin-bar .wpdevart-eddp-bar--top-float {
	top: 32px;
}

.wpdevart-eddp-bar--bottom {
	bottom: 0;
}

.wpdevart-eddp-bar--top-float:not(.is-on),
.wpdevart-eddp-bar--bottom:not(.is-on),
.wpdevart-eddp-bar.is-empty,
.wpdevart-eddp-bar.is-closed,
.wpdevart-eddp-bar-closed .wpdevart-eddp-bar {
	display: none;
}

.wpdevart-eddp-bar__close {
	position: absolute;
	top: 50%;
	inset-inline-end: 0.6em;
	width: 1.8em;
	height: 1.8em;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: 1.2em;
	line-height: 1;
	cursor: pointer;
	transform: translateY(-50%);
}

.wpdevart-eddp-bar__close:hover,
.wpdevart-eddp-bar__close:focus-visible {
	background: rgba(255, 255, 255, 0.15);
}

@media screen and (max-width: 782px) {
	.admin-bar .wpdevart-eddp-bar--top-float {
		top: 46px;
	}
}

/* Delivery times table ----------------------------------------------------- */

.wpdevart-eddp-table table {
	width: 100%;
	border-collapse: collapse;
}

.wpdevart-eddp-table th,
.wpdevart-eddp-table td {
	padding: 0.55em 0.7em;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	text-align: start;
	vertical-align: top;
}

.wpdevart-eddp-table__note {
	margin-top: 0.6em;
	font-size: 0.9em;
	opacity: 0.8;
}

@media screen and (max-width: 600px) {
	.wpdevart-eddp-table thead {
		display: none;
	}

	.wpdevart-eddp-table tr {
		display: block;
		padding: 0.4em 0;
		border-bottom: 1px solid rgba(0, 0, 0, 0.12);
	}

	.wpdevart-eddp-table td {
		display: flex;
		justify-content: space-between;
		gap: 1em;
		padding: 0.2em 0;
		border: 0;
	}

	.wpdevart-eddp-table td::before {
		content: attr(data-title);
		font-weight: 600;
	}
}

/* Split deliveries --------------------------------------------------------- */

.wpdevart-eddp-order-split {
	margin-top: -0.6em;
}

@media (prefers-reduced-motion: reduce) {
	.wpdevart-eddp-cd-bar span {
		transition: none;
	}
}

/* The bar's own colors inside it (the free stylesheet sets the estimate's
   variables on the inner element). */
.wpdevart-eddp-bar .wpdevart-edd {
	--wpdevart-edd-accent: var(--wpdevart-eddp-bar-color);
	--wpdevart-edd-text: var(--wpdevart-eddp-bar-color);
}

/* The "Highlighted" and "Boxes" countdowns in the bar: its two colors
   swapped (the accent there is the bar's text color). */
.wpdevart-eddp-bar .wpdevart-edd__countdown--badge,
.wpdevart-eddp-bar .wpdevart-edd__unit {
	background: var(--wpdevart-eddp-bar-color);
	color: var(--wpdevart-eddp-bar-bg);
}

/* Countdown styles on dark backgrounds (the bar and the banner, dark and
   sale designs) follow the text color. */
.wpdevart-eddp-bar .wpdevart-eddp-cd--circle,
.wpdevart-edd--style-eddp-banner .wpdevart-eddp-cd--circle,
.wpdevart-edd--style-eddp-dark .wpdevart-eddp-cd--circle,
.wpdevart-edd--style-eddp-sale .wpdevart-eddp-cd--circle {
	border-color: currentColor;
	color: inherit;
}

.wpdevart-eddp-bar .wpdevart-eddp-cd-bar,
.wpdevart-edd--style-eddp-banner .wpdevart-eddp-cd-bar,
.wpdevart-edd--style-eddp-dark .wpdevart-eddp-cd-bar,
.wpdevart-edd--style-eddp-sale .wpdevart-eddp-cd-bar {
	background: rgba(255, 255, 255, 0.25);
}

.wpdevart-eddp-bar .wpdevart-eddp-cd-bar span,
.wpdevart-edd--style-eddp-banner .wpdevart-eddp-cd-bar span,
.wpdevart-edd--style-eddp-dark .wpdevart-eddp-cd-bar span,
.wpdevart-edd--style-eddp-sale .wpdevart-eddp-cd-bar span {
	background: currentColor;
}

/* The event line, timeline and picker buttons on the dark designs. */
.wpdevart-edd--style-eddp-banner .wpdevart-eddp-event,
.wpdevart-edd--style-eddp-dark .wpdevart-eddp-event,
.wpdevart-edd--style-eddp-sale .wpdevart-eddp-event {
	border-inline-start-color: currentColor;
}

.wpdevart-edd--style-eddp-banner .wpdevart-eddp-timeline__step::before,
.wpdevart-edd--style-eddp-banner .wpdevart-eddp-timeline__step::after,
.wpdevart-edd--style-eddp-dark .wpdevart-eddp-timeline__step::before,
.wpdevart-edd--style-eddp-dark .wpdevart-eddp-timeline__step::after,
.wpdevart-edd--style-eddp-sale .wpdevart-eddp-timeline__step::before,
.wpdevart-edd--style-eddp-sale .wpdevart-eddp-timeline__step::after {
	background: currentColor;
}

.wpdevart-edd--style-eddp-banner .wpdevart-eddp-picker__save,
.wpdevart-edd--style-eddp-dark .wpdevart-eddp-picker__save,
.wpdevart-edd--style-eddp-sale .wpdevart-eddp-picker__save {
	border-color: #fff;
	background: #fff;
	color: #1f2125;
}

.wpdevart-edd--style-eddp-banner .wpdevart-eddp-picker__cancel,
.wpdevart-edd--style-eddp-dark .wpdevart-eddp-picker__cancel,
.wpdevart-edd--style-eddp-sale .wpdevart-eddp-picker__cancel {
	border-color: currentColor;
}

.wpdevart-edd--style-eddp-banner .wpdevart-eddp-picker__error,
.wpdevart-edd--style-eddp-dark .wpdevart-eddp-picker__error,
.wpdevart-edd--style-eddp-sale .wpdevart-eddp-picker__error {
	color: #ffb3b3;
}
