.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.loading {
    display: none;
}

/* Mobile/Desktop visibility */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

/* Base search and filter styles */
.search-filter-bar {
    width: 100%;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    z-index: 10;
}

.search-section {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 100%;
    margin: 0;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px;
}

.filters {
    display: flex;
    gap: 15px;
    padding: 0 20px 20px 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 10;
}

.filters::-webkit-scrollbar {
    display: none;
}

.filter-item {
    padding: 8px 16px;
    background-color: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    position: relative;
    z-index: 10;
}

/* Responsive styles */
@media (max-width: 768px) {
    .search-section {
        flex-direction: column;
        gap: 15px;
    }

    .search-input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .no-results {
        font-size: 1.4em;
        padding: 40px 20px;
        margin: 20px auto;
    }
}

/* Mobile styles */
@media (max-width: 480px) {
    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none;
    }

    .search-section {
        flex-direction: column;
        padding: 15px;
    }

    .search-input {
        width: 100%;
        margin: 0;
    }

    .filters {
        padding: 10px 15px;
    }

    .filter-item {
        flex-shrink: 0;
    }

    .car-inventory {
        padding: 10px;
    }
}

/* Tablet styles (768px to 601px) */
@media screen and (max-width: 768px) {
    .car-inventory {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        padding: 15px;
    }

    .car-card {
        width: calc((100% - 20px) / 2) !important;
        margin-bottom: 0;
    }
}

/* Mobile styles (600px and below) */
@media screen and (max-width: 600px) {
    .car-card {
        width: 100% !important;
        margin-bottom: 15px;
    }
    
    .car-inventory {
        padding: 10px;
        gap: 15px;
        display: flex;
        flex-direction: column;
    }
}

/* Desktop styles - applies to all screens above 768px regardless of height */
@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }

    .desktop-only {
        display: block !important;
    }

    .search-section {
        flex-direction: row;
    }

    .car-inventory {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        justify-content: flex-start;
        padding: 20px;
        box-sizing: border-box;
        width: 100%;
    }
}

/* Sort button styles */
.rm-sort-button-container {
    position: relative;
}

.rm-sort-button {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    gap: 5px;
}

.rm-sort-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 10;
    display: none;
}

.rm-sort-dropdown.show {
    display: block;
}

/* Clear filters button styles */
.clear-filters-button {
    display: none;
    align-items: center;
    gap: 0.5rem;
    height: 44px;
    padding: 0 1rem;
    margin-left: 0.5rem;
    background-color: #ff0000;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    z-index: 11;
    opacity: 1;
    visibility: visible;
}

.clear-filters-button:hover {
    background-color: #cc0000;
}

.clear-filters-button i {
    font-size: 16px;
    margin-right: 4px;
    display: inline-block;
    color: white;
}

.clear-filters-button span {
    display: inline-block;
    vertical-align: middle;
    color: white;
}

.footer-section {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer-section.loaded {
    opacity: 1;
}

.no-results {
    text-align: center;
    padding: 80px 20px;
    font-size: 1.8em;
    color: #333;
    background: white;
    margin: 40px auto;
    max-width: 800px;
    position: relative;
    font-weight: 500;
}

.no-results:before {
    content: '🔍';
    display: block;
    font-size: 2em;
    margin-bottom: 20px;
}

.filter-item:hover {
    background-color: #e0e0e0;
}

.filter-item i {
    font-size: 14px;
}

.rm-sort-option-item {
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rm-sort-option-item:hover {
    background-color: #f5f5f5;
}

.rm-sort-check {
    display: none;
    color: #007bff;
}

.rm-sort-option-item.selected .rm-sort-check {
    display: inline-block;
}

/* Search section button specific style */
.search-section > button {
    margin: 0;
    position: relative;
    z-index: 1001;
}

.filter-dialog {
    position: fixed !important;
    z-index: 20;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

.filter-dialog.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Container for filter buttons */
.filters {
    position: relative;
    z-index: 10;
}

/* Ensure filter buttons stay above dialogs */
[data-filter] {
    position: relative;
    z-index: 11;
    transform: translateZ(0);
}

/* Style scrollbar for dialog content */
.filter-dialog::-webkit-scrollbar {
    width: 8px;
}

.filter-dialog::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.filter-dialog::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.filter-dialog::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.car-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 0;
    overflow: hidden;
    width: calc(25% - 15px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Desktop responsive breakpoints */
@media screen and (max-width: 1200px) {
    .car-card {
        width: calc(33.333% - 14px);
    }
}

@media screen and (max-width: 900px) {
    .car-card {
        width: calc(50% - 10px);
    }
}

@media screen and (max-width: 600px) {
    .car-card {
        width: 100%;
        margin-bottom: 15px;
    }
    .car-inventory {
        padding: 10px;
        gap: 15px;
    }
}

.car-image {
    width: 100%;
    height: 0;
    padding-bottom: 75%;
    position: relative;
    overflow: hidden;
}

/* Add sold banner styles */
.car-image .sold-banner {
    position: absolute;
    top: 20px;
    right: -35px;
    background: #dc3545;
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    z-index: 1;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Add pending banner styles */
.car-image .pending-banner {
    position: absolute;
    top: 20px;
    right: -35px;
    background: #ffc107;
    color: #000;
    padding: 5px 40px;
    transform: rotate(45deg);
    z-index: 1;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Add promotion banner base styles - no hardcoded backgrounds */
.car-image .promotion-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transform: none;
    color: white;
    padding: 8px 16px;
    z-index: 2;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    overflow: hidden;
}

/* Banner Style Classes - Professional Blue */
.car-image .promotion-banner.professional-blue {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    animation: professional-shine 3s ease infinite;
    border: 2px solid #1d4ed8;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3), 0 0 20px rgba(59, 130, 246, 0.4), 0 0 40px rgba(59, 130, 246, 0.2);
}

/* Banner Style Classes - Classic Red */
.car-image .promotion-banner.classic-red {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    animation: classic-pulse 2s ease-in-out infinite;
    border: 2px solid #b91c1c;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.3), 0 0 20px rgba(220, 38, 38, 0.4), 0 0 40px rgba(220, 38, 38, 0.2);
}

/* Banner Style Classes - Elegant Gold */
.car-image .promotion-banner.elegant-gold {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    animation: elegant-gleam 3s ease infinite;
    border: 2px solid #b45309;
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.3), 0 0 20px rgba(217, 119, 6, 0.4), 0 0 40px rgba(217, 119, 6, 0.2);
    color: #1f2937;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.1);
}

/* Banner Style Classes - Modern Green */
.car-image .promotion-banner.modern-green {
    background: linear-gradient(135deg, #059669, #10b981);
    animation: modern-glow 2.5s ease-in-out infinite;
    border: 2px solid #047857;
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.3), 0 0 20px rgba(5, 150, 105, 0.4), 0 0 40px rgba(5, 150, 105, 0.2);
}

/* Banner Style Classes - Premium Silver */
.car-image .promotion-banner.premium-silver {
    background: linear-gradient(135deg, #6b7280, #9ca3af);
    animation: premium-reflect 3s ease infinite;
    border: 2px solid #4b5563;
    box-shadow: 0 4px 12px rgba(75, 85, 99, 0.3), 0 0 20px rgba(156, 163, 175, 0.4), 0 0 40px rgba(156, 163, 175, 0.2);
    color: #1f2937;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.2);
}

/* Banner Style Classes - Bold Orange */
.car-image .promotion-banner.bold-orange {
    background: linear-gradient(135deg, #ea580c, #f97316);
    animation: bold-highlight 2.5s ease-in-out infinite;
    border: 2px solid #c2410c;
    box-shadow: 0 4px 12px rgba(194, 65, 12, 0.3), 0 0 20px rgba(234, 88, 12, 0.4), 0 0 40px rgba(234, 88, 12, 0.2);
}

/* Professional keyframe animations with enhanced glow */
@keyframes professional-shine {
    0%, 100% { 
        filter: brightness(1); 
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3), 0 0 20px rgba(59, 130, 246, 0.4), 0 0 40px rgba(59, 130, 246, 0.2);
    }
    50% { 
        filter: brightness(1.1); 
        transform: scale(1.01);
        box-shadow: 0 4px 16px rgba(29, 78, 216, 0.5), 0 0 30px rgba(59, 130, 246, 0.6), 0 0 60px rgba(59, 130, 246, 0.4);
    }
}

@keyframes classic-pulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 4px 12px rgba(185, 28, 28, 0.3), 0 0 20px rgba(220, 38, 38, 0.4), 0 0 40px rgba(220, 38, 38, 0.2);
    }
    50% { 
        transform: scale(1.02); 
        box-shadow: 0 6px 16px rgba(185, 28, 28, 0.5), 0 0 30px rgba(220, 38, 38, 0.6), 0 0 60px rgba(220, 38, 38, 0.4);
    }
}

@keyframes elegant-gleam {
    0% { 
        filter: brightness(1); 
        box-shadow: 0 4px 12px rgba(180, 83, 9, 0.3), 0 0 20px rgba(217, 119, 6, 0.4), 0 0 40px rgba(217, 119, 6, 0.2);
    }
    50% { 
        filter: brightness(1.15); 
        box-shadow: 0 6px 16px rgba(180, 83, 9, 0.5), 0 0 30px rgba(217, 119, 6, 0.6), 0 0 60px rgba(217, 119, 6, 0.4);
    }
    100% { 
        filter: brightness(1); 
        box-shadow: 0 4px 12px rgba(180, 83, 9, 0.3), 0 0 20px rgba(217, 119, 6, 0.4), 0 0 40px rgba(217, 119, 6, 0.2);
    }
}

@keyframes modern-glow {
    0%, 100% { 
        box-shadow: 0 4px 12px rgba(4, 120, 87, 0.3), 0 0 20px rgba(5, 150, 105, 0.4), 0 0 40px rgba(5, 150, 105, 0.2);
        filter: brightness(1);
    }
    50% { 
        box-shadow: 0 6px 20px rgba(4, 120, 87, 0.6), 0 0 30px rgba(5, 150, 105, 0.6), 0 0 60px rgba(5, 150, 105, 0.4);
        filter: brightness(1.1);
    }
}

@keyframes premium-reflect {
    0%, 100% { 
        filter: brightness(1); 
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(75, 85, 99, 0.3), 0 0 20px rgba(156, 163, 175, 0.4), 0 0 40px rgba(156, 163, 175, 0.2);
    }
    50% { 
        filter: brightness(1.2); 
        transform: scale(1.01);
        box-shadow: 0 6px 16px rgba(75, 85, 99, 0.5), 0 0 30px rgba(156, 163, 175, 0.6), 0 0 60px rgba(156, 163, 175, 0.4);
    }
}

@keyframes bold-highlight {
    0%, 100% { 
        transform: scale(1); 
        filter: brightness(1);
        box-shadow: 0 4px 12px rgba(194, 65, 12, 0.3), 0 0 20px rgba(234, 88, 12, 0.4), 0 0 40px rgba(234, 88, 12, 0.2);
    }
    50% { 
        transform: scale(1.02); 
        filter: brightness(1.1);
        box-shadow: 0 6px 16px rgba(194, 65, 12, 0.5), 0 0 30px rgba(234, 88, 12, 0.6), 0 0 60px rgba(234, 88, 12, 0.4);
    }
}

.car-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
 
/* Action buttons styling for vehicle cards */
/* Car title line - title and VID on same line */
.car-title-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.car-title-line h2 {
    font-size: 18px;
    margin: 0;
    color: #333;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Phone number prominent styling - more noticeable */
.phone-number-prominent {
    color: #333;
    font-size: 13px;
    font-weight: normal;
    white-space: nowrap;
    background-color: rgba(0, 123, 255, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

/* Car pricing layout - just buttons now */
.car-card .car-pricing {
    margin-top: 12px;
    width: 100%;
}

.car-card .action-buttons {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px;
    align-items: stretch;
    flex-wrap: wrap;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    width: 100%;
}

/* Desktop button sizing - true 50/50 split */
.car-card .request-price,
.car-card .request-credit-app {
    flex: 1 1 calc(50% - 6px);
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
}

/* Additional breakpoint: when button text would be too cramped even on larger screens */
@media (max-width: 380px) {
    .car-card .action-buttons {
        flex-direction: column !important;
        gap: 8px;
    }
    
    .car-card .request-price,
    .car-card .request-credit-app {
        flex: 1 1 100% !important;
        width: 100% !important;
        white-space: normal;
    }
}

/* Tablet and small desktop - stack when cramped */
@media (max-width: 768px) and (min-width: 601px) {
    .car-card .action-buttons {
        flex-direction: column !important;
        gap: 8px;
    }
    
    .car-card .request-price,
    .car-card .request-credit-app {
        flex: 1 1 100% !important;
        width: 100% !important;
    }
}

/* Mobile - full width stacking */
@media (max-width: 600px) {
    .car-card .action-buttons {
        flex-direction: column !important;
        gap: 8px;
    }
    
    .car-card .request-price,
    .car-card .request-credit-app {
        flex: 1 1 100% !important;
        width: 100% !important;
    }
}

/* Consistent button styling for both request buttons */
.car-card .request-price {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.car-card .request-price:hover {
    background: #0056b3;
}

.car-card .request-price:active {
    background: #004085;
}

.request-credit-app {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.request-credit-app:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.request-credit-app:active {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
}

/* Credit app modal styling */
.credit-app-modal {
    z-index: 2147483648 !important;
}

.credit-app-modal .modal-content {
    max-width: 500px;
    width: 90%;
    z-index: 2147483649 !important;
}

.credit-app-modal .modal-header h2 {
    color: #10b981;
    margin-bottom: 0.5rem;
}

.credit-app-modal .submit-btn.credit-app-submit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.credit-app-modal .submit-btn.credit-app-submit:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.credit-app-modal .submit-btn.credit-app-submit:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Form row layout for first/last name */
.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.form-group-half {
    flex: 1;
    margin-bottom: 0 !important;
}

/* Phone number input styling - improved readability */
#creditPhone {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 16px !important;
    font-weight: 400;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

#creditPhone:focus {
    border-color: #10b981;
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Phone input styling for price request modals */
#phone, #mobilePhone {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 16px !important;
    font-weight: 400;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

#phone:focus, #mobilePhone:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Phone number formatting styles - removed ugly monospace font */

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .car-title-line {
        gap: 8px;
        margin-bottom: 6px;
    }
    
    .car-title-line h2 {
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }
    
    .car-info-line {
        gap: 8px;
    }
    
    .car-subtitle {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .phone-number-prominent {
        font-size: 12px;
        padding: 3px 6px;
        flex-shrink: 0;
    }
    
    .car-vid-inline {
        flex-shrink: 0;
    }
    
    .car-card .action-buttons {
        flex-direction: column !important;
        gap: 10px;
        width: 100%;
    }
    
    .car-card .request-price,
    .car-card .request-credit-app {
        flex: 1 1 100% !important;
        width: 100% !important;
        text-align: center;
        padding: 14px 16px;
        font-size: 14px;
        min-height: 48px;
    }
    
    .credit-app-modal .modal-content {
        width: 95%;
        margin: 10px auto;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 16px;
        padding-bottom: 20px;
    }
    
    .credit-app-modal .form-actions {
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    /* Keep form row horizontal on mobile with tighter spacing */
    .form-row {
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .form-group-half {
        margin-bottom: 0 !important;
    }
    
    .form-group-half input {
        font-size: 16px;
        padding: 10px 12px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group:last-child {
        margin-bottom: 0;
    }
    
    #creditPhone {
        font-size: 16px !important;
    }
    
    .credit-app-modal .modal-form {
        padding-bottom: 0;
        margin-bottom: 0;
    }
}

/* Multi-Step Credit App Modal Styles */
.multi-step-modal .modal-content {
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    will-change: width, max-width;
    /* Keep the fixed positioning and centering from base modal */
    position: fixed;
    top: 50%;
    left: 50%;
    /* transform handled by JavaScript to allow for dynamic sizing animations */
}

/* Dynamic Modal Sizes with Smooth Transitions */
.multi-step-modal .modal-content.compact {
    max-width: 650px; /* Increased from 500px for better content fit */
    width: 90%;
}

.multi-step-modal .modal-content.medium {
    max-width: 750px; /* Increased from 650px */
    width: 90%;
}

.multi-step-modal .modal-content.large {
    max-width: 1000px; /* Increased from 950px */
    width: 95%;
}

.multi-step-modal .modal-content.extra-large {
    max-width: 1200px; /* Increased from 1100px */
    width: 95%;
}

.modal-step {
    min-height: 400px;
    transition: all 0.3s ease;
}

/* Step-specific heights */
.modal-step[data-step="1"] {
    min-height: 360px; /* Further reduced due to compact disclaimer */
}

.modal-step[data-step="2"] {
    min-height: 500px; /* Further reduced due to compact disclaimer */
}

.modal-step[data-step="2.5"] {
    min-height: 400px;
}

.modal-step[data-step="3"] {
    min-height: 450px;
}

/* Budget Confirmation Message */
.budget-confirmation {
    background: #f0fdf4;
    border: 1px solid #22c55e;
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    position: relative;
}

.confirmation-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.confirmation-content .fas.fa-check-circle {
    color: #16a34a;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.confirmation-text {
    flex: 1;
}

.confirmation-title {
    font-weight: 600;
    color: #15803d;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.confirmation-message {
    color: #166534;
    font-size: 0.9rem;
    line-height: 1.4;
}

.confirmation-message span {
    font-weight: 600;
    color: #15803d;
}

/* Financing Disclaimer Styles */
.financing-disclaimer {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 0.75rem;
    margin: 1rem 0;
    position: relative;
    max-width: 100%; /* Ensure it doesn't overflow in wider modals */
}

.financing-disclaimer::before {
    content: "⚠️";
    font-size: 1rem;
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
}

.financing-disclaimer p {
    margin: 0;
    padding-left: 1.75rem;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #92400e;
}

.financing-disclaimer strong {
    color: #78350f;
    font-weight: 600;
}

/* Step Navigation */
.step-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f3f4f6;
    color: #374151;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

.budget-display, .selected-vehicle-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.selected-vehicle-display i {
    color: #10b981;
}

/* Budget Input Step Styles */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 12px;
    color: #6b7280;
    font-weight: 500;
    z-index: 1;
}

.input-wrapper input {
    padding-left: 28px !important;
    padding-right: 80px !important;
}

/* Remove number input spinner arrows for budget field */
#biWeeklyBudget::-webkit-outer-spin-button,
#biWeeklyBudget::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#biWeeklyBudget {
    -moz-appearance: textfield; /* Firefox */
    appearance: textfield; /* Standard property */
}

.period-text {
    position: absolute;
    right: 12px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.input-help {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 13px;
}

.budget-submit {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.budget-submit:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Target Vehicle Preview in Budget Step */
.target-vehicle-preview {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    margin-top: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    align-items: center;
}

.target-vehicle-preview .vehicle-image {
    flex-shrink: 0;
    width: 100px;
    height: 75px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
}

.target-vehicle-preview .vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.target-vehicle-preview .vehicle-info {
    flex: 1;
}

.target-vehicle-preview h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

.target-vehicle-preview p {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.4;
}

/* Mobile responsive for target vehicle preview */
@media (max-width: 768px) {
    .target-vehicle-preview {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .target-vehicle-preview .vehicle-image {
        width: 120px;
        height: 90px;
        margin: 0 auto;
    }
    
    .target-vehicle-preview h3 {
        font-size: 1rem;
    }
}

/* Credit Tier Selector Styles */
.credit-tier-selector {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.credit-tier-selector.compact {
    flex-direction: row;
    gap: 0.5rem;
    align-items: stretch;
}

.credit-tier-option {
    flex: 1;
    position: relative;
}

.credit-tier-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.credit-tier-option label {
    display: block;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: white;
    margin-bottom: 0;
}

.credit-tier-option input:checked + label {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.1);
}

.credit-tier-option label:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.credit-tier-option input:checked + label:hover {
    border-color: #2563eb;
    background: #dbeafe;
}

.tier-name {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
    font-size: 14px;
}

.tier-score {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.credit-tier-option input:checked + label .tier-name {
    color: #1d4ed8;
}

.credit-tier-option input:checked + label .tier-score {
    color: #3b82f6;
}

/* Compact version for vehicle step - horizontal layout */
.credit-tier-selector.compact .credit-tier-option label {
    padding: 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    font-size: 12px;
}

.credit-tier-selector.compact .tier-name {
    margin-bottom: 0.125rem;
    font-size: 12px;
    font-weight: 600;
}

.credit-tier-selector.compact .tier-score {
    font-size: 10px;
    opacity: 0.8;
}

/* Vehicle Selection Step Styles */
.vehicle-filters {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* Filter rows layout */
.filter-row {
    margin-bottom: 1.5rem;
}

.filter-row:last-of-type {
    margin-bottom: 1rem; /* Keep some space before results count */
}

.filter-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

/* Body type filter buttons */
.body-type-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.body-type-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #374151;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.body-type-btn:hover {
    border-color: #059669;
    background: #f0fdf4;
    color: #065f46;
}

.body-type-btn.active {
    background: #059669;
    border-color: #059669;
    color: white;
}

.body-type-btn.active:hover {
    background: #047857;
    border-color: #047857;
}

/* Legacy support for existing filter styles */
.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-group label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    min-width: 160px;
}

.results-count {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* Vehicle Results Container */
.vehicle-results {
    min-height: 300px;
    position: relative;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state p {
    color: #6b7280;
    margin: 0;
}

/* Vehicle Grid */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.modal-vehicle-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.modal-vehicle-card:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.modal-vehicle-image {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f3f4f6;
}

.modal-vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.modal-vehicle-card:hover .modal-vehicle-image img {
    transform: scale(1.05);
}

.modal-vehicle-info {
    padding: 1rem;
}

.modal-vehicle-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.modal-vehicle-details {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.modal-vehicle-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 12px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
}

.spec-item i {
    color: #9ca3af;
    font-size: 11px;
}

.modal-vehicle-action {
    text-align: center;
}

.select-vehicle-btn {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-vehicle-card:hover .select-vehicle-btn {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
}

/* Testing Mode - Pricing Display */
.modal-vehicle-pricing {
    margin: 1rem 0;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.vehicle-price {
    text-align: center;
    margin-bottom: 0.75rem;
    font-size: 16px;
    color: #1f2937;
}

.payment-estimates {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.payment-tier {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.payment-tier.affordable {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.payment-tier.expensive {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.payment-tier.selected {
    border: 2px solid #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.1);
}

.payment-tier.selected.affordable {
    border-color: #059669;
    background: #ecfdf5;
}

.payment-tier.selected.expensive {
    border-color: #dc2626;
    background: #fef2f2;
}

.tier-score {
    font-size: 11px;
    color: #9ca3af;
    font-style: italic;
    margin-left: 0.25rem;
}

.tier-label {
    font-weight: 500;
}

.payment-amount {
    font-weight: 600;
}

/* No Results State */
.no-results {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}

.no-results-content {
    text-align: center;
    max-width: 400px;
}

.no-results-content i {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.no-results-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.5rem 0;
}

.no-results-content p {
    color: #6b7280;
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}

/* Mobile Responsive Styles for Multi-Step Modal */
@media (max-width: 768px) {
    .multi-step-modal .modal-content {
        width: 98%;
        margin: 5px auto;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .modal-step {
        min-height: 300px;
    }
    
    .step-nav {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .vehicle-filters {
        padding: 1rem;
    }
    
    .filter-row {
        margin-bottom: 1rem;
    }
    
    .filter-label {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    
    /* Mobile body type buttons */
    .body-type-buttons {
        gap: 0.375rem;
    }
    
    .body-type-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    
    /* Legacy filter group styles for mobile */
    .filter-group {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .filter-group select {
        min-width: auto;
        width: 100%;
    }
    
    /* Mobile credit tier selector */
    .credit-tier-selector {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Keep compact version horizontal even on mobile */
    .credit-tier-selector.compact {
        flex-direction: row;
        gap: 0.25rem;
    }
    
    .credit-tier-option label {
        padding: 0.5rem;
        font-size: 13px;
    }
    
    /* Mobile compact credit tier options */
    .credit-tier-selector.compact .credit-tier-option label {
        padding: 0.375rem 0.25rem;
        min-height: 50px;
        font-size: 11px;
    }
    
    .credit-tier-selector.compact .tier-name {
        font-size: 11px;
        margin-bottom: 0.125rem;
    }
    
    .credit-tier-selector.compact .tier-score {
        font-size: 9px;
    }
    
    .tier-name {
        font-size: 13px;
        margin-bottom: 0.125rem;
    }
    
    .tier-score {
        font-size: 11px;
    }
    
    .results-count {
        text-align: center;
    }
}

/* Budget Guidance Step Styles */
.budget-guidance-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.selected-vehicle-info {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.selected-vehicle-info .vehicle-image {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
}

.selected-vehicle-info .vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selected-vehicle-info .vehicle-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.selected-vehicle-info h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.current-budget,
.suggested-budget {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.current-budget .label,
.suggested-budget .label {
    font-weight: 500;
    color: #64748b;
}

.current-budget .budget-amount {
    font-weight: 600;
    color: #dc2626;
}

.suggested-budget .budget-range {
    font-weight: 600;
    color: #059669;
}

.budget-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-btn {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.option-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.option-btn.primary-option {
    border-color: #3b82f6;
    background: #eff6ff;
}

.option-btn.primary-option:hover {
    border-color: #2563eb;
    background: #dbeafe;
}

.option-btn.secondary-option:hover {
    border-color: #9ca3af;
}

.option-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

.option-desc {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.4;
}

.option-btn.primary-option .option-title {
    color: #1d4ed8;
}

/* Mobile Responsive for Budget Guidance */
@media (max-width: 768px) {
    .budget-guidance-content {
        gap: 1.5rem;
    }
    
    .selected-vehicle-info {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .selected-vehicle-info .vehicle-image {
        width: 100%;
        height: 150px;
        margin: 0 auto;
    }
    
    .current-budget,
    .suggested-budget {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
    
    .option-btn {
        padding: 1.25rem;
        text-align: center;
    }
    
    .vehicle-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.5rem 0;
    }
    
    .modal-vehicle-card {
        border-radius: 8px;
    }
    
    .modal-vehicle-image {
        height: 160px;
    }
    
    .modal-vehicle-info {
        padding: 0.75rem;
    }
    
    .modal-vehicle-info h3 {
        font-size: 15px;
    }
    
    .modal-vehicle-specs {
        gap: 0.375rem;
    }
    
    .spec-item {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .budget-display, .selected-vehicle-display {
        font-size: 13px;
    }
    
    .back-btn {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .input-wrapper input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Mobile responsive pricing display */
    .modal-vehicle-pricing {
        margin: 0.75rem 0;
        padding: 0.5rem;
    }
    
    .vehicle-price {
        font-size: 15px;
        margin-bottom: 0.5rem;
    }
    
    .payment-tier {
        padding: 0.375rem;
        font-size: 12px;
    }
}

/* Budget Too Low Step Styles */
.budget-adjustment-info {
    padding: 1.5rem;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.current-budget-display,
.required-budget-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.current-budget-display .label,
.required-budget-display .label {
    font-weight: 500;
    color: #92400e;
}

.current-budget-display .budget-amount {
    font-weight: 600;
    color: #dc2626;
}

.required-budget-display .budget-range {
    font-weight: 600;
    color: #059669;
}

.budget-explanation {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff7ed;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #92400e;
}

.budget-explanation span {
    font-weight: 600;
    color: #7c2d12;
}

.option-btn.exit-option {
    border-color: #e5e7eb;
    background: #f9fafb;
}

.option-btn.exit-option:hover {
    border-color: #d1d5db;
    background: #f3f4f6;
}

.option-btn.exit-option .option-title {
    color: #6b7280;
}

/* Mobile Responsive for Budget Too Low */
@media (max-width: 768px) {
    .budget-adjustment-info {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .current-budget-display,
    .required-budget-display {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
    
    .budget-explanation {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

/* Additional Form Styling for Multi-Step */
.multi-step-modal .form-group label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    display: block;
}

.multi-step-modal .form-group input,
.multi-step-modal .form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s ease;
}

.multi-step-modal .form-group input:focus,
.multi-step-modal .form-group select:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.multi-step-modal .form-group input[readonly] {
    background-color: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

/* Enhanced Mobile Experience */
@media (max-width: 480px) {
    .multi-step-modal .modal-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
        overflow-y: auto;
    }
    
    .modal-step {
        padding: 0.5rem;
        min-height: calc(100vh - 100px);
    }
    
    .vehicle-results {
        min-height: 250px;
    }
    
    .loading-state {
        padding: 2rem 1rem;
    }
}

/* Mobile Responsive Modal Sizes */
@media (max-width: 768px) {
    .multi-step-modal .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 2vh auto;
        max-height: 95vh;
        border-radius: 16px; /* Enhanced rounded edges for mobile */
        overflow-y: auto; /* Allow vertical scrolling on mobile */
        overflow-x: hidden; /* Prevent horizontal scrolling */
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); /* Enhanced shadow for mobile */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
    
    .multi-step-modal .modal-content.compact,
    .multi-step-modal .modal-content.medium,
    .multi-step-modal .modal-content.large,
    .multi-step-modal .modal-content.extra-large {
        width: 95%;
        max-width: 95%;
    }
    
    /* Reduce min-heights on mobile to prevent unnecessary scrolling */
    .modal-step[data-step="1"] {
        min-height: auto; /* Allow natural height on mobile */
        padding-bottom: 1rem; /* Add bottom padding for spacing */
    }
    
    .modal-step[data-step="2"] {
        min-height: auto; /* Allow natural height on mobile */
        padding-bottom: 1rem;
    }
    
    .modal-step[data-step="2.5"] {
        min-height: auto; /* Allow natural height on mobile */
        padding-bottom: 1rem;
    }
    
    .modal-step[data-step="3"] {
        min-height: auto; /* Allow natural height on mobile */
        padding-bottom: 1rem;
    }

    /* Mobile budget confirmation adjustments */
    .budget-confirmation {
        padding: 0.75rem;
        margin: 1rem 0;
    }
    
    .confirmation-content {
        gap: 0.5rem;
    }
    
    .confirmation-content .fas.fa-check-circle {
        font-size: 1.25rem;
    }
    
    .confirmation-title {
        font-size: 0.9rem;
    }
    
    .confirmation-message {
        font-size: 0.85rem;
    }

    /* Mobile financing disclaimer adjustments */
    .financing-disclaimer {
        padding: 0.5rem;
        margin: 0.75rem 0;
    }

    .financing-disclaimer::before {
        font-size: 0.9rem;
        top: 0.5rem;
        left: 0.5rem;
    }

    .financing-disclaimer p {
        padding-left: 1.5rem;
        font-size: 0.8rem;
        line-height: 1.3;
    }
}

/* Tablet Modal Sizes */
@media (min-width: 769px) and (max-width: 1024px) {
    .multi-step-modal .modal-content.compact {
        max-width: 750px; /* Wider compact modal for tablets */
        width: 90%;
    }
    
    .multi-step-modal .modal-content.medium {
        max-width: 850px;
        width: 90%;
    }
    
    .multi-step-modal .modal-content.large,
    .multi-step-modal .modal-content.extra-large {
        max-width: 90%;
        width: 90%;
    }
}

/* Small Laptop Modal Sizes - Most aggressive optimization for small screens */
@media (min-width: 1025px) and (max-width: 1200px) {
    .multi-step-modal .modal-content.compact {
        max-width: 850px; /* Even wider for small laptops */
        width: 92%;
    }
    
    .multi-step-modal .modal-content.medium {
        max-width: 950px;
        width: 92%;
    }
    
    .multi-step-modal .modal-content.large {
        max-width: 1100px;
        width: 92%;
    }
    
    .multi-step-modal .modal-content.extra-large {
        max-width: 1150px;
        width: 92%;
    }
    
    /* Aggressive height reduction for small screens */
    .modal-step[data-step="1"] {
        min-height: 320px; /* Further reduced */
    }
    
    .modal-step[data-step="2"] {
        min-height: 450px; /* Further reduced */
    }
    
    /* Extra compact disclaimer for small screens */
    .financing-disclaimer {
        padding: 0.5rem;
        margin: 0.75rem 0;
        border-radius: 4px;
    }
    
    .financing-disclaimer::before {
        font-size: 0.9rem;
        top: 0.5rem;
        left: 0.5rem;
    }
    
    .financing-disclaimer p {
        padding-left: 1.5rem;
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    /* Compact form elements for small screens */
    .form-group {
        margin-bottom: 1rem; /* Reduced from default */
    }
    
    .credit-tier-selector {
        gap: 0.5rem; /* Tighter spacing */
    }
    
    .credit-tier-selector.compact {
        gap: 0.375rem; /* Even tighter for horizontal layout */
    }
    
    .credit-tier-option label {
        padding: 0.5rem; /* Reduced padding */
    }
    
    .credit-tier-selector.compact .credit-tier-option label {
        padding: 0.4rem 0.3rem;
        min-height: 55px; /* Slightly smaller than desktop */
    }
    
    .credit-tier-selector.compact .tier-name {
        font-size: 11px;
    }
    
    .credit-tier-selector.compact .tier-score {
        font-size: 9px;
    }
    
    .input-help {
        margin-top: 0.25rem; /* Reduced margin */
        font-size: 0.8rem; /* Smaller text */
    }
    
    /* Compact budget confirmation for small screens */
    .budget-confirmation {
        padding: 0.75rem;
        margin: 1rem 0;
    }
    
    .confirmation-title {
        font-size: 0.9rem;
    }
    
    .confirmation-message {
        font-size: 0.85rem;
    }
}

/* Regular Laptop Modal Sizes */
@media (min-width: 1201px) and (max-width: 1399px) {
    .multi-step-modal .modal-content.compact {
        max-width: 800px;
        width: 90%;
    }
    
    .multi-step-modal .modal-content.medium {
        max-width: 900px;
        width: 90%;
    }
    
    .multi-step-modal .modal-content.large {
        max-width: 1050px;
        width: 90%;
    }
    
    .multi-step-modal .modal-content.extra-large {
        max-width: 1150px;
        width: 90%;
    }
    
    /* Reduced heights due to wider modal */
    .modal-step[data-step="1"] {
        min-height: 350px;
    }
    
    .modal-step[data-step="2"] {
        min-height: 480px;
    }
}

/* Large Desktop Optimization */
@media (min-width: 1400px) {
    .multi-step-modal .modal-content.compact {
        max-width: 850px; /* Even wider on large screens */
    }
    
    .multi-step-modal .modal-content.medium {
        max-width: 950px;
    }
    
    .multi-step-modal .modal-content.large {
        max-width: 1200px;
    }
    
    .multi-step-modal .modal-content.extra-large {
        max-width: 1400px;
    }
    
    /* Further reduced heights due to wider modal */
    .modal-step[data-step="1"] {
        min-height: 320px; /* Reduced further for large screens */
    }
    
    .modal-step[data-step="2"] {
        min-height: 440px; /* Reduced further for large screens */
    }
    
    /* Even more compact disclaimer for large screens */
    .financing-disclaimer {
        padding: 0.5rem;
        margin: 0.5rem 0;
    }
    
    .financing-disclaimer p {
        font-size: 0.8rem;
        line-height: 1.3;
    }
}
 