/**
 * PatDoc Link Booking Form - Professional Style
 *
 * @author     PatDoc Link Solutions LLC
 * @version    1.2.0
 * @brand      Color: #779477, Font: Poppins
 */

/* ==========================================================================
   1. General & Wrapper Styles
   ========================================================================== */

/**
 * Main container for the entire booking form.
 * Establishes the overall look, font, and positioning.
 * Initializes the CSS counter for numbering the steps.
 */
#pdl-booking-form-wrapper {
	background-color: #ffffff !important;
	font-family: 'Poppins', sans-serif !important;
	max-width: 650px !important;
	margin: 2rem auto !important;
	padding: 2.5rem !important;
	border: 1px solid #e9e9e9 !important;
	border-radius: 12px !important;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05) !important;
	counter-reset: step-counter !important;
}


/* ==========================================================================
   2. Step Headings & Numbering
   ========================================================================== */

/**
 * Styles for the main heading of each form step (e.g., "Your Trip").
 */
.pdl-form-step h3 {
	position: relative !important;
	display: flex !important;
	align-items: center !important;
	font-weight: 600 !important;
	font-size: 1.5rem !important;
	margin-top: 0 !important;
	margin-bottom: 2.5rem !important;
	color: #2d3748 !important;
	border-bottom: none !important;
	padding-bottom: 0 !important;
	padding-left: 60px !important; /* Makes space for the numbered circle */
	min-height: 44px !important;
	counter-increment: step-counter !important; /* Increments the step number */
}

/**
 * Creates the circular, numbered indicator for each step heading
 * using the CSS counter defined in the wrapper.
 */
.pdl-form-step h3::before {
	content: attr(data-step) !important;
	position: absolute !important;
	left: 0 !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	background-color: #779477 !important;
	color: white !important;
	font-weight: 700 !important;
	font-size: 1.2rem !important;
	width: 44px !important;
	height: 44px !important;
	border-radius: 50% !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-shadow: 0 4px 8px rgba(119, 148, 119, 0.3) !important;
}

/**
 * Overrides the final confirmation step's number with a checkmark for visual feedback.
 */
#pdl-step-4 h3::before {
	content: '\2713' !important;
	font-size: 1.5rem !important;
}


/* ==========================================================================
   3. Form Elements (Inputs, Labels)
   ========================================================================== */

.pdl-input-group {
	margin-bottom: 1.25rem !important;
}

.pdl-label {
	display: block !important;
	margin-bottom: 0.5rem !important;
	font-weight: 600 !important;
	font-size: 0.9rem !important;
	color: #4a5568 !important;
}

.pdl-input,
.pdl-textarea {
	width: 100% !important;
	padding: 11px 14px !important;
	font-family: 'Poppins', sans-serif !important;
	font-size: 1rem !important;
	color: #2d3748 !important;
	background-color: #fdfdfd !important;
	border: 1px solid #cbd5e0 !important;
	border-radius: 8px !important;
	box-sizing: border-box !important;
	transition: all 0.3s ease !important;
}

/**
 * Provides visual feedback when a user clicks into an input field.
 */
.pdl-input:focus,
.pdl-textarea:focus {
	outline: none !important;
	border-color: #779477 !important;
	box-shadow: 0 0 0 3px rgba(119, 148, 119, 0.2) !important;
}


/* ==========================================================================
   4. Trip Information & Animation
   ========================================================================== */

/**
 * The info box that displays calculated distance, time, and price.
 * It is hidden by default and prepared for a smooth reveal animation.
 */
.pdl-trip-info {
	opacity: 0 !important;
	max-height: 0 !important;
	margin-top: 0 !important;
	padding: 0 1rem !important;
	overflow: hidden !important;
	background-color: #f7f9f7 !important;
	border-left: 4px solid #779477 !important;
	border-radius: 0 14px 14px 0 !important;
	transition: all 0.5s ease-in-out !important;
}

/**
 * The visible state for the trip info box, triggered by JavaScript.
 * This class makes the box animate into view.
 */
.pdl-trip-info.visible {
	opacity: 1 !important;
	max-height: 300px !important; /* A height large enough for the content */
	margin-top: 1.5rem !important;
	padding: 1rem !important;
}

.pdl-trip-info p {
	margin: 0.5rem 0 !important;
	font-size: 1rem !important;
}


/* ==========================================================================
   5. Buttons
   ========================================================================== */

/**
 * Container for the form action buttons (Next, Previous, Confirm).
 * Uses flexbox for alignment.
 */
.pdl-button-container {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	margin-top: 2rem !important;
	padding-top: 1.5rem !important;
	border-top: 1px solid #e2e8f0 !important;
}

/**
 * Modifier for button containers with only a single button, to align it to the right.
 */
.pdl-button-container-single {
	justify-content: flex-end !important;
}

/**
 * Base styles for all buttons.
 */
.pdl-button,
.pdl-button-secondary {
	padding: 10px 28px !important;
	border: 2px solid transparent !important;
	border-radius: 8px !important;
	cursor: pointer !important;
	font-size: 1rem !important;
	font-weight: 600 !important;
	text-align: center !important;
	transition: all 0.3s ease !important;
}

/**
 * Primary action buttons (e.g., "Next", "Confirm Booking").
 */
.pdl-button {
	background-color: #779477 !important;
	color: white !important;
	border-radius: 200px !important;
}

.pdl-button:hover {
	background-color: #647e64 !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
}

/**
 * Secondary action buttons (e.g., "Previous").
 */
.pdl-button-secondary {
	border-radius: 200px !important;
	background-color: transparent !important;
	border-color: #cbd5e0 !important;
	color: #4a5568 !important;
	margin-right: 1rem !important;
}

.pdl-button-secondary:hover {
	background-color: #edf2f7 !important;
	border-color: #a0aec0 !important;
	color: #2d3748 !important;
}

/**
 * Style for a disabled button to provide visual feedback.
 */
.pdl-button:disabled {
	background-color: #a0aec0 !important;
	cursor: not-allowed !important;
	transform: none !important;
	box-shadow: none !important;
}


/* ==========================================================================
   6. Summary Page
   ========================================================================== */

/**
 * Container for the final booking summary on Step 3.
 */
#pdl-summary {
	background-color: #ffffff !important;
	border: 1px solid #e2e8f0 !important;
	padding: 0 !important;
	border-radius: 16px !important;
	margin-bottom: 2rem !important;
	overflow: hidden !important;
}

#pdl-summary h4 {
	padding: 1rem 1.5rem !important;
	margin: 0 !important;
	font-size: 1.1rem !important;
	font-weight: 600 !important;
	color: #2d3748 !important;
	background-color: #f7f9f7 !important;
	border-bottom: 1px solid #e2e8f0 !important;
}

#pdl-summary h4:first-of-type {
	border-top-left-radius: 8px !important;
	border-top-right-radius: 8px !important;
}

/**
 * The definition list used for the summary details.
 * Styled as a two-column grid for a table-like layout.
 */
.pdl-summary-list {
	display: grid !important;
	grid-template-columns: 120px 1fr !important;
	gap: 0 !important;
	margin: 0 !important;
	padding: 1.5rem !important;
}
.pdl-summary-list dt {
	font-weight: 500 !important;
	color: #718096 !important;
	max-width: 280px!important;
    width: 270px!important;
}

.pdl-summary-list dt,
.pdl-summary-list dd {
	padding: 1rem 0 !important;
	margin: 0 !important;
	display: flex !important;
	align-items: center !important;
	border-bottom: 1px solid #f0f2f0 !important;
}

.pdl-summary-list:last-of-type dt:last-of-type,
.pdl-summary-list:last-of-type dd:last-of-type {
	border-bottom: none !important;
}

/* Summary item label (e.g., "From") */


/* Summary item value (e.g., "New York, NY") */
.pdl-summary-list dd {
	justify-content: flex-end !important;
	font-weight: 600 !important;
	color: #2d3748 !important;
}


/* ==========================================================================
   7. Utility & Feedback (Errors, Spinner)
   ========================================================================== */

/**
 * Styles for error message boxes.
 */
.pdl-error {
	background-color: #fed7d7 !important;
	color: #c53030 !important;
	padding: 1rem !important;
	border: 1px solid #fbb6b6 !important;
	border-left: 4px solid #c53030 !important;
	border-radius: 0 !important;
	margin-bottom: 1rem !important;
	margin-top: 10px !important;
}

/**
 * The loading spinner overlay.
 */
.pdl-spinner {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	background-color: rgba(255, 255, 255, 0.85) !important;
	z-index: 10 !important;
	border-radius: 12px !important;
}

.pdl-loader {
	border: 5px solid rgba(119, 148, 119, 0.2) !important;
	border-top: 5px solid #779477 !important;
	border-radius: 50% !important;
	width: 50px !important;
	height: 50px !important;
	animation: pdl-spin 1s linear infinite !important;
	position: absolute !important;
	top: 50% !important;
	left: 50% !important;
	margin-top: -25px !important;
	margin-left: -25px !important;
}

@keyframes pdl-spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/**
 * Creates the red asterisk (*) for required field labels.
 */
.pdl-label.pdl-required::after {
	content: '*' !important;
	color: #c53030 !important;
	font-weight: 600 !important;
	margin-left: 4px !important;
	vertical-align: super !important;
	font-size: 0.9rem !important;
	position: absolute !important;
	margin-top: 3px !important;
}

/**
 * The disclaimer note in the trip info box.
 */
.pdl-disclaimer-note {
	font-size: 0.9rem !important;
	font-style: italic !important;
	color: #779477 !important;
	margin-top: 1rem !important;
	padding-top: 1rem !important;
	border-top: 1px dashed #e2e8f0 !important;
}
.pdl-disclaimer-note a {
	color: #779477 !important;
	text-decoration: underline !important;
}


/* ==========================================================================
   8. Responsive Design
   ========================================================================== */

/**
 * Adjustments for smaller screens (e.g., mobile devices).
 */
@media (max-width: 680px) {
	#pdl-booking-form-wrapper {
		padding: 1.5rem !important;
	}

	.pdl-summary-list {
		grid-template-columns: 1fr !important;
	}
	.pdl-summary-list dd {
		justify-content: flex-start !important;
		padding-top: 0.25rem !important;
		border-bottom: none !important;
	}
	.pdl-summary-list dt {
		padding-bottom: 0.25rem !important;
	}
	.pdl-summary-list dt:not(:first-child) {
		border-top: 1px solid #f0f2f0 !important;
		padding-top: 1rem !important;
	}

	.pdl-button-container {
		flex-direction: column-reverse !important;
	}
	.pdl-button-secondary {
		margin: 0 0 1rem 0 !important;
		width: 100% !important;
	}
	.pdl-button {
		width: 100% !important;
	}
}

@media screen and (max-width:767px){
    #pdl-booking-form-wrapper{
        margin:0!important;
        border-radius:0!important;
        padding:15px!important;
    }
    .pdl-form-step h3{
        padding-left:45px!important;
        font-size:1.3rem!important;
        margin-bottom:15px!important;
    }
    .pdl-form-step h3::before{
        width:34px!important;
        height:34px!important;
        font-size:1rem!important;
        margin:0!important;
    }
    .pdl-input, .pdl-textarea{
        padding:8px 14px!important;
    }
    .pdl-button-container{
        margin-top:1rem!important;
    }
    .pdl-next-btn{
        margin-bottom:8px!important;
    }
}

.pdl-radio-group, .pdl-checkbox-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
}

.pdl-radio-group label, .pdl-checkbox-group label {
    display: flex !important;
    align-items: center !important;
    font-weight: 500 !important;
    cursor: pointer !important;
}

.pdl-radio-group input, .pdl-checkbox-group input {
    margin-right: 0.75rem !important;
    width: 18px !important;
    height: 18px !important;
    accent-color: #779477 !important;
}

.pdl-price-breakdown {
	opacity: 0 !important;
	max-height: 0 !important;
	margin-top: 0 !important;
	overflow: hidden !important;
	background-color: #f7f9f7 !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 8px !important;
	transition: all 0.5s ease-in-out !important;
}

.pdl-price-breakdown.visible {
	opacity: 1 !important;
	max-height: 430px !important;
	margin-top: 1.5rem !important;
}

.pdl-price-breakdown .pdl-summary-list {
    padding: 1rem 1.5rem !important;
}

.pdl-price-breakdown .pdl-disclaimer-note {
    padding: 0 1.5rem 1rem !important;
    margin: 0 !important;
    border-top: 1px dashed #e2e8f0 !important;
    padding-top: 1rem !important;
}

.pdl-total-price {
    font-weight: 700 !important;
    color: #2d3748 !important;
    font-size: 1.1rem !important;
}

#pdl-summary {
	background-color: transparent !important;
	border: none !important;
	padding: 0 !important;
	border-radius: 0 !important;
	margin-bottom: 2rem !important;
}

.pdl-accordion {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.pdl-accordion-item:not(:last-child) {
    border-bottom: 1px solid #e2e8f0 !important;
}

.pdl-accordion-header {
    width: 100% !important;
    background-color: #f7f9f7 !important;
    padding: 1rem 1.5rem !important;
    border: none !important;
    text-align: left !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #2d3748 !important;
    cursor: pointer !important;
	border-radius: 0!important;
    position: relative !important;
    transition: background-color 0.3s ease !important;
}

.pdl-accordion-header:hover {
    background-color: #edf2f7 !important;
		border-radius: 0!important;
}

.pdl-accordion-header::after {
    content: '+' !important;
    position: absolute !important;
    right: 1.5rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 1.5rem !important;
    font-weight: 400 !important;
    color: #718096 !important;
    transition: transform 0.3s ease !important;
}

.pdl-accordion-header.active::after {
    content: '−' !important; /* Minus sign */
}

.pdl-accordion-content {
    display: none; /* Hidden by default for slideToggle */
    background-color: #ffffff !important;
}

.pdl-summary-list {
	display: grid !important;
	grid-template-columns: 140px 1fr !important;
	gap: 0 !important;
	margin: 0 !important;
	padding: 1.5rem !important;
}

.pdl-total-price {
    font-weight: 700 !important;
    color: #2d3748 !important;
    font-size: 1.1rem !important;
}

/* NEW STYLE for the small detail text (e.g., "(x2 Round Trip)") */
.pdl-price-detail {
    font-weight: 400 !important;
    font-size: 0.8rem !important;
    color: #718096 !important;
    margin-left: 8px !important;
}