/* Компонент user.register - CSS стили */

/* Основные стили страницы */
.register-page {
    padding: 100px 0;
    background-color: #f9fafb;
}


.register-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Заголовок */
.register-header {
    text-align: center;
    margin-bottom: 3rem;
}

.register-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.register-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
}

/* Сообщения об ошибках и успехе */
.register-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.register-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Выбор роли */
.role-selection {
    margin-bottom: 2rem;
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.role-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.role-card:hover {
    border-color: #0d58c6;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.role-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.role-icon-svg {
    width: 3rem;
    height: 3rem;
    color: #0d58c6;
}

.role-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.role-description {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.role-select-btn {
    width: 100%;
    background-color: #0d58c6;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.role-select-btn:hover {
    background-color: #0d58c6;
}

/* Форма регистрации */
.registration-form {
    margin-top: 2rem;
}

.form-header {
    margin-bottom: 2rem;
}

.back-btn {
    display: flex;
    align-items: center;
    color: #0d58c6;
    background: none;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.back-btn:hover {
    color: #0d58c6;
}

.back-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

/* Секции формы */
.form-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Группы полей */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-family: inherit;
    line-height: 1.5;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #0d58c6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 6rem;
}

/* Поле с паролем */
.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 23px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    padding: 0.25rem;
}

.password-toggle:hover {
    color: #374151;
}

.password-toggle-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Чекбоксы */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-input {
    margin-right: 0.5rem;
    width: 1rem;
    height: 1rem;
    accent-color: #0d58c6;
}

.checkbox-label {
    color: #374151;
    font-size: 0.875rem;
}

/* Согласие */
.agreement-group {
    margin-bottom: 1.5rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.checkbox-wrapper .checkbox-input {
    margin-right: 0.75rem;
    margin-top: 0.125rem;
}

.checkbox-wrapper .checkbox-label {
    font-size: 0.875rem;
    line-height: 1.5;
}

.link {
    color: #0d58c6;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* Кнопка регистрации */
.register-btn {
    width: 100%;
    background-color: #0d58c6;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.register-btn:hover {
    background-color: #0d58c6;
}

.register-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.btn-text {
    display: flex;
    align-items: center;
}

.btn-loading {
    display: flex;
    align-items: center;
}

.btn-loading.hidden {
    display: none;
}

.loading-spinner {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Футер */
.register-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.login-link {
    color: #0d58c6;
    text-decoration: none;
    font-weight: 500;
}

.login-link:hover {
    text-decoration: underline;
}

/* Утилиты */
.hidden {
    display: none !important;
}

/* Toast уведомления */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

.toast {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.toast--success {
    border-color: #bbf7d0;
    background-color: #f0fdf4;
    color: #16a34a;
}

.toast--error {
    border-color: #fecaca;
    background-color: #fef2f2;
    color: #dc2626;
}

.toast--info {
    border-color: #bfdbfe;
    background-color: #eff6ff;
    color: #0d58c6;
}

/* Адаптивность */
@media (max-width: 768px) {
    .register-page {
        padding: 1rem 0.5rem;
    }
    
    .register-card {
        padding: 1.5rem;
    }
    
    .roles-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .register-title {
        font-size: 1.5rem;
    }
    
    .register-subtitle {
        font-size: 1rem;
    }
} 
