/**
 * Cars Form Wizard Styles
 * Dedicated styles for the car creation/edit form wizard
 */

/* Step Content Display */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

/* Step Indicators */
.step-indicator {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #d1d5db;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    border: 2px solid transparent;
}

.step-indicator.active .step-number {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.step-indicator.completed .step-number {
    background-color: #10b981;
    color: white;
    border-color: #10b981;
}

.step-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    transition: all 0.3s ease;
}

.step-indicator.active .step-label {
    color: #3b82f6;
    font-weight: 600;
}

.step-indicator.completed .step-label {
    color: #10b981;
    font-weight: 600;
}

/* Progress bar animation */
#progress-bar {
    transition: width 0.5s ease-in-out;
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .step-indicator {
        flex-direction: column;
        text-align: center;
        flex: 1;
        min-width: 0;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .step-label {
        font-size: 0.75rem;
        margin-top: 0.25rem;
    }
}

/* Error Messages */
.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.error-input {
    border-color: #dc2626;
}

/* FilePond Styles */
.filepond--root {
    margin-bottom: 1rem;
}

/* Validation States */
.kt-input.border-red-500 {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 1px #dc2626;
}

.kt-input.border-green-500 {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 1px #10b981;
}

.kt-input.bg-red-50 {
    background-color: #fef2f2 !important;
}

.kt-input.bg-green-50 {
    background-color: #f0fdf4 !important;
}

/* Field Messages Animation */
.field-error,
.field-success,
.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State for Validation */
.validating {
    position: relative;
}

.validating::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

/* Improved validation message styling */
.field-error svg,
.field-success svg {
    flex-shrink: 0;
}

.field-error {
    border-left: 3px solid #ef4444;
    padding-left: 8px;
    background-color: rgba(254, 242, 242, 0.5);
    border-radius: 4px;
    padding: 4px 8px;
}

.field-success {
    border-left: 3px solid #10b981;
    padding-left: 8px;
    background-color: rgba(240, 253, 244, 0.5);
    border-radius: 4px;
    padding: 4px 8px;
}

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

/* Responsive Design */
@media (min-width: 640px) {
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 0.875rem;
        margin-bottom: 8px;
    }
    
    .step-label {
        font-size: 0.875rem;
    }
    
    .step-line {
        width: 60px;
        margin: 0 16px;
    }
}

@media (max-width: 639px) {
    .step-indicator {
        scale: 0.9;
    }
    
    .step-line {
        width: 20px;
        margin: 0 4px;
    }
    
    /* Hide step lines on very small screens */
    @media (max-width: 480px) {
        .step-line {
            display: none;
        }
        
        .step-indicator {
            scale: 0.8;
        }
    }
}

/* Profit Margin Calculator */
.profit-margin-positive {
    color: #10b981;
    font-weight: 600;
}

.profit-margin-moderate {
    color: #f59e0b;
    font-weight: 600;
}

.profit-margin-negative {
    color: #ef4444;
    font-weight: 600;
}

/* Form Focus States */
.kt-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
}

/* Step Navigation */
.step-nav-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

.notification.success {
    background-color: #10b981;
    color: white;
}

.notification.error {
    background-color: #ef4444;
    color: white;
}

.notification.info {
    background-color: #3b82f6;
    color: white;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile-specific adjustments */
@media (max-width: 640px) {
    .notification {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
        font-size: 0.875rem;
        padding: 0.75rem;
    }
    
    /* Ensure buttons are touch-friendly */
    .kt-btn {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    /* Improve form spacing on mobile */
    .kt-card-content {
        padding: 1rem;
    }
    
    /* Better spacing for form groups */
    .space-y-3 > * + * {
        margin-top: 0.75rem;
    }
    
    /* Improve textarea height on mobile */
    .kt-textarea {
        min-height: 80px;
    }
}

/* Tablet adjustments */
@media (min-width: 641px) and (max-width: 1024px) {
    .step-indicator {
        scale: 0.95;
    }
    
    .kt-card-content {
        padding: 1.25rem;
    }
}

/* Print Styles */
@media print {
    .step-indicator,
    .step-line,
    .step-nav-disabled,
    .notification {
        display: none !important;
    }
} 