/**
 * Order Steps Progress Widget Styles
 *
 * @package Dove Agency
 * @since 1.0.0
 */

/* Wrapper Container */
.dove-order-steps-wrapper {
	position: relative;
}

/* Placeholder - maintains space when widget is sticky */
.dove-order-steps-placeholder {
	display: none;
	width: 100%;
	transition: height 0.3s ease;
}

/* Main Container */
.dove-order-steps-widget {
	background-color: #ffffff;
	padding: 30px;
	box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.5);
	transition: all 0.3s ease;
	z-index: 97;
}

/* Sticky Behavior */
.dove-order-steps-widget.dove-sticky-enabled {
	position: relative;
}

.dove-order-steps-widget.is-sticky {
	position: fixed;
	z-index: 97;
	box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.5);
	transition: padding 0.05s linear;
	/* Width and left position set by JavaScript to match original */
}

/* Content compression during scroll */
.dove-steps-content {
	overflow: hidden;
	transition: max-height 0.05s linear, opacity 0.05s linear, margin-bottom 0.05s linear;
}

/* Minimized State */
.dove-order-steps-widget.is-minimized .dove-steps-content {
	max-height: 0 !important;
	opacity: 0 !important;
	margin-bottom: 0 !important;
	padding: 0;
}

.dove-order-steps-widget.is-minimized {
	padding: 15px 30px !important;
}

/* Header Section (Always Visible) */
.dove-steps-header {
	text-align: center;
	margin-bottom: 10px;
}

.dove-steps-heading {
	font-size: 32px;
	font-weight: 700;
	/* margin: 0 0 15px 0; */
	line-height: 1.2;
	color: #000;
}

.dove-sub-heading {
	display: inline;
	font-size: 28px;
	font-weight: 400;
	margin-top: 5px;
}

/* Collapsible Content Section */
.dove-steps-description {
	font-size: 16px;
	line-height: 1.6 !important;
	color: #666;
	color: #000;
	margin: 0 0 20px 0;
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

/* Divider Lines */
.dove-steps-divider {
	border: none;
	border-top: 1px solid #e0e0e0;
	margin: 20px 0;
	width: 100%;
}

.dove-steps-divider-top {
	margin-bottom: 20px;
}

.dove-steps-divider-bottom {
	margin-top: 20px;
}

/* Progress Steps */
.dove-steps-progress {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 15px;
	margin: 8px auto;
	position: relative;
	max-width: 700px;
	padding: 0 20px;
}

/* .dove-steps-progress::before {
	content: '';
	position: absolute;
	top: 12px;
	left: calc(10% + 20px);
	right: calc(10% + 20px);
	height: 1px;
	background: #d0d0d0;
	z-index: 0;
} */

.dove-step {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	position: relative;
	z-index: 1;
	flex: 1;
}

.dove-step-icon {
	width: 14px;
	height: 14px;
	min-width: 14px;
	min-height: 14px;
	border-radius: 50%;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #d0d0d0;
	color: #ffffff;
	font-size: 10px;
	transition: all 0.3s ease;
	aspect-ratio: 1 / 1;
	flex-shrink: 0;
}

.dove-step.active .dove-step-icon {
	background: #4D725C;
	color: #ffffff;
}

.dove-step-label {
	font-size: 14px;
	text-align: left;
	color: #999999;
	font-weight: 400;
	transition: color 0.3s ease;
	white-space: nowrap;
}

.dove-step.active .dove-step-label {
	color: #00b67a;
	font-weight: 600;
}

/* Action Buttons */
.dove-steps-actions {
	display: flex;
	justify-content: center;
	gap: 15px;
	margin-top: 30px;
	flex-wrap: wrap;
	transition: margin-top 0.05s linear;
}

.dove-steps-actions > * { /* Apply to all direct children of .dove-steps-actions */
  flex: 1; /* Shorthand for flex-grow: 1, flex-shrink: 1, flex-basis: 0% */
  box-sizing: border-box; /* Ensure padding and border are included in the width calculation */
}

.dove-action-button {
	padding: 15px 50px;
	border: none;
	border-radius: 0px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.3s ease;
	display: inline-block;
	min-width: 180px;
	text-align: center;
}

.dove-action-button.disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

.dove-action-button.active-orange {
	background: #F5A623 !important;
	color: #ffffff;
}

.dove-action-button.active-orange:hover {
	background: #e09615;
}

.dove-action-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dove-action-button:nth-child(1) {
	background-color: #f5a623;
	color: #000;
}

.dove-action-button:nth-child(2),
.dove-action-button:nth-child(3) {
	background-color: #e0e0e0;
	color: #000;
}



/* Tablet Responsive */
@media (max-width: 1024px) {
	.dove-order-steps-widget {
		padding: 25px 20px;
	}
	
	.dove-steps-heading {
		font-size: 28px;
	}
	
	.dove-sub-heading {
		font-size: 24px;
	}
	
	.dove-steps-description {
		font-size: 15px;
	}
	
	.dove-steps-progress {
		gap: 12px;
	}
	
	.dove-step {
		gap: 6px;
	}
	
	.dove-step-icon {
		width: 22px;
		height: 22px;
		min-width: 22px;
		min-height: 22px;
		font-size: 9px;
	}
	
	.dove-step-label {
		font-size: 13px;
	}
	
	.dove-action-button {
		padding: 12px 25px;
		font-size: 13px;
		min-width: 150px;
	}
}

/* Mobile Responsive */
@media (max-width: 768px) {
	.dove-order-steps-widget {
		padding: 20px 15px;
	}
	
	.dove-order-steps-widget.is-minimized {
		padding: 10px 15px !important;
	}
	
	.dove-order-steps-widget.is-sticky {
		padding: 20px 15px;
	}
	
	.dove-steps-heading {
		font-size: 24px;
	}
	
	.dove-sub-heading {
		display: block !important;
		font-size: 20px;
	}
	
	.dove-steps-description {
		font-size: 14px;
	}
	
	.dove-steps-progress {
		gap: 8px;
		margin: 20px 0;
		flex-direction: row;
		align-items: flex-start;
	}
	
	/* .dove-steps-progress::before {
		display: none;
	} */
	
	.dove-step {
		gap: 8px;
	}
	
	.dove-step-icon {
		width: 20px;
		height: 20px;
		min-width: 20px;
		min-height: 20px;
		font-size: 8px;
	}
	
	.dove-step-label {
		font-size: 12px;
	}
	
	/* Hide steps 4 and 5 on mobile */
	.dove-step-4,
	.dove-step-5 {
		display: none;
	}
	
	/* Hide button 3 when sticky on mobile */
	.dove-order-steps-widget.is-sticky .dove-button-3 {
		display: none;
	}
	
	/* Hide button 2 when sticky on mobile unless active */
	.dove-order-steps-widget.is-sticky .dove-button-2:not(.active-orange) {
		display: none;
	}
	
	.dove-steps-actions {
		flex-direction: column;
		gap: 10px;
	}
	
	.dove-action-button {
		width: 100%;
		min-width: auto;
		padding: 12px 20px;
		font-size: 12px;
	}
}

/* Small Mobile */
@media (max-width: 480px) {
	.dove-order-steps-widget {
		padding: 15px 10px;
	}
	
	.dove-steps-heading {
		font-size: 20px;
	}
	
	.dove-sub-heading {
		font-size: 18px;
	}
	
	.dove-steps-description {
		font-size: 13px;
	}
	
	.dove-steps-progress {
		gap: 6px;
		margin: 15px 0;
	}
	
	.dove-step {
		gap: 6px;
	}
	
	.dove-step-icon {
		width: 18px;
		height: 18px;
		min-width: 18px;
		min-height: 18px;
		font-size: 7px;
	}
	
	.dove-step-label {
		font-size: 11px;
	}
	
	.dove-action-button {
		padding: 10px 15px;
		font-size: 11px;
	}
}

/* Dropdown Styles */
.dove-steps-dropdown-wrapper {
	position: relative;
	display: inline-block;
}

.dove-dropdown-toggle {
	padding: 15px 58px;
	border: none;
	border-radius: 0px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.3s ease;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	min-width: 180px;
	text-align: center;
	background: #F5A623;
	color: #ffffff;
	box-sizing: border-box;
	line-height: 1.5;
	vertical-align: top;
}

.dove-dropdown-toggle:hover {
	background: #e09615;
}

.dove-steps-dropdown-wrapper.has-selection .dove-dropdown-toggle {
	background: #4D725C;
}

.dove-steps-dropdown-wrapper.has-selection .dove-dropdown-toggle:hover {
	background: #3d5a49;
}

/* Green completed state for button 1 when option is selected */
.dove-dropdown-toggle.completed-green {
	background: #4D725C !important;
	color: #ffffff !important;
	transition: background 0.3s ease, color 0.3s ease;
}

.dove-dropdown-toggle.completed-green:hover {
	background: #3d5a49 !important;
}

.dove-dropdown-label {
	flex: 1;
	white-space: nowrap;
}

.dove-dropdown-arrow {
	transition: transform 0.3s ease;
	margin-left: 8px;
	flex-shrink: 0;
	width: 12px;
	height: 12px;
}

.dove-steps-dropdown-wrapper.is-open .dove-dropdown-arrow {
	transform: rotate(180deg);
}

.dove-dropdown-menu {
	position: absolute;
	top: calc(100% + 5px);
	left: 0;
	min-width: 100%;
	width: max-content;
	background: #ffffff;
	border: 1px solid #e0e0e0;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
	z-index: 98;
}

.dove-steps-dropdown-wrapper.is-open .dove-dropdown-menu {
	max-height: 600px;
	opacity: 1;
	visibility: visible;
}

.dove-dropdown-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 20px;
	color: #333333;
	text-decoration: none;
	font-size: 14px;
	border-bottom: 1px solid #f0f0f0;
	transition: background-color 0.2s ease;
}

.dove-dropdown-item:last-child {
	border-bottom: none;
}

.dove-dropdown-item:hover {
	background-color: #f8f8f8;
}

.dove-dropdown-item.checked {
	background-color: #4D725C;
	color: #ffffff;
}

.dove-dropdown-item.checked:hover {
	background-color: #3d5a49;
}

.dove-dropdown-checkbox {
	width: 18px;
	height: 18px;
	min-width: 18px;
	min-height: 18px;
	border: 2px solid #d0d0d0;
	border-radius: 2px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #ffffff;
	transition: all 0.2s ease;
}

.dove-dropdown-checkbox svg {
	color: #4D725C;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.dove-dropdown-item.checked .dove-dropdown-checkbox {
	background: #ffffff;
	border-color: #ffffff;
}

.dove-dropdown-item.checked .dove-dropdown-checkbox svg {
	opacity: 1;
}

.dove-dropdown-text {
	flex: 1;
	font-weight: 500;
	text-transform: uppercase;
}

/* Elementor Editor Specific Styles */
.elementor-editor-active .dove-order-steps-widget.is-sticky {
	position: relative !important;
	top: auto !important;
	width: auto !important;
}

/* Ensure consistency between editor and frontend */
.elementor-widget-dove_order_steps .dove-step-icon {
	flex-shrink: 0;
}

.elementor-widget-dove_order_steps .dove-steps-progress {
	flex-wrap: nowrap;
}

.elementor-widget-dove_order_steps .dove-step {
	min-width: 60px;
}

/* Fix for Elementor preview mode */
.elementor-element .dove-step-icon i {
	display: block;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.elementor-element .dove-step-icon svg {
	width: 12px;
	height: 12px;
	color: white;
}
