/* ==========================================================================
   Lease Detail Page Styling
   Auto de Bruin Brand Colors: #264F7F (blue), #25D366 (green)
   ========================================================================== */

/* Page Container */
.lease-detail-page {
    background: #f8fafc;
    min-height: 100vh;
}

/* Page Header */
.lease-detail-header {
    background: linear-gradient(135deg, #264F7F 0%, #1e3f66 100%);
    color: white;
    padding: 60px 0 40px;
    position: relative;
}

.lease-detail-header::before {
    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 100 100"><defs><pattern id="header-pattern" width="60" height="60" patternUnits="userSpaceOnUse"><circle cx="30" cy="30" r="1.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23header-pattern)"/></svg>');
    opacity: 0.3;
}

.lease-detail-header .container {
    position: relative;
    z-index: 2;
}

.lease-detail-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
}

.lease-detail-header p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin: 0;
}

/* Form Section */
.lease-form-section {
    padding: 60px 0;
}

/* Progress Indicator */
.progress-indicator {
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.progress-bar-container {
    position: relative;
    background: #e2e8f0;
    height: 8px;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #264F7F 0%, #1e3f66 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-bar-fill.step-1 {
    width: 50%;
}

.progress-bar-fill.step-2 {
    width: 100%;
}

.progress-steps-labels {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    flex: 1;
}

.step-indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e2e8f0;
    border: 3px solid #e2e8f0;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.step-indicator i {
    font-size: 12px;
    color: white;
    display: none;
}

.step-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    max-width: 150px;
    line-height: 1.3;
}

.progress-step.completed .step-indicator {
    background: #25D366;
    border-color: #25D366;
}

.progress-step.completed .step-indicator i {
    display: block;
}

.progress-step.completed .step-label {
    color: #25D366;
}

.progress-step.active .step-indicator {
    background: #264F7F;
    border-color: #264F7F;
}

.progress-step.active .step-label {
    color: #264F7F;
    font-weight: 700;
}

/* Form Container */
.form-container {
    max-width: 1600px;
    margin: 0 auto;
}

/* Remove padding from form containers */
.lease-detail-page .contact-form-container,
.lease-detail-page .form-container,
.lease-detail-page .offerte-form,
.lease-detail-page .lease-form-container {
    padding: 0 !important;
}

/* Form Steps */
.form-step {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease-in-out;
}

.form-step.completed {
    border-color: rgba(37, 211, 102, 0.2);
    background: rgba(37, 211, 102, 0.02);
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.form-step.active {
    border-color: rgba(38, 79, 127, 0.2);
    background: rgba(38, 79, 127, 0.02);
    display: block !important;
    opacity: 1;
    transform: translateY(0);
}

.form-step.hidden {
    display: none !important;
    opacity: 0;
    transform: translateY(-20px);
}

/* Step Header */
.step-header {
    padding: 30px 40px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.step-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.step-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin: 8px 0 0 0;
}

.step-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #25D366;
    font-weight: 600;
    font-size: 0.875rem;
}

.step-status i {
    font-size: 1.125rem;
}

/* Step Actions */
.step-actions {
    padding: 30px 40px 40px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #f1f5f9;
    margin-top: 20px;
}

.step-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 180px;
    justify-content: center;
}

.step-actions .btn-primary {
    background: linear-gradient(135deg, #264F7F 0%, #1e3f66 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(38, 79, 127, 0.3);
}

.step-actions .btn-primary:hover {
    background: linear-gradient(135deg, #1e3f66 0%, #264F7F 100%);
    box-shadow: 0 6px 20px rgba(38, 79, 127, 0.4);
    transform: translateY(-2px);
}

.step-actions .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(38, 79, 127, 0.3);
}

.step-actions .btn i {
    font-size: 0.875rem;
}

/* Car Summary */
.car-summary {
    padding: 40px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

.car-image {
    position: relative;
}

.car-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.car-details h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.car-type {
    font-size: 1rem;
    color: #64748b;
    margin: 0 0 20px 0;
}

.car-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.spec-label {
    font-weight: 500;
    color: #64748b;
    font-size: 0.875rem;
}

.spec-value {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.875rem;
}

/* Car Pricing - Enhanced format matching lease card */
.car-pricing {
    margin-top: 24px;
}

.price-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #264F7F;
    border: 1px solid #264F7F;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    width: fit-content;
}

.badge-text {
    font-size: 12px;
}

.badge-pct {
    background: #ef4444;
    color: #fff;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
}

.lease-from {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.lease-label {
    font-size: 13px;
    color: #64748b;
}

.lease-amount {
    font-size: 20px;
    font-weight: 800;
    color: #16a34a;
}

.lease-badge {
    background: #e0e7ff;
    color: #1e40af;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
}

.lease-note {
    color: #94a3b8;
    font-size: 12px;
}

.price-stack {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.old-price {
    font-size: 1rem;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
}

.current-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.current-price strong {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.btw-label {
    font-size: 0.75rem;
    color: #64748b;
    background: rgba(38, 79, 127, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(38, 79, 127, 0.1);
}

/* Form Content */
.form-content {
    padding: 40px;
}

.form-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 30px 0;
    text-align: center;
}

/* Form Styling */
.lease-form {
    max-width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #264F7F;
    box-shadow: 0 0 0 3px rgba(38, 79, 127, 0.1);
}

.form-group input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input.success {
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

/* Field Messages */
.field-help {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
}

.field-error {
    font-size: 0.8rem;
    color: #ef4444;
    margin-top: 4px;
    display: none;
}

.field-error.show {
    display: block;
}

.field-success {
    font-size: 0.8rem;
    color: #25D366;
    margin-top: 4px;
    display: none;
}

.field-success.show {
    display: block;
}

/* Form Actions */
.form-actions {
    text-align: center;
    margin-top: 40px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 8px;
    min-width: 200px;
}

.form-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    font-size: 0.875rem;
    color: #64748b;
}

.form-note i {
    color: #264F7F;
}

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .lease-detail-header {
        padding: 40px 0 30px;
    }
    
    .lease-detail-header h1 {
        font-size: 2rem;
    }
    
    .progress-indicator {
        margin-bottom: 40px;
    }
    
    .progress-line {
        margin: 0 10px;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .step-label {
        font-size: 0.8rem;
        max-width: 100px;
    }
    
    .car-summary {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px 20px;
    }

    .car-image {
        text-align: center;
    }

    .car-image img {
        max-width: 100%;
        height: 200px;
    }
    
    .car-specs {
        grid-template-columns: 1fr;
    }
    
    .car-pricing {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .price-stack {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }

    .price-badge {
        font-size: 11px;
        padding: 3px 8px;
    }

    .badge-text {
        font-size: 11px;
    }

    .badge-pct {
        font-size: 11px;
        padding: 1px 6px;
    }
    
    .form-content {
        padding: 30px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .step-header {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .step-actions {
        padding: 20px;
    }

    .step-actions .btn {
        width: 100%;
        min-width: auto;
        padding: 14px 24px;
        font-size: 0.95rem;
    }
}
