/* Formularz Leasingowy - Style CSS */

.leasing-form-container {
    --primary-color: #2372FD;
    --primary-hover: #1c5cd6;
    --primary-light: #e6f0ff;
    --text-dark: #1a1a1a;
    --text-medium: #4a5568;
    --text-light: #718096;
    --background: #ffffff;
    --background-light: #f7fafc;
    --border: #e2e8f0;
    --border-light: #edf2f7;
    --disabled-slider-track: #d1d5db; /* Light gray for disabled track */
    --disabled-slider-thumb: #9ca3af; /* Medium gray for disabled thumb */
    
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, sans-serif;
    color: var(--text-dark);
    margin: 20px 0;
}

.leasing-form-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-dark);
    font-size: 28px;
    font-weight: 700;
}

.form-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(35, 114, 253, 0.1);
    width: 100%;
    max-width: 100%;
    display: flex;
    min-height: 700px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    margin: 0 auto;
}

.sidebar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    width: 280px;
    padding: 40px 30px;
    color: white;
    position: relative;
    overflow: hidden;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.sidebar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transform: translate(-50px, 50px);
}

.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    height: 6px;
    border-radius: 3px;
    margin-bottom: 30px;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.progress-fill {
    background: white;
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.progress-text {
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.step {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-right: 15px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.step.completed .step-number {
    background: white;
    color: var(--primary-color);
    border-color: white;
    transform: scale(1.05);
}

.step.active .step-number {
    background: white;
    color: var(--primary-color);
    border-color: white;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.step.inactive .step-number {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.3);
}

.step-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: white;
}

.step-content p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.main-content {
    flex: 1;
    padding: 50px;
    background: white;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 40px;
    line-height: 1.3;
}

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.vehicle-option {
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    position: relative;
    overflow: hidden;
}

.vehicle-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vehicle-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(35, 114, 253, 0.15);
}

.vehicle-option:hover::before {
    opacity: 0.05;
}

.vehicle-option.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(35, 114, 253, 0.2);
}

.vehicle-option.selected::before {
    opacity: 0.1;
}

.vehicle-icon {
    width: 60px;
    height: 48px;
    margin: 0 auto 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}
.vehicle-icon img{
	border-radius: 8px !important;
}
[type=button], [type=submit], button{
	border: none !important;
	color:#fff !important;
}

.vehicle-option:hover .vehicle-icon {
    transform: scale(1.1);
}

.vehicle-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.form-group {
    margin-bottom: 30px;
	margin-top:20px;
}

.form-row {
    display: flex;
    gap: 24px;
    margin-bottom: 0px; /* Adjusted from 0px to allow space if needed */
	width:100%;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.required::after {
    content: "*";
    color: var(--primary-color);
    margin-left: 4px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 14px 18px !important;
    border: 2px solid var(--border) !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    background: white !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-dark) !important;
}

input:focus,
select:focus,
textarea:focus {
    outline: none !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(35, 114, 253, 0.1) !important;
    transform: translateY(-1px)!important;
}

input:valid {
    border-color: var(--border) !important;
}

input:invalid {
    border-color: var(--border) !important;
}

.price-display {
    background: linear-gradient(135deg, var(--background-light) 0%, white 100%);
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}
.price-display-step-2 {
    padding: 24px;
    width: 100%;
    margin-bottom: 25px;
    justify-content: center; /* Center the content */
}

.price-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    opacity: 0.02;
}

.price-amount {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-color);
    position: relative;
    z-index: 1;
}
.price-display-step-2 .price-amount {
    font-size: 28px;
}


.price-label {
    font-size: 12px;
    color: var(--text-medium);
    font-weight: 500;
    position: relative;
    z-index: 1;
}
.price-display-step-2 .price-label {
     font-size: 13px;
}


.slider-container {
    margin: 25px 0 15px 0; /* Adjusted margin */
    position: relative;
}

.slider-track-wrapper {
    position: relative;
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    margin-bottom: 0;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    margin: 0;
    cursor: pointer;
}

.slider-track {
    position: absolute;
    top: 0;
    left: 0;
    height: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 4px;
    transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(35, 114, 253, 0.2);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(35, 114, 253, 0.3);
    transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(35, 114, 253, 0.4);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(35, 114, 253, 0.3);
}

/* Disabled Slider Styles */
.slider:disabled {
    cursor: not-allowed;
}
.slider:disabled + .slider-track-wrapper .slider-track {
    background: var(--disabled-slider-track) !important; /* Important to override gradient */
    box-shadow: none;
}
.slider:disabled::-webkit-slider-thumb {
    background: var(--disabled-slider-thumb);
    border-color: var(--disabled-slider-track);
    box-shadow: none;
    cursor: not-allowed;
}
.slider:disabled::-moz-range-thumb {
    background: var(--disabled-slider-thumb);
    border-color: var(--disabled-slider-track);
    box-shadow: none;
    cursor: not-allowed;
}


.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-medium);
    margin-top: 12px;
    font-weight: 500;
}

.slider-value {
    text-align: center;
    font-weight: 700;
    color: var(--primary-color);
    margin: -16px 0 10px;
    font-size: 16px;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 20px;
    border: 2px solid var(--border);
    border-radius: 10px;
    transition: all 0.3s ease;
    flex: 1;
}

.radio-label:hover {
    background-color: var(--background-light);
    border-color: var(--primary-light);
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-label span {
    font-weight: 600;
    color: var(--text-medium);
    transition: color 0.3s ease;
}

.radio-label input[type="radio"]:checked + span {
    color: var(--primary-color);
}

.radio-label input[type="radio"]:checked ~ .radio-indicator {
    border-color: var(--primary-color);
}

.radio-label input[type="radio"]:checked ~ .radio-indicator::after {
    transform: scale(1);
}

.radio-label.selected {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.checkbox-group {
    margin: 25px 0;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.checkbox-item:hover {
    background: var(--background-light);
}

.checkbox-item input[type="checkbox"] {
    margin-right: 14px;
    margin-top: 2px;
    accent-color: var(--primary-color);
    transform: scale(1.2);
}

.checkbox-item label {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 0;
    color: var(--text-medium);
    font-weight: 400;
}

.buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border-light);
}

.btn {
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    border: none;
    position: relative;
    overflow: hidden;
}

.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: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 15px rgba(35, 114, 253, 0.3);
    border: none;
}

.btn-primary:hover,
.btn-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(35, 114, 253, 0.4);
    color: white !important;
}

.btn-secondary {
    background: #f8f9fa !important;
    color: var(--text-medium) !important;
    border: 2px solid #e9ecef !important;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: #e9ecef !important;
    border-color: #dee2e6 !important;
    color: var(--text-dark) !important;
    transform: translateY(-1px);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Styles for new amount input fields - Placed before .financial-param-displays */
.amount-input-group { /* This class is on the form-group containing the input-with-suffix */
    margin-bottom: 10px !important; /* Space below the input */
    margin-top: 15px !important; /* Space above the input */
    width: 100%; /* Make the input group take full width */
}

.input-with-suffix {
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: 10px;
    padding-right: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    width: 100%; /* Ensure the wrapper takes full width of .amount-input-group */
}

.input-with-suffix:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(35, 114, 253, 0.1);
    transform: translateY(-1px);
}

.input-with-suffix .amount-input {
    border: none !important;
    box-shadow: none !important;
    padding-right: 8px !important;
    flex-grow: 1;
    min-width: 0;
    width: auto; /* Allow it to grow within flex container */
}

.input-with-suffix .amount-input:focus {
    outline: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.input-with-suffix span {
    font-size: 14px;
    color: var(--text-medium);
    white-space: nowrap;
}

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

/* Added for specific margins from form-template.php */
.amount-input-group-custom-margins {
    margin-top: 15px !important;
    margin-bottom: 5px !important;
}

.financial-displays-custom-margins {
    margin-top: 10px !important;
}
/* End of added styles for specific margins */

/* Styles for the row containing only price displays, below the input */
.financial-param-displays {
    gap: 16px; 
    margin-top: 10px; /* Space above the price displays */
}

.financial-param-displays .price-display {
    flex-grow: 1;
    margin-bottom: 0; 
    /* padding: 14px 18px; already defined in .price-display */
    /* text-align: center; already defined in .price-display */
}

/* Loading spinner */
#leasing-form-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.amount-inputs-container {
    display: flex;
    gap: 16px;
    width: 100%;
}

.amount-inputs-container .form-group {
    flex: 1;
    margin: 0 !important; /* Reset margins for items inside flex container */
}

/* Responsive design */
@media (max-width: 768px) {
    .amount-inputs-container {
        flex-direction: column;
        gap: 10px;
    }

    .form-container {
        flex-direction: column;
        max-width: 100%;
    }

    .sidebar {
        width: 100%;
        padding: 30px 20px;
        border-radius: 16px 16px 0 0;
    }

    .main-content {
        padding: 20px 20px;
    }

    .vehicle-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 15px;
    }

    .form-row { /* This applies to .financial-param-displays as well */
        flex-direction: column;
        gap: 10px; /* Add some gap for stacked items */
    }
    .financial-param-displays .price-display {
        width: 100%; /* Ensure price displays take full width when stacked */
    }


    .step-title {
        font-size: 20px;
        margin-bottom: 30px;
    }

    .buttons {
        margin-top: 40px;
        padding-top: 20px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
	.step {
		flex-direction:column;
		align-items: flex-start;
		width:50%;
		float:left;
		margin-bottom:12px;
	}
	.progress-text{
		margin-bottom:0px;
	}
	.price-display-step-2{
		width:100%;
		margin-top:16px;
	}
}


@media (max-width: 480px) {
    .sidebar {
        padding: 12px 20px 0px 20px;
    }

    .main-content {
        padding: 20px 15px;
    }

    .vehicle-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .vehicle-option {
        padding: 20px 12px;
    }

    .vehicle-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .step-title {
        font-size: 18px;
    }
}
