/* Professional Car Purchase Request Form - Modern Design */

:root {
    --primary-color: #1F93D0;
    --primary-hover: #1878a8;
    --primary-light: #e3f2fd;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --border-radius: 16px;
    --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #1F93D0 0%, #1878a8 100%);
    --gradient-hero: linear-gradient(135deg, #1F93D0 0%, #6EC6F3 100%);
    --gradient-success: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevent body scrolling on mobile devices when form is active */
html, body {
    height: 100%;
    overflow-x: hidden;
}

/* Mobile-specific body constraints */
@media (max-width: 991.98px) {
    body {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
        /* Handle safe areas */
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    /* Allow scrolling only within form content */
    .form-container .form-card .form-content {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    
    /* Ensure form container doesn't exceed viewport */
    .form-container {
        position: relative;
        z-index: 10;
    }
    
    /* Handle iOS Safari viewport issues */
    @supports (-webkit-touch-callout: none) {
        .form-container {
            max-height: calc(100vh - 250px);
        }
    }
    
    /* Ensure button container respects safe areas */
    .form-container .form-card .button-container {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }
}

/* Global Alert Container */
.global-alert-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 1rem;
    pointer-events: none;
}

.global-alert-container .alert {
    pointer-events: auto;
    margin-bottom: 0.5rem;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    animation: slideDownAlert 0.4s ease-out;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.global-alert-container .alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.95), rgba(32, 201, 151, 0.95));
    color: white;
}

.global-alert-container .alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.95), rgba(255, 107, 107, 0.95));
    color: white;
}

.global-alert-container .alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.95), rgba(255, 193, 7, 0.95));
    color: #212529;
}

.global-alert-container .alert-info {
    background: linear-gradient(135deg, rgba(31, 147, 208, 0.95), rgba(110, 198, 243, 0.95));
    color: white;
}

.global-alert-container .alert .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.global-alert-container .alert .btn-close:hover {
    opacity: 1;
}

@keyframes slideDownAlert {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile adjustments for alerts */
@media (max-width: 768px) {
    .global-alert-container {
        padding: 0.75rem;
    }
    
    .global-alert-container .alert {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
}

/* Simple Fixed Alert System */
.simple-alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    left: 20px;
    z-index: 9999;
    pointer-events: none;
}

.simple-alert-container .alert {
    pointer-events: auto;
    margin-bottom: 10px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .simple-alert-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .simple-alert-container .alert {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
}

/* Body and Layout */
body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--gradient-hero);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Mobile and Tablet - No Scrolling */
@media (max-width: 991.98px) {
    body {
        overflow: hidden;
        height: 100vh;
    }
    
    .hero-section {
        height: 100vh;
        padding: 0;
        overflow: hidden;
    }
    
    .row.align-items-center.min-vh-100 {
        height: 100vh;
        align-items: flex-start !important;
        padding-top: 1rem;
        overflow: hidden;
    }
    
    /* Show logo but hide other hero content on mobile and tablet */
    .hero-logo {
        display: block !important;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .hero-title,
    .hero-subtitle,
    .hero-features {
        display: none !important;
    }
    
    /* Ensure form fits within screen bounds */
    .form-container {
        max-height: calc(100vh - 375px);
        margin: 0;
        padding: 0.5rem;
        display: flex;
        flex-direction: column;
        margin-top: 0.5rem;
        overflow: hidden;
    }
    
    .form-card {
        flex: 1;
        padding: 0.5rem;
        overflow: hidden;
    }
    
    .form-container .form-card .button-container {
        padding: 0.75rem;
        margin: 0 -0.5rem;
        left: 0.5rem;
        right: 0.5rem;
        border-radius: 12px 12px 0 0;
    }
    
    .form-container .form-card .form-content {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-bottom: 90px;
    }
    
    .form-container-desktop {
        display: none !important;
    }
    
    .vertical-progress-container {
        display: none !important;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    z-index: 1;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.15"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="120" fill="url(%23a)"/><circle cx="800" cy="300" r="180" fill="url(%23a)"/><circle cx="400" cy="700" r="150" fill="url(%23a)"/><circle cx="900" cy="800" r="100" fill="url(%23a)"/><circle cx="100" cy="600" r="80" fill="url(%23a)"/></svg>');
    opacity: 0.6;
    animation: float 15s ease-in-out infinite;
    z-index: 1;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(120deg);
    }
    66% {
        transform: translateY(10px) rotate(240deg);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
}

.hero-logo {
    text-align: center;
}

.hero-logo img {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.hero-logo img:hover {
    transform: scale(1.05);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-title .text-primary {
    color: black !important;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
}

/* Form Container */
.form-container {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInUp 0.8s ease-out;
    /* Dynamic height calculation for desktop */
    max-height: calc(100vh - 120px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Fixed Button Container for Mobile */
.form-container .form-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.form-container .form-card form {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.form-container .form-card .form-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 100px; /* Space for fixed buttons */
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.form-container .form-card .button-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress Container */
.progress-container {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1.5rem;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    position: relative;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.step-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    max-width: 80px;
    line-height: 1.2;
}

.step-item.active .step-number {
    background: var(--gradient-primary);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(31, 147, 208, 0.3);
    transform: scale(1.1);
}

.step-item.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.step-item.completed .step-number {
    background: var(--gradient-success);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.step-item.completed .step-label {
    color: var(--success-color);
    font-weight: 600;
}

.progress-line {
    position: relative;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

/* Vertical Progress Bar - Desktop Only */
.vertical-progress-container {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.vertical-progress-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    margin-bottom: 1rem;
    flex-grow: 1;
    justify-content: center;
}

.vertical-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.vertical-step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    flex-shrink: 0;
}

.vertical-step-label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.3s ease;
    line-height: 1.2;
    text-align: center;
    max-width: 120px;
}

.vertical-step-item.active .vertical-step-number {
    background: var(--gradient-primary);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 16px rgba(31, 147, 208, 0.4);
    transform: scale(1.1);
}

.vertical-step-item.active .vertical-step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.vertical-step-item.completed .vertical-step-number {
    background: var(--gradient-success);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.vertical-step-item.completed .vertical-step-label {
    color: var(--success-color);
    font-weight: 600;
}

.vertical-progress-line {
    position: absolute;
    right: -1px;
    top: 75px;
    bottom: 75px;
    width: 6px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    z-index: 1;
}

.vertical-progress-fill {
    width: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: height 0.6s ease;
    position: relative;
    overflow: hidden;
    height: 0;
}

.vertical-progress-fill::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: verticalShimmer 2s infinite;
}

@keyframes verticalShimmer {
    0% { top: -100%; }
    100% { top: 100%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Form Card */
.form-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.form-container-desktop .form-card {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    height: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-height: 100%;
    overflow-y: auto;
}

.form-container-desktop .form-card .form-header {
    margin-bottom: 2rem;
}

.form-container-desktop .form-card form {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.form-container-desktop .form-card .form-group {
    margin-bottom: 1.5rem;
}

.form-container-desktop .form-card .btn {
    margin-top: auto;
}

/* .form-card:hover {
    box-shadow: var(--box-shadow-hover);
    transform: translateY(-2px);
} */

.form-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem 0.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
}

.form-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 0.9; }
}

.step-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.form-header h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-header p {
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(31, 147, 208, 0.15);
    background: white;
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: #adb5bd;
}

.form-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
}

/* Button Styles */
.btn {
    border-radius: 10px;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    margin: 0;
    width: 100%;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(31, 147, 208, 0.4);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    background: transparent;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Multi-select Styles */
select[multiple] {
    min-height: 180px;
    background: white;
}

select[multiple] option {
    padding: 0.625rem 0.875rem;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.2s ease;
}

select[multiple] option:hover {
    background: var(--primary-light);
}

select[multiple] option:checked {
    background: var(--primary-color);
    color: white;
}

/* Purchase Type Options */
.purchase-type-options {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.form-check {
    flex: 1;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.875rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.form-check:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(31, 147, 208, 0.15);
}

.form-check-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.form-check-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.form-check-input:checked + .form-check-label {
    color: var(--primary-color);
    font-weight: 600;
}

.form-check-input:checked ~ .form-check {
    border-color: var(--primary-color);
    background: var(--primary-light);
    box-shadow: 0 4px 12px rgba(31, 147, 208, 0.2);
    transform: translateY(-1px);
}

.form-check-input:checked ~ .form-check::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(31, 147, 208, 0.1) 0%, rgba(31, 147, 208, 0.05) 100%);
    border-radius: 8px;
}

.form-check-label i {
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.form-check-input:checked + .form-check-label i {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Summary Container */
.summary-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.25rem;
    margin: 0 1.5rem 1.5rem;
    border: 1px solid #e9ecef;
    overflow: hidden;
    max-width: 100%;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.625rem 0;
    border-bottom: 1px solid #e9ecef;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    font-weight: 600;
    color: var(--dark-gray);
}

.summary-value {
    color: var(--primary-color);
    font-weight: 500;
    max-width: 60%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Success Card */
.success-card {
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem auto 1.5rem;
    font-size: 2.5rem;
    color: white;
    animation: bounceIn 0.8s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.success-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.success-features .feature-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    font-size: 0.9rem;
    color: var(--dark-gray);
}

/* Step Transitions */
.step-content {
    animation: fadeInUp 0.6s ease-out;
    overflow: visible;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form Validation */
.form-control.is-invalid {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--danger-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .form-container {
        max-height: calc(100vh - 375px);
        padding: 1rem;
        margin: 0.5rem;
        overflow: hidden;
    }
    
    .form-container .form-card .button-container {
        padding: 0.75rem;
        margin: 0 -1rem;
        left: 1rem;
        right: 1rem;
    }
    
    .form-container .form-card .form-content {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-bottom: 90px;
    }
    
    .step-content {
        overflow: hidden;
        overflow-y: auto;
    }
    
    .step-content form {
        overflow: hidden;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
        width: 100%;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .purchase-type-options {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-check {
        padding: 0.75rem;
    }
    
    .form-check-label {
        font-size: 0.9rem;
        gap: 0.375rem;
    }
    
    .form-check-label i {
        font-size: 1rem;
    }
    
    .hero-features {
        gap: 0.5rem;
    }
    
    .hero-features .feature-item {
        font-size: 0.9rem;
    }
    

    
    .summary-container {
        margin: 0 1rem 1rem;
    }
    
    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .summary-value {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.875rem;
    }
    
    .form-container {
        max-height: calc(100vh - 375px );
        padding: 0.75rem;
        margin: 0.25rem;
        overflow: hidden;
    }
    
    .form-container .form-card .button-container {
        padding: 0.5rem;
        margin: 0 -0.75rem;
        left: 0.75rem;
        right: 0.75rem;
    }
    
    .form-container .form-card .form-content {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        padding-bottom: 80px;
    }
    
    .step-content {
        overflow: hidden;
        overflow-y: auto;
    }
    
    .step-content form {
        overflow: hidden;
    }
    
    .form-header {
        padding: 1.25rem;
    }
    
    .step-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .form-header h4 {
        font-size: 1.125rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .purchase-type-options {
        gap: 0.375rem;
    }
    
    .form-check {
        padding: 0.625rem;
    }
    
    .form-check-label {
        font-size: 0.85rem;
        gap: 0.25rem;
    }
    
    .form-check-label i {
        font-size: 0.9rem;
    }
    

    
    .summary-container {
        margin: 0 0.75rem 0.75rem;
    }
    
    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .summary-value {
        max-width: 100%;
        width: 100%;
    }
    
    /* Extra compact styling for final step on small screens */
    #step4Mobile .form-card,
    #step4 .form-card {
        padding: 0.375rem;
        margin-bottom: 0.125rem;
    }
   
    
    #step4Mobile .summary-container,
    #step4 .summary-container {
        margin: 0 0.375rem 0.375rem;
        padding: 0.5rem;
    }
    
    #step4Mobile .summary-item,
    #step4 .summary-item {
        padding: 0.25rem 0;
        font-size: 0.85rem;
    }
    
    #step4Mobile .btn,
    #step4 .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* Desktop Form Container */
.form-container-desktop {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInUp 0.8s ease-out;
    width: 100%;
    height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

/* Fixed Button Container for Desktop */
.form-container-desktop .form-card {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    height: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-height: 100%;
    overflow: hidden;
}

.form-container-desktop .form-card .form-header {
    margin-bottom: 2rem;
}

.form-container-desktop .form-card form {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.form-container-desktop .form-card .form-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.form-container-desktop .form-card .button-container {
    position: sticky;
    bottom: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
   
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
    z-index: 100;
}

/* Mobile Form Container Improvements */
@media (max-width: 991.98px) {

    select[multiple]{
        max-height: 230px;
    }
    
    .form-container {
        
        
        margin: 1rem 0;
        padding: 0.5rem;
        max-height: calc(100vh - 375px);
    }
    
    /* Ensure final step doesn't have height restrictions */
    #step4Mobile .form-container,
    #step4 .form-container {
        max-height: none;
        overflow: visible;
    }
    
    #step4Mobile .step-content,
    #step4 .step-content {
        overflow: visible;
        max-height: none;
    }
    
    #step4Mobile .step-content form,
    #step4 .step-content form {
        overflow: visible;
    }
    
    .form-container-desktop {
        display: none !important;
    }
    
    .progress-container {
        margin-bottom: 0.5rem;
        padding: 0.5rem;
    }
    
    .form-card {
        padding: 0 !important;
        margin-bottom: 0.5rem;
        background: white;
        border-radius: var(--border-radius);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    /* Special styling for final step (step 4) to make it more compact */
    #step4Mobile .form-card,
    #step4 .form-card {
        padding: 0.5rem;
        margin-bottom: 0.25rem;
    }
    
   
    
    #step4Mobile .summary-container,
    #step4 .summary-container {
        margin: 0 0.5rem 0.5rem;
        padding: 0.75rem;
    }
    
    #step4Mobile .summary-item,
    #step4 .summary-item {
        padding: 0.375rem 0;
        font-size: 0.9rem;
    }
    
    #step4Mobile .btn,
    #step4 .btn {
        margin-bottom: 0.5rem;
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Ensure buttons are always visible and properly positioned */
    #step4Mobile .d-flex.gap-3,
    #step4 .d-flex.gap-3 {
        position: sticky;
        bottom: 0;
        background: white;
        padding: 0.5rem 0;
        margin-top: 0.5rem;
        border-top: 1px solid #e9ecef;
        z-index: 10;
    }
    
    #step4Mobile .btn-success,
    #step4 .btn-success {
        background: var(--gradient-success);
        border: none;
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
        font-weight: 600;
    }
    
    #step4Mobile .btn-success:hover,
    #step4 .btn-success:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
    }
    
    .form-header {
        padding: 1.5rem;
        margin: -1.5rem -1.5rem 1.5rem -1.5rem;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
        background: var(--gradient-primary);
        color: white;
        width: 100%;
    }
    
    .form-header h4 {
        color: white;
        margin-bottom: 0.5rem;
    }
    
    .form-header p {
        color: rgba(255, 255, 255, 0.9);
        margin-bottom: 0;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-label {
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: #495057;
    }
    
    .form-control, .form-select {
        padding: 0.75rem 1rem;
        border-radius: 8px;
        border: 2px solid #e9ecef;
        transition: all 0.3s ease;
    }
    
    .form-control:focus, .form-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem rgba(31, 147, 208, 0.25);
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        border-radius: 8px;
        font-weight: 600;
        
    }
    
    .btn-primary {
        background: var(--gradient-primary);
        border: none;
        box-shadow: 0 4px 12px rgba(31, 147, 208, 0.3);
    }

   
    
    .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(31, 147, 208, 0.4);
    }
    
    .hero-content {
        text-align: center;
        padding: 0.5rem;
        margin-bottom: 0;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-features {
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
    }
    
    .feature-item {
        font-size: 0.9rem;
    }
    
    /* Progress bar mobile improvements */
    .progress-steps {
        gap: 0.5rem;
    }
    
    .step-item {
        gap: 0.25rem;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .step-label {
        font-size: 0.7rem;
        max-width: 60px;
        text-wrap: nowrap;
    }
    
    /* Purchase type options mobile */
    .purchase-type-options {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-check {
        
        border-radius: 8px;
        border: 2px solid #e9ecef;
        transition: all 0.3s ease;
    }
    
    .form-check:hover {
        border-color: var(--primary-color);
        background: rgba(31, 147, 208, 0.05);
    }
    
    .form-check-input:checked ~ .form-check {
        border-color: var(--primary-color);
        background: rgba(31, 147, 208, 0.1);
    }

    .form-header {
        display: none !important;
    }
    
    .step-icon {
        flex-shrink: 0;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        margin-bottom: 0;
    }
    
    .form-header h4 {
        margin: 0;
        font-size: 1rem;
        font-weight: 600;
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .form-header p {
        margin: 0;
        font-size: 0.85rem;
        opacity: 0.8;
        display: none;
    }
}

/* Car checkboxes - Desktop and Mobile */
.car-checkboxes-container {
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(15px);
    padding: 12px;
    box-shadow: 0 8px 32px rgba(31, 147, 208, 0.1);
}

/* Desktop specific adjustments */
.form-container-desktop .car-checkboxes-container {
    max-height: 250px;
    min-height: 200px;
}

/* Car Selection with Images */
.car-checkbox-item {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    border: 2px solid rgba(31, 147, 208, 0.2);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.car-checkbox-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(31, 147, 208, 0.05) 0%, rgba(110, 198, 243, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
}

.car-checkbox-item:hover {
    transform: translateY(-2px);
    border-color: rgba(31, 147, 208, 0.4);
    box-shadow: 0 8px 25px rgba(31, 147, 208, 0.15);
}

.car-checkbox-item:hover::before {
    opacity: 1;
}

.car-checkbox-item.selected {
    background: linear-gradient(135deg, rgba(31, 147, 208, 0.1) 0%, rgba(110, 198, 243, 0.1) 100%);
    border-color: #1F93D0;
    box-shadow: 0 8px 25px rgba(31, 147, 208, 0.2);
    transform: translateY(-2px);
}

.car-checkbox-item.selected::before {
    opacity: 1;
}

.car-checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.car-checkbox-item label {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    margin: 0;
    width: 100%;
    position: relative;
    z-index: 2;
}

.car-image {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.car-checkbox-item:hover .car-image {
    transform: scale(1.05);
}

.car-checkbox-item.selected .car-image {
    transform: scale(1.05);
    border-color: #1F93D0;
    box-shadow: 0 6px 15px rgba(31, 147, 208, 0.3);
}

.car-image-placeholder {
    width: 80px;
    height: 60px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 24px;
    transition: all 0.3s ease;
}

.car-checkbox-item:hover .car-image-placeholder {
    border-color: #1F93D0;
    color: #1F93D0;
    background: linear-gradient(135deg, rgba(31, 147, 208, 0.05) 0%, rgba(110, 198, 243, 0.05) 100%);
}

.car-checkbox-item.selected .car-image-placeholder {
    border-color: #1F93D0;
    color: #1F93D0;
    background: linear-gradient(135deg, rgba(31, 147, 208, 0.1) 0%, rgba(110, 198, 243, 0.1) 100%);
}

.car-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
    transition: color 0.3s ease;
    flex: 1;
}

.car-checkbox-item:hover .car-name {
    color: #1F93D0;
}

.car-checkbox-item.selected .car-name {
    color: #1F93D0;
}

/* Checkmark for selected items */
.car-checkbox-item::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: #1F93D0;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0, 1);
    z-index: 3;
}

.car-checkbox-item.selected::after {
    opacity: 1;
    transform: scale(1);
}

/* Mobile specific adjustments */
@media (max-width: 767.98px) {
    .car-checkbox-item {
        padding: 12px;
        margin-bottom: 8px;
        border-radius: 12px;
    }
    
    .car-checkbox-item label {
        gap: 12px;
    }
    
    .car-image,
    .car-image-placeholder {
        width: 60px;
        height: 45px;
        border-radius: 8px;
    }
    
    .car-name {
        font-size: 14px;
    }
    
    .car-checkbox-item::after {
        top: 8px;
        right: 8px;
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
}

/* Shimmer effect for loading state */
.car-checkbox-item.loading {
    position: relative;
    overflow: hidden;
}

.car-checkbox-item.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Custom scrollbar for car checkboxes container */
.car-checkboxes-container::-webkit-scrollbar {
    width: 6px;
}

.car-checkboxes-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.car-checkboxes-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), rgba(31, 147, 208, 0.7));
    border-radius: 10px;
}

.car-checkboxes-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-color), rgba(31, 147, 208, 0.9));
}

/* Province Selector Styles */
.province-selector {
    position: relative;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.province-selector:hover {
    border-color: rgba(31, 147, 208, 0.5);
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(31, 147, 208, 0.2);
}

.province-selector:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(31, 147, 208, 0.2);
}

.province-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    min-height: 56px;
    color: var(--text-color);
    border: 2px solid #e9ecef;
    background-color: #f8f9fa;
}

.province-display .placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.province-display .selected-province {
    color: var(--text-color);
    font-weight: 500;
    font-size: 14px;
}

.province-display i {
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease;
}

.province-selector:hover .province-display i {
    transform: translateY(2px);
}

/* Province Modal Styles */
.province-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.province-modal.show {
    display: flex;
}

.province-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.province-modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
    backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    animation: slideUp 0.4s ease forwards;
    overflow: hidden;
}

.province-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(31, 147, 208, 0.1);
    background: linear-gradient(135deg, var(--primary-color), #1a7bb3);
    color: white;
}

.province-modal-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 18px;
}

.province-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.province-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.province-modal-body {
    padding: 0;
}

.province-search-container {
    padding: 20px 25px 15px;
    border-bottom: 1px solid rgba(31, 147, 208, 0.1);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    right: 15px;
    color: rgba(31, 147, 208, 0.6);
    font-size: 16px;
    z-index: 2;
}

.province-search-input {
    width: 100%;
    padding: 15px 45px 15px 20px;
    border: 2px solid rgba(31, 147, 208, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.province-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(31, 147, 208, 0.1);
}

.province-search-input::placeholder {
    color: rgba(31, 147, 208, 0.6);
}

.province-list-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

.province-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.province-item {
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    text-align: right;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.province-item:hover {
    background: linear-gradient(135deg, rgba(31, 147, 208, 0.1), rgba(31, 147, 208, 0.05));
    transform: translateX(-5px);
}

.province-item.selected {
    background: linear-gradient(135deg, var(--primary-color), #1a7bb3);
    color: white;
}

.province-item.selected::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: white;
    border-radius: 0 2px 2px 0;
}

.province-item.hidden {
    display: none;
}

/* Modal Animations */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Mobile Responsive for Province Modal */
@media (max-width: 768px) {
    .province-modal-content {
        max-height: 90vh;
        border-radius: 20px 20px 0 0;
    }
    
    .province-modal-header {
        padding: 18px 20px;
    }
    
    .province-modal-header h5 {
        font-size: 16px;
    }
    
    .province-search-container {
        padding: 15px 20px 10px;
    }
    
    .province-search-input {
        padding: 12px 40px 12px 15px;
        font-size: 13px;
    }
    
    .province-item {
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .province-list-container {
        max-height: 350px;
    }
}

/* Exchange Specifications Styling */
.exchange-specifications {
    background: linear-gradient(135deg, rgba(31, 147, 208, 0.05) 0%, rgba(110, 198, 243, 0.05) 100%);
    border: 2px solid rgba(31, 147, 208, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-top: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(31, 147, 208, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.exchange-specifications::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1F93D0, #6EC6F3);
    transform: scaleX(0);
    transition: transform 0.6s ease;
}

.exchange-specifications.show::before {
    transform: scaleX(1);
}

.exchange-specifications.show {
    border-color: rgba(31, 147, 208, 0.4);
    box-shadow: 0 8px 25px rgba(31, 147, 208, 0.15);
    transform: translateY(-2px);
}

.exchange-specifications .form-label {
    color: #1F93D0;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.exchange-specifications .form-label i {
    font-size: 16px;
    color: #1F93D0;
}

.exchange-specifications textarea {
    border: 2px solid rgba(31, 147, 208, 0.2);
    border-radius: 12px;
    padding: 16px;
    font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.exchange-specifications textarea:focus {
    border-color: #1F93D0;
    box-shadow: 0 0 0 3px rgba(31, 147, 208, 0.1);
    outline: none;
    background: rgba(255, 255, 255, 0.95);
}

.exchange-specifications textarea::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

/* Animation for showing/hiding */
.exchange-specifications.d-none {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
    overflow: hidden;
}

.exchange-specifications:not(.d-none) {
    opacity: 1;
    transform: translateY(0);
    max-height: 300px;
    animation: slideDownSpecs 0.4s ease-out;
}

@keyframes slideDownSpecs {
    0% {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        max-height: 300px;
    }
}

/* Mobile specific adjustments */
@media (max-width: 767.98px) {
    .exchange-specifications {
        padding: 16px;
        margin-top: 12px;
        border-radius: 12px;
    }
    
    .exchange-specifications textarea {
        padding: 12px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    .exchange-specifications .form-label {
        font-size: 14px;
        margin-bottom: 10px;
    }
}

/* Enhanced purchase type options for exchange */
.purchase-type-options .form-check:nth-child(3) .form-check-label {
    font-weight: 600;
}

.purchase-type-options .form-check:nth-child(3) .form-check-input:checked + .form-check-label {
    color: #1F93D0;
    background: linear-gradient(135deg, rgba(31, 147, 208, 0.1) 0%, rgba(110, 198, 243, 0.1) 100%);
    border-color: #1F93D0;
}

.purchase-type-options .form-check:nth-child(3) .form-check-input:checked + .form-check-label i {
    color: #1F93D0;
    animation: exchangeIconPulse 0.6s ease-in-out;
}

@keyframes exchangeIconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Exchange Specifications in Summary */
.exchange-specs-summary {
    background: linear-gradient(135deg, rgba(31, 147, 208, 0.1) 0%, rgba(110, 198, 243, 0.1) 100%);
    border: 1px solid rgba(31, 147, 208, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
    font-style: italic;
    color: #1F93D0;
    display: block;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    position: relative;
}

.exchange-specs-summary .specs-content {
    max-height: 80px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.exchange-specs-summary .specs-content.expanded {
    max-height: none;
}

.exchange-specs-summary .specs-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(transparent, rgba(31, 147, 208, 0.1));
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.exchange-specs-summary .specs-content.expanded::after {
    opacity: 0;
}

.exchange-specs-summary .read-more-btn {
    background: linear-gradient(135deg, #1F93D0 0%, #6EC6F3 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.exchange-specs-summary .read-more-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(31, 147, 208, 0.3);
}

.exchange-specs-summary .read-more-btn i {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.exchange-specs-summary .read-more-btn.expanded i {
    transform: rotate(180deg);
}

.summary-item:has(.exchange-specs-summary) {
    border-left: 3px solid #1F93D0;
    padding-left: 12px;
    margin-left: 8px;
}

/* Exchange Modal Styles */
.exchange-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.exchange-modal.show {
    opacity: 1;
    visibility: visible;
}

.exchange-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.exchange-modal-content {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.exchange-modal.show .exchange-modal-content {
    transform: scale(1) translateY(0);
}

.exchange-modal-header {
    background: linear-gradient(135deg, #1F93D0 0%, #6EC6F3 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.exchange-modal-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.exchange-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.exchange-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.exchange-modal-body {
    padding: 25px;
    max-height: 400px;
    overflow-y: auto;
}

.exchange-modal-body .form-group {
    margin-bottom: 0;
}

.exchange-modal-body .form-label {
    color: #333;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 16px;
}

.exchange-modal-body textarea {
    border: 2px solid rgba(31, 147, 208, 0.2);
    border-radius: 12px;
    padding: 16px;
    font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    resize: vertical;
    min-height: 120px;
}

.exchange-modal-body textarea:focus {
    border-color: #1F93D0;
    box-shadow: 0 0 0 3px rgba(31, 147, 208, 0.1);
    outline: none;
}

.exchange-modal-body textarea::placeholder {
    color: #6c757d;
    font-style: italic;
}

.exchange-modal-body .form-text {
    color: #6c757d;
    font-size: 13px;
    margin-top: 8px;
    line-height: 1.4;
}

.exchange-modal-footer {
    padding: 20px 25px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.exchange-modal-footer .btn {
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.exchange-modal-footer .btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
}

.exchange-modal-footer .btn-outline-secondary:hover {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

.exchange-modal-footer .btn-primary {
    background: linear-gradient(135deg, #1F93D0 0%, #6EC6F3 100%);
    border: none;
    color: white;
}

.exchange-modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(31, 147, 208, 0.3);
}

/* Mobile Responsive for Exchange Modal */
@media (max-width: 768px) {
    .exchange-modal-content {
        max-height: 90vh;
        border-radius: 20px 20px 0 0;
        width: 95%;
    }
    
    .exchange-modal-header {
        padding: 18px 20px;
    }
    
    .exchange-modal-header h5 {
        font-size: 16px;
    }
    
    .exchange-modal-body {
        padding: 20px;
        max-height: 350px;
    }
    
    .exchange-modal-body .form-label {
        font-size: 15px;
    }
    
    .exchange-modal-body textarea {
        padding: 14px;
        font-size: 13px;
        min-height: 100px;
    }
    
    .exchange-modal-footer {
        padding: 18px 20px;
        flex-direction: column;
    }
    
    .exchange-modal-footer .btn {
        padding: 12px 20px;
    }
    
    /* Mobile styles for exchange specs summary */
    .exchange-specs-summary .specs-content {
        max-height: 60px;
    }
    
    .exchange-specs-summary .read-more-btn {
        font-size: 11px;
        padding: 3px 10px;
        margin-top: 6px;
    }
    
    .exchange-specs-summary .read-more-btn i {
        font-size: 9px;
    }
}