/* Equal Height Cards */
#leadgen-funnel .leadgen-grid-equal-h>div {
    height: 100%;
}

/* Progress Bar Base */
#leadgen-progress-bar {
    width: 0;
    position: relative;
    overflow: hidden;
}

/* Animated Stripes Layer */
#leadgen-progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(45deg,
            rgba(255, 255, 255, 0.25) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, 0.25) 50%,
            rgba(255, 255, 255, 0.25) 75%,
            transparent 75%,
            transparent);
    background-size: 1rem 1rem;
    /*animation: leadgen-progress-bar-stripes 1s linear infinite;*/
}

@keyframes leadgen-progress-bar-stripes {
    0% {
        background-position: 1rem 0;
    }

    100% {
        background-position: 0 0;
    }
}

/* Fix progress bar visibility on wide screens */
#leadgen-funnel #leadgen-progress-bar-wrap {
    z-index: 20;
    /* Ensure progress bar stays above modal content */
    top: 0;
    /* Adjust position to be at the very top */
    border-top-left-radius: 12px;
    /* Match modal's top border radius */
    border-top-right-radius: 12px;
}

#leadgen-funnel .min-h-screen {
    min-height: 100dvh;
    /* Uses dynamic viewport height */
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    /* Align to top instead of center */
    justify-content: center;
}

/* Remove the alignment spacer as we're using flex now */
#leadgen-funnel .inline-block.h-screen {
    display: none;
    /* Hide the alignment spacer */
}

/* Adjust modal content */
#leadgen-funnel .inline-block.w-full {
    margin: 0;
    /* Remove auto margins */
    margin-top: 1rem;
    /* Add small top margin */
}

/* Media query for larger screens */
@media (min-width: 768px) {
    #leadgen-funnel .min-h-screen {
        align-items: center;
        /* Center vertically on desktop */
        padding: 2rem;
    }

    #leadgen-funnel .inline-block.w-full {
        margin-top: 0;
        /* Remove top margin on desktop */
    }
}

@media (min-width: 768px) {
    .leadgen-grid-checkboxes-equal-h {
        align-items: stretch;
        /* ensures each row's items match height within that row only */
    }

    .leadgen-grid-checkboxes-equal-h>div,
    .leadgen-grid-checkboxes-equal-h>div>label {
        /* Remove the forced height: 100%; */
        height: auto;
    }
}

.leadgen-grid-checkboxes-equal-h {
    /* Make the grid items stretch so that in each row, items match the tallest sibling */
    align-items: stretch;
    /* By default, grid-auto-rows: auto will let each row size itself independently */
}

/* Base style for the radio checkmark SVG (ensure it starts hidden) */
#leadgen-funnel input[type="radio"].peer~label svg[data-load-svg*="check-filled.svg"] {
    transform: scale(0);
    opacity: 0;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
    transform-origin: center;
}

/* Style for the radio checkmark SVG WHEN CHECKED */
#leadgen-funnel input[type="radio"].peer:checked~label svg[data-load-svg*="check-filled.svg"], .leadgen-steps-wrapper input[type="radio"].peer:checked~label svg[data-load-svg*="check-filled.svg"] {
    transform: scale(1);
    opacity: 1;
}

/* Style for the radio checkmark SVG ON HOVER (for desktop) */
@media (hover: hover) and (pointer: fine) {
    #leadgen-funnel input[type="radio"].peer~label:hover svg[data-load-svg*="check-filled.svg"] {
        transform: scale(1);
        opacity: 1;
    }
}

/* Checkmark Animation Refinements */
#leadgen-funnel .peer:checked~label .leadgen-svg-check-square-filled, .leadgen-steps-wrapper .peer:checked~label .leadgen-svg-check-square-filled {
    opacity: 1;
    transform: scale(1);
}

/* Smooth scaling for checkmark */
#leadgen-funnel .leadgen-svg-check-square-filled {
    transform-origin: center;
}

#leadgen-funnel .peer:checked~label .leadgen-checkbox-box {
    border-color: #ff8904;
}

/*Base styles for the checkmark icon*/
#leadgen-funnel .leadgen-svg-check-square-filled {
    opacity: 0;
    transform: scale(0);
    transform-origin: center;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

/* Address suggestions dropdown */
#leadgen-address-suggestions {
    border: 1px solid #E5E7EB;
    /* Tailwind gray-200 */
    border-radius: 0.5rem;
    /* Tailwind rounded-lg */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#leadgen-address-suggestions li,
#leadgen-address-suggestions div {
    /* However you structure each suggestion item */
    padding: 0.5rem 1rem;
    cursor: pointer;
}

#leadgen-address-suggestions li:hover,
#leadgen-address-suggestions div:hover {
    background: #F3F4F6;
    /* Tailwind gray-100 */
}

/* If you have a class for "highlighted" or "active-suggestion": */
.leadgen-highlighted {
    background: #E5E7EB;
    /* gray-200 */
}

.leadgen-input-container {
    position: relative;
    margin-bottom: 30px;
}

.leadgen-input-with-error {
    margin-bottom: 20px;
}

.relative .leadgen-validation-icon {
    z-index: 5;
}

/* Step transitions */
.leadgen-step {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.leadgen-step.hidden {
    opacity: 0;
}

/* Thank you step animations */
/* Thank You Checkmark Animations */
.thank-you-checkmark {
    animation: checkmark-appear 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
               checkmark-pulse 2s ease-in-out 1s infinite;
}

.thank-you-checkmark svg {
    animation: checkmark-draw 0.5s ease-out 0.3s both;
}

/* Initial scale-in with bounce */
@keyframes checkmark-appear {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* SVG path drawing animation */
@keyframes checkmark-draw {
    0% {
        stroke-dasharray: 24;
        stroke-dashoffset: 24;
    }
    100% {
        stroke-dasharray: 24;
        stroke-dashoffset: 0;
    }
}


/* EOF Thank You Animation */

.leadgen-info ul {
    list-style: none;
    padding-left: 0;
}

.leadgen-info ul li {
    position: relative;
    padding-left: 1.15rem;
}

.leadgen-info ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0.05em;
    color: #1D4ED8;
    font-size: 1.2em;
}



/* BOF Contact Us Form */
.glow-circle {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 112, 243, 0.3) 0%, rgba(0, 52, 120, 0) 70%);
    border-radius: 50%;
    opacity: 0.7;
}

.social-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-icon-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.premium-input-group {
    transform: translateY(0);
    transition: all 0.3s ease;
}

.premium-input-group:focus-within {
    transform: translateY(-2px);
}

.premium-input {
    transition: all 0.3s ease;
}

.premium-input:focus {
    background-color: #f0f7ff;
}

.premium-label {
    transition: all 0.3s ease;
}

.input-icon {
    transition: all 0.3s ease;
}

.premium-input-group:focus-within .input-icon {
    color: #2563eb;
}

.input-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #2563eb, #3b82f6);
    transition: width 0.3s ease;
}

.premium-input-group:focus-within .input-highlight {
    width: 100%;
}

/* Static Floating orbs */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.1) 70%);
    top: 10%;
    right: 5%;
}

.orb-2 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.2) 0%, rgba(3, 105, 161, 0.05) 70%);
    bottom: 15%;
    left: 10%;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, rgba(67, 56, 202, 0.05) 70%);
    top: 40%;
    left: 15%;
}

.contact-success-message {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    width: 100%;
}

.contact-success-message.show {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.premium-input-group {
    transform: translateY(0);
    transition: all 0.3s ease;
}

.premium-input-group:focus-within {
    transform: translateY(-2px);
}

.premium-input {
    transition: all 0.3s ease;
}

.premium-input:focus {
    background-color: #f0f7ff;
}

.premium-label {
    transition: all 0.3s ease;
    pointer-events: none;
}

.input-icon {
    transition: all 0.3s ease;
}

.premium-input-group:focus-within .input-icon span svg {
    color: #2563eb !important;
}

.premium-input-group:focus-within .input-icon .load-svg {
    color: #2563eb !important;
}

.input-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #2563eb, #3b82f6);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.premium-input-group:focus-within .input-highlight {
    width: 100%;
}

.premium-input::placeholder {
    color: transparent;
}

/* EOF Contact Us Form */

/*
================================================================
  Lead Generation Funnel & Bottom Sheet Styles
================================================================
*/

/* --- Base Layout --- */

#leadgen-funnel {
    display: flex;
    align-items: flex-end; /* Mobile: Aligns sheet to the bottom */
    justify-content: center;
}

@media (min-width: 768px) {
    #leadgen-funnel {
        align-items: center; /* Desktop: Centers modal vertically */
        padding: 1rem;
    }
}

/* --- Modal/Sheet Panel --- */

.leadgen-modal {
    /* Transitions */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 767px) {
    /* Mobile Bottom Sheet */
    .leadgen-modal {
        width: 100vw !important;
        max-width: none !important;
        margin: 0 !important;
        border-radius: 1.5rem 1.5rem 0 0 !important;
        position: relative;
        box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.1);
        transform: translateY(100%); /* Start off-screen */
    }
}

@media (min-width: 768px) {
    /* Desktop Modal */
    .leadgen-modal {
        transform: scale(0.95);
        opacity: 0;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* --- Open/Visible State --- */

#leadgen-funnel.is-open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

#leadgen-funnel:not(.is-open) {
    visibility: hidden;
}

#leadgen-funnel.is-open .leadgen-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* --- UI Components --- */

/* Mobile Grab Handle */
.leadgen-grab-handle {
    transition: background-color 0.2s ease;
    cursor: grab;
}

.leadgen-grab-handle:active {
    cursor: grabbing;
    background-color: #9ca3af; /* gray-400 */
}

/* Close Button */
.leadgen-close {
    z-index: 30;
    transition: all 0.2s ease;
}

.leadgen-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

@media (max-width: 767px) {
    .leadgen-close {
        width: 2rem !important;
        height: 2rem !important;
        background-color: rgba(255, 255, 255, 0.9) !important;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 9999px; /* full round */
    }
    .leadgen-close:hover {
        transform: scale(1.05);
    }
}

/* Progress Bar */
#leadgen-progress-bar-wrap {
    z-index: 10;
}

/* Dragging States */
.leadgen-modal.dragging {
    transition: none !important;
}
.leadgen-modal.drag-closing {
    transition: transform 0.2s ease-out !important;
}

/*
================================================================
  Safe Area Padding for Mobile Devices
================================================================
*/

/*
  This class adds bottom padding that respects the "safe area" on modern
  mobile devices (e.g., the space for the home bar on iPhones).
  It combines a generous base padding (24px) with the device's safe area inset.
*/
.pb-safe {
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
}

/* Fallback for browsers that do not support env() */
@supports not (padding-bottom: env(safe-area-inset-bottom)) {
  .pb-safe {
    /* Provide a larger fixed padding as a fallback for older devices */
    padding-bottom: 2rem;
  }
}

/*
================================================================
  Unified Auto-Advance Progress Bar Styles
================================================================
*/

/* Group selector for both modal and inline buttons */
#leadgen-next-btn,
#book-service-funnel-next-btn,
#book-service-quick-repair-funnel-next-btn,
#book-safety-inspection-funnel-next-btn,
#book-upgrade-funnel-next-btn,
#book-walk-thru-funnel-next-btn,
#get-urgent-help-funnel-next-btn {
    position: relative;
    overflow: hidden;
    transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease !important;
}

/* Pseudo-element for the progress bar on both buttons */
#leadgen-next-btn::after,
#book-service-funnel-next-btn::after,
#book-service-quick-repair-funnel-next-btn::after,
#book-safety-inspection-funnel-next-btn::after,
#book-upgrade-funnel-next-btn::after,
#book-walk-thru-funnel-next-btn::after,
#get-urgent-help-funnel-next-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 6px;
    width: 0; /* Always start at 0 width */
    background-color: rgba(255, 255, 255, 0.4);
    transition: width var(--auto-advance-duration, 0s) linear;
}

/* When the parent button has this class, the progress bar fills up */
#leadgen-next-btn.is-advancing::after,
#book-service-funnel-next-btn.is-advancing::after,
#book-service-quick-repair-funnel-next-btn.is-advancing::after,
#book-safety-inspection-funnel-next-btn.is-advancing::after,
#book-upgrade-funnel-next-btn.is-advancing::after,
#book-walk-thru-funnel-next-btn.is-advancing::after,
#get-urgent-help-funnel-next-btn.is-advancing::after {
    width: 100%;
}

/* Keep the button fully opaque during the advance */
#leadgen-next-btn.is-advancing,
#book-service-funnel-next-btn.is-advancing,
#book-service-quick-repair-funnel-next-btn.is-advancing,
#book-safety-inspection-funnel-next-btn.is-advancing,
#book-upgrade-funnel-next-btn.is-advancing,
#book-walk-thru-funnel-next-btn.is-advancing,
#get-urgent-help-funnel-next-btn.is-advancing {
    opacity: 1 !important;
}

/* Unified Grid Layout for Radio/Checkbox Fields */
.leadgen-unified-grid {
    align-items: stretch;
}

.leadgen-unified-grid > div {
    display: flex;
    flex-direction: column;
}

.leadgen-unified-grid > div > input + label {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Enhanced hover effects for unified grid */
@media (hover: hover) and (pointer: fine) {
    .leadgen-unified-grid .peer:not(:checked) ~ label:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .leadgen-unified-grid .peer:not(:checked) ~ label:hover .load-svg {
        transform: scale(1.1);
    }
}

/* Ensure consistent sizing for icons in unified grid */
.leadgen-unified-grid .load-svg {
    transition: transform 0.2s ease;
}

/* Enhanced checkmark animations for unified grid */
.leadgen-unified-grid .peer:checked ~ label .load-svg[data-load-svg*="check-filled.svg"],
.leadgen-unified-grid .peer:checked ~ label .load-svg[data-load-svg*="check-square-filled.svg"] {
    transform: scale(1) !important;
    opacity: 1 !important;
}

.leadgen-unified-grid .peer ~ label .load-svg[data-load-svg*="check-filled.svg"],
.leadgen-unified-grid .peer ~ label .load-svg[data-load-svg*="check-square-filled.svg"] {
    transform: scale(0);
    opacity: 0;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
    transform-origin: center;
}

/* Hover state for checkmarks in unified grid */
@media (hover: hover) and (pointer: fine) {
    .leadgen-unified-grid .peer ~ label:hover .load-svg[data-load-svg*="check-filled.svg"],
    .leadgen-unified-grid .peer ~ label:hover .load-svg[data-load-svg*="check-square-filled.svg"] {
        transform: scale(1);
        opacity: 0.7;
    }
}

/* Simple enhancements for unified grid cards */
.leadgen-unified-grid > div > input + label {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.leadgen-unified-grid .peer:not(:checked) ~ label:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.leadgen-unified-grid .peer:checked ~ label {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(251, 146, 60, 0.15);
}

/* Subtle gradient background for unified grid cards */
.leadgen-unified-grid > div > input + label {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.leadgen-unified-grid .peer:checked ~ label {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
}


/* --- Searchable Select Filter Pills --- */
.searchable-select-filters .filter-pill {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: #f3f4f6; /* gray-100 */
    color: #4b5569; /* gray-600 */
    border: 1px solid transparent;
}

.searchable-select-filters .filter-pill:hover {
    background-color: #e5e7eb; /* gray-200 */
    color: #1f2937; /* gray-800 */
}

.searchable-select-filters .filter-pill.active {
    background-color: #f97316; /* orange-500 */
    color: white;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

/* 1. Make the bottom sheet taller on specific steps */
@media (max-width: 767px) and (min-height: 600px) {
  .leadgen-modal.is-taller .leadgen-nav {
    margin-top: 120px;
  }
}

/* 2. Center the filter pills and add padding */
.searchable-select-filters {
    justify-content: center;
    padding: 0.25rem 0;
}

/* 3. Style the container for the input and its icon */
.searchable-select-input-wrapper {
    position: relative;
}

/* 3. Style for the icon itself, positioned inside the wrapper */
.searchable-select-input-wrapper .selected-icon {
    position: absolute;
    left: 0.75rem; /* 12px */
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none; /* Make it non-interactive */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 3. Add left padding to the input field *only when* an icon is present */
.searchable-select-input.has-icon {
    padding-left: 2.75rem; /* ~44px */
}

/* 1. Show empty state text below the field */
.searchable-select-container .empty-state-text {
    font-size: 0.75rem; /* text-xs */
    color: #6b7280; /* gray-500 */
    text-align: center;
    padding-top: 0.5rem;
    display: none; /* Hidden by default */
}

/* Highlight style for keyboard-navigated dropdown items */
.searchable-select-dropdown li.highlighted {
    background-color: #f3f4f6; /* gray-100 */
    color: #1f2937; /* gray-800 */
}

/* === reCAPTCHA Privacy Tooltip Styles === */

.recaptcha-privacy-trigger {
    /* Ensure minimum touch target size */
    min-width: 24px;
    min-height: 24px;
    
    /* Subtle hover state */
    transition: color 0.2s ease, background-color 0.2s ease;
}

.recaptcha-privacy-trigger:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.recaptcha-privacy-trigger:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.5); /* Orange focus ring */
    border-radius: 4px;
}

.recaptcha-tooltip {
    /* Ensure tooltip is above other content */
    z-index: 60;
    
    /* Smooth transitions */
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.recaptcha-tooltip.visible {
    visibility: visible !important;
}

/* Tooltip content styling */
.recaptcha-tooltip .bg-white {
    /* Add subtle shadow for better visibility */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 4px 6px rgba(0, 0, 0, 0.1);
    
    /* Ensure good contrast ratio (4.5:1 minimum) */
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
}

.recaptcha-tooltip .text-gray-600 {
    /* Ensure sufficient contrast for accessibility */
    color: #4b5563; /* This provides good contrast ratio */
}

.recaptcha-tooltip a {
    /* Privacy/Terms links styling */
    color: #2563eb; /* Blue-600 for good contrast */
    text-decoration: underline;
    text-underline-offset: 2px;
}

.recaptcha-tooltip a:hover {
    color: #1d4ed8; /* Blue-700 on hover */
    text-decoration: underline;
}

.recaptcha-tooltip a:focus {
    outline: 2px solid #f97316; /* Orange outline for focus */
    outline-offset: 2px;
    border-radius: 2px;
}

/* === Arrow Positioning Logic === */

/* Hide all arrows by default */
.recaptcha-tooltip .tooltip-arrow {
    display: none;
}

/* Show UP arrows when tooltip is positioned ABOVE trigger (default) */
.recaptcha-tooltip[data-position="above"] .tooltip-arrow-up {
    display: block;
}

/* Show DOWN arrows when tooltip is positioned BELOW trigger (overflow case) */
.recaptcha-tooltip[data-position="below"] .tooltip-arrow-down {
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .recaptcha-tooltip {
        /* Ensure tooltip doesn't exceed mobile viewport */
        max-width: calc(100vw - 32px);
    }
    
    .recaptcha-tooltip .max-w-xs {
        max-width: calc(100vw - 32px);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .recaptcha-privacy-trigger {
        border: 1px solid currentColor;
    }
    
    .recaptcha-tooltip .bg-white {
        border: 2px solid #000000;
    }
    
    .recaptcha-tooltip .text-gray-600 {
        color: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .recaptcha-tooltip {
        transition: none;
    }
    
    .recaptcha-privacy-trigger {
        transition: none;
    }
}

/* Add this new rule */
div[data-funnel-type] {
    position: relative;
}

/* Stateful Field Feedback */
.phone-input-container.field-valid input {
    border-color: #22c55e;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    box-shadow: 0 0 0 3px #22c55e;
}

.phone-input-container.field-valid .phone-validation-icon {
    opacity: 1;
    color: #22c55e;
    animation: scale-in 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.phone-input-container.field-error input {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px #ef4444;
}

/* --- Skeleton Loader Shimmer --- */
@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.skeleton-loader {
  position: relative;
  overflow: hidden;
  background-color: #e5e7eb; /* gray-200 */
}

.skeleton-loader::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.4) 20%,
    rgba(255, 255, 255, 0.8) 60%,
    rgba(255, 255, 255, 0)
  );
  animation: shimmer 2s infinite;
}

/* --- Step Transition Animations --- */

/* The main container for steps needs a relative position and height transition */
.leadgen-steps-wrapper {
    position: relative;
    transition: min-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base style for individual steps */
.leadgen-step {
    transition: opacity 0.2s ease-in-out;
}

/* State for a step that is currently fading OUT */
.leadgen-step.is-exiting {
    opacity: 0;
    /* Take it out of the document flow so the new step can be measured correctly */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    /* We don't want to interact with the old step */
    pointer-events: none;
}

/* Initial state for a step that is about to fade IN */
.leadgen-step.is-entering {
    opacity: 0;
}

/*
============================================================
  Chip Choices (Radio/Checkbox without descriptions)
  Compact, modern, "Calendly chips" feel
============================================================
*/
.leadgen-choice-chips {
  display: grid;
  gap: 0.5rem; /* 8px between chips */
  margin-top: 0.25rem;
  grid-template-columns: repeat(var(--chip-cols, 1), minmax(0, 1fr));
  align-items: stretch;
}

.chip-option { width: 100%; height: 100%; }

.choice-chip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem; /* extra right pad for indicator */
  min-height: 2.5rem; /* slightly taller on mobile */
  border-radius: 12px; /* rectangle with rounded corners */
  border: 1px solid #d1d5db; /* gray-300 for stronger affordance */
  background: #f9fafb; /* gray-50, looks interactive */
  color: #374151; /* gray-700 */
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .08s ease;
  width: 100%;
  height: 100%; /* allow equal heights via JS */
}

.choice-chip:hover {
  background:  linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%); /* orange-50/100 blend */
  border-color: #f97316;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.choice-chip:active {
  transform: translateY(0);
}

/* Focus ring from the hidden input */
input.peer:focus + .choice-chip,
input.peer:focus-visible + .choice-chip {
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.35); /* orange-500 at ~35% */
  border-color: #f97316;
}

/* Checked state: orange tint + stronger border, subtle elevation */
input.peer:checked + .choice-chip {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%); /* orange-50/100 blend */
  color: #9a3412; /* orange-800 */
  border-color: #f97316; /* orange-500 */
  box-shadow: 0 3px 10px rgba(249, 115, 22, 0.15);
}

.choice-chip .chip-label { display: inline-block; }

.choice-chip .chip-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  color: #f97316; /* orange-500 */
  transition: transform .15s ease, opacity .15s ease;
}

/* Reveal checkmark when checked */
input.peer:checked + .choice-chip .chip-check {
  opacity: 1;
  transform: scale(1);
  color: #f97316; /* orange on selection (mobile + desktop) */
}

/* Reveal checkmark on hover (affordance) */
.choice-chip:hover .chip-check { opacity: 1; transform: scale(1); color: #f97316; }

/* Icon bubble to strengthen affordance */
.choice-chip .chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem; /* 28px */
  height: 1.75rem;
  margin-right: 0.5rem;
  border-radius: 9999px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

/* Selected: icon gets brand tint */
input.peer:checked + .choice-chip .chip-icon {
  background: #ffedd5; /* orange-100 */
  color: #f97316; /* orange-500 */
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.25);
}

/* Indicator (box/circle) always visible */
.choice-chip .chip-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem; /* ~18px */
  height: 1.15rem;
  border: 2px solid #d1d5db; /* gray-300 */
  background: #fff;
  border-radius: 4px; /* square default for checkbox */
  transition: border-color .2s ease, background-color .2s ease;
  position: absolute;
  right: 0.75rem;
  top: 0.55rem;
}

.choice-chip .chip-mark.is-radio { border-radius: 9999px; }

/* On hover, preview the indicator in orange */
.choice-chip:hover .chip-mark { border-color: #f97316; background: #fffbeb; }
input.peer:checked + .choice-chip .chip-mark { border-color: #f97316; background: #fffbeb; }

/* Place the check inside the indicator */
.choice-chip .chip-mark .chip-check {
  position: absolute;
  width: 14px;
  height: 14px;
}

/* Left content wrapper (icon + text) */
.choice-chip .chip-left {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0; /* allow text to wrap */
  flex: 1 1 auto;
}

.choice-chip .chip-label {
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Desktop sizes: taller chips, larger text, bigger icon; indicator pinned top-right */
@media (min-width: 768px) {
  .choice-chip {
    padding: 0.75rem 2.5rem 0.75rem 0.875rem;
    min-height: 3.25rem;
    font-size: 1.05rem;
  }
  .choice-chip .chip-icon {
    width: 2.25rem; /* 36px */
    height: 2.25rem;
  }
  .choice-chip .chip-mark { top: 0.6rem; }
}

/* Improve touch targets on very small screens */
@media (max-width: 420px) {
  .choice-chip {
    min-height: 2.5rem; /* 40px */
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
}

/* High contrast mode: ensure borders/contrast remain solid */
@media (prefers-contrast: more) {
  .choice-chip { border-color: #111827; /* gray-900 */ }
  input.peer:checked + .choice-chip { color: #000; }
}
