/* Auth Registration Page - Enhanced Visual Feedback and Animations */

/* MIGRATION NOTICE: This file contains legacy duplicates of classes defined in src/styles/components */
/* TODO: Migrate to centralized component architecture from src/styles/ */
/* Classes duplicated: .user-type-card, .form-input, .submit-button, .professional-field, .error-state */
/* Use components/modals.css and components/_forms.css for new implementations */

/* User Type Selection Cards */
.user-type-card {
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-type-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Selected state for user type cards */
.user-type-card.selected,
.user-type-card:has(.user-type-input:checked) {
    border-color: #ED1C24 !important;
    background-color: rgba(237, 28, 36, 0.05);
    box-shadow: 0 0 0 3px rgba(237, 28, 36, 0.1);
}

/* Selection indicator animations */
.selection-indicator {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.selection-dot {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* User type icon enhancements */
.user-type-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Professional fields smooth animations */
.professional-field {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.professional-field.field-hidden {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.professional-field.field-visible {
    opacity: 1;
    max-height: 200px; /* Adjust based on content */
}

/* Form validation states */
.error-state {
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
    10%, 90% {
        transform: translate3d(-1px, 0, 0);
    }
    20%, 80% {
        transform: translate3d(2px, 0, 0);
    }
    30%, 50%, 70% {
        transform: translate3d(-4px, 0, 0);
    }
    40%, 60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Enhanced input focus states */
.form-input:focus {
    box-shadow: 0 0 0 3px rgba(31, 41, 55, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

/* Submit button enhancements */
.submit-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.submit-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(237, 28, 36, 0.3), 0 4px 6px -2px rgba(237, 28, 36, 0.1);
}

.submit-button:active {
    transform: translateY(0);
}

/* Loading state for submit button */
.submit-button.loading {
    pointer-events: none;
    opacity: 0.8;
    position: relative;
    color: transparent;
}

.submit-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.submit-button.loading::before {
    content: 'Отправляем...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: transparent;
    font-size: 0;
}

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

/* Benefits section enhancements */
.benefit-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.benefit-item:hover {
    transform: translateY(-4px);
}

.benefit-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.benefit-item:hover .benefit-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 25px -5px rgba(237, 28, 36, 0.2);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .user-type-card {
        margin-bottom: 0.75rem;
    }
    
    .professional-field {
        margin-top: 1rem;
    }
}

/* Focus states for accessibility */
.user-type-input:focus + .user-type-card {
    outline: 2px solid #ED1C24;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .user-type-card.selected {
        border-width: 3px;
        background-color: rgba(237, 28, 36, 0.15);
    }
}

/* Form success states */
.form-success {
    border-color: #10B981 !important;
    background-color: rgba(16, 185, 129, 0.05);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* User type selection error state */
.user-type-selection-error .user-type-card {
    border-color: #EF4444;
    background-color: rgba(239, 68, 68, 0.05);
}

/* Enhanced validation feedback */
.validation-message {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.validation-message.success {
    color: #10B981;
}

.validation-message.error {
    color: #EF4444;
}

.validation-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* Form field focus improvements */
.form-field {
    position: relative;
}

.form-field.has-value label {
    color: #374151;
    font-weight: 500;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .user-type-card,
    .professional-field,
    .selection-dot,
    .user-type-icon,
    .submit-button {
        transition: none;
    }
    
    .error-state {
        animation: none;
    }
    
    .submit-button.loading::after {
        animation: none;
    }
}